<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Kaptain on ... stuff &#187; git</title>
	<atom:link href="http://www.kellyrob99.com/blog/tag/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kellyrob99.com/blog</link>
	<description>Tales of development, life and the folly that goes along with both</description>
	<lastBuildDate>Thu, 01 Jul 2010 21:07:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Gource Visualizations of the Groovy/Grails/Griffon Projects</title>
		<link>http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=gource-visualizations-of-the-groovygrailsgriffon-projects</link>
		<comments>http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 01:58:41 +0000</pubDate>
		<dc:creator>TheKaptain</dc:creator>
				<category><![CDATA[Cool Toys]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Concurrent Versions System]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Griffon]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Revision control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[theKaptain]]></category>

		<guid isPermaLink="false">http://www.kellyrob99.com/blog/?p=1226</guid>
		<description><![CDATA[That&#8217;s a whole lot of Gr8ness in the title, don&#8217;t you think? Ok, ok &#8211; I apologize for the pun. I whipped these up using the open source Gource visualization software and with HD content free on Youtube now, I just had to try that out too. Gource Gource is a software version control visualization [...]


Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/' rel='bookmark' title='Permanent Link: Bamboo, Grails and Git for Continuous Integration'>Bamboo, Grails and Git for Continuous Integration</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/06/02/a-grails-app-demoing-the-stackexchange-api/' rel='bookmark' title='Permanent Link: A Grails App Demoing the StackExchange API'>A Grails App Demoing the StackExchange API</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/08/27/vijug-griffongroovy-presentation/' rel='bookmark' title='Permanent Link: VIJUG Griffon/Groovy Presentation'>VIJUG Griffon/Groovy Presentation</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s a whole lot of Gr8ness in the title, don&#8217;t you think? Ok, ok &#8211; I apologize for the pun. I whipped these up using the open source <a href="http://code.google.com/p/gource/">Gource</a> visualization software and with <a href="http://www.google.com/support/youtube/bin/answer.py?hl=en&amp;answer=153665">HD content free on Youtube</a> now, I just had to try that out too.</p>
<h2>Gource</h2>
<p>Gource is a software <a class="zem_slink" href="http://en.wikipedia.org/wiki/Revision_control" title="Revision control" rel="wikipedia">version control</a> visualization program with support for <a class="zem_slink" href="http://git-scm.com/" title="Git (software)" rel="homepage">Git</a>, <a class="zem_slink" href="http://mercurial.selenic.com/" title="Mercurial" rel="homepage">Mercurial</a>, and with a tiny bit of extra effort, <a class="zem_slink" href="http://www.nongnu.org/cvs" title="Concurrent Versions System" rel="homepage">CVS</a> and <a href="http://subversion.tigris.org/">Subversion</a>. It&#8217;s available as a macport install, as is the ffmpeg program used to stitch together a series of screenshots into the final video.&nbsp; All of these visualizations were created with Git or Git-svn. When the Gource program is running it brings up an interactive window so you can interact with it to a degree, affecting the camera, zoom, etc.&nbsp; The default resolution is 1024&#215;768 but I tried to bump it up to 1920&#215;1080. I&#8217;m assuming that stretched the limits of the rendering, as there&#8217;s quite a bit of pixellation in the final product; either that or the ffmpeg params need to be tweaked. The three visualizations on this page were all created using this one-liner command line invocation (broken down here over several lines for readability).</p>
<pre class="brush: bash;">
gource -1920x1080 --highlight-all-users --bloom-intensity .3 -a 1 -s .01
     --hide-dirnames --hide-filenames --stop-at-end --output-ppm-stream -
     | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i -
     -vcodec libx264 -vpre default  gource.mp4
</pre>
<h2>Groovy</h2>
<p>From the initial commit on August 28, 2003, Groovy has come a long way. I tried the Gource provided python script to translate an svn log file into the required format the first time, but cloning the repository with git-svn seemed to produce better results. It&#8217;s interesting to see that the overall structure of the Groovy project doesn&#8217;t look like is has changed very much over the years. I recognized a lot of the names you see on the screen. Be sure to watch the <a class="zem_slink" href="http://en.wikipedia.org/wiki/1080p" title="1080p" rel="wikipedia">1080p</a> version if you&#8217;re having trouble reading the text and see if you can&#8217;t find some recognizable committers.</p>
<p><a href="http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/"><em>Click here to view the embedded video.</em></a></p>
<h2>Grails</h2>
<p>Starting on Sunday March 14, 2004 here&#8217;s how it all unfolded, at least  from the perspective of the public Git repository. Grails looks like it grew a little more spontaneously than Groovy; there are more frequent restructurings and some transitions that seem to cover a whole lot of ground in very little time. In particular watch out for the burst of activity in the summer of 2009.</p>
<p><a href="http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/"><em>Click here to view the embedded video.</em></a></p>
<h2>Griffon</h2>
<p>September 17, 2008 marks the first commit for Griffon and this short but sweet video explodes right from the start. Benefiting greatly from the Grails model this project shows a lot of progress in a very short time indeed. Most, if not all, of the names you see here you probably caught in the previous two videos as well.<br />
<p><a href="http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/"><em>Click here to view the embedded video.</em></a></p></p>
<h2>What&#8217;s the Point?</h2>
<p>Watching these gives me (and maybe you) some appreciation for how much effort over time it takes to bring a new language/framework/technology to maturity and all of the individual contributions that go into it. Gource provides a lot more detail into the actual structure if you want to dig in. For purposes of keeping these images fairly uncluttered I removed file and directory names and just focused on the committers and the general structure. I think I gained a git of insight into how a codebase can evolve, and properly appreciate that organizing the increasing complexity of an ever-growing system over time is not a simple job. Plus they look cool. Enjoy!</p>
<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/2f2c3e09-4284-4248-b30f-d47242fd57a1/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=2f2c3e09-4284-4248-b30f-d47242fd57a1" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<!-- AdSense Now! V1.95 -->
<!-- Post[count: 3] -->
<div class="adsense adsense-leadout" style="float:right;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "pub-6955914197200080";
/* 728x90, created 8/3/09 */
google_ad_slot = "4051815125";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p align="left"><a class="tt" href="http://twitter.com/home/?status=Gource+Visualizations+of+the+Groovy%2FGrails%2FGriffon+Projects+http://pqxf7.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.kellyrob99.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Gource+Visualizations+of+the+Groovy%2FGrails%2FGriffon+Projects+http://pqxf7.th8.us" title="Post to Twitter">Tweet This Post</a></p>

<p>Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/' rel='bookmark' title='Permanent Link: Bamboo, Grails and Git for Continuous Integration'>Bamboo, Grails and Git for Continuous Integration</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/06/02/a-grails-app-demoing-the-stackexchange-api/' rel='bookmark' title='Permanent Link: A Grails App Demoing the StackExchange API'>A Grails App Demoing the StackExchange API</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/08/27/vijug-griffongroovy-presentation/' rel='bookmark' title='Permanent Link: VIJUG Griffon/Groovy Presentation'>VIJUG Griffon/Groovy Presentation</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bamboo, Grails and Git for Continuous Integration</title>
		<link>http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bamboo-grails-and-git-for-continuous-integration</link>
		<comments>http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 05:13:53 +0000</pubDate>
		<dc:creator>TheKaptain</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Atlassian]]></category>
		<category><![CDATA[Bamboo]]></category>
		<category><![CDATA[Continuous integration]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Jira]]></category>
		<category><![CDATA[theKaptain]]></category>

		<guid isPermaLink="false">http://www.kellyrob99.com/blog/?p=1015</guid>
		<description><![CDATA[Following up on my recent installation of the Atlassian product suite at home, I had a really positive experience setting up Bamboo to work with several of my recent Grails projects. Bamboo has proven to be a powerful and essential tool at my day job and I&#8217;ve really been looking forward to putting it to [...]


Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/' rel='bookmark' title='Permanent Link: Gource Visualizations of the Groovy/Grails/Griffon Projects'>Gource Visualizations of the Groovy/Grails/Griffon Projects</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/12/16/jira-grails-plugin/' rel='bookmark' title='Permanent Link: Jira Grails Plugin'>Jira Grails Plugin</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/02/21/developing-faster-with-the-atlassian-intellij-connector/' rel='bookmark' title='Permanent Link: Developing Faster with the Atlassian IntelliJ Connector'>Developing Faster with the Atlassian IntelliJ Connector</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Following up on my recent installation of the <a class="zem_slink" href="http://www.atlassian.com/" title="Atlassian" rel="homepage">Atlassian</a> product suite at home, I had a really positive experience setting up Bamboo to work with several of my recent Grails projects.  Bamboo has proven to be a powerful and essential tool at my day job and I&#8217;ve really been looking forward to putting it to work for my personal projects.   I&#8217;ve also been using <a class="zem_slink" href="http://git-scm.com/" title="Git (software)" rel="homepage">Git</a> for a repository lately, and while I have nothing but praise for my good friend svn, I have to say the ability to set up a new repository in 2 seconds flat is pretty damn convenient.</p>
<p>Since neither Grails nor Git are by default supported by Bamboo, I grabbed a couple of plugins to enable my home <a class="zem_slink" href="http://en.wikipedia.org/wiki/Continuous_integration" title="Continuous integration" rel="wikipedia">continuous integration</a> system. Bamboo has a very sensible plugin model that allows for adding new capabilites with only a jar file in the right place and a server restart, and a <a href="https://plugins.atlassian.com/plugin/home">fairly rich library of plugins</a>. It&#8217;s also encouraging to see a company that is committed to eating their own dog food &#8211; recently they&#8217;ve moved their plugin resources to <a class="zem_slink" href="http://www.atlassian.com/software/jira" title="JIRA" rel="homepage">Jira</a> studio as you can see on the <a href="https://labs.atlassian.com/wiki/display/GRAILS/Home">Grails plugin home page</a>. This gives you as the consumer of the software access to the wiki&#8217;d documentation, any open issues, and even visibility into when source code changes are committed. I&#8217;m assuming that last is subject to whether or not the plugin source code is open source or not, but still &#8211; pretty nifty.</p>
<p>The Grails plugin instructions speak for themselves in the 3 screen-shots on the one and only wiki page. Anything else you need to know is summarized in a one liner on the &#8220;Builder&#8221; tab when you select the Grails builder: &#8220;Use a new line to seperate Grails commands.&#8221; Gotta love clear, simple instructions. Drop the plugin jar into $BAMBOO_INSTALL_DIR/webapp/WEB-INF/lib, restart Bamboo and <a href="http://confluence.atlassian.com/display/BAMBOO/Configuring+a+new+Builder">configure a new builder for Grails</a>. Took a couple of minutes and knowing where my Grails install was located.</p>

<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/addingbamboograilsbuilder.png" title="Adding the builder definition to Bamboo" class="shutterset_singlepic30" >
	<img class="ngg-singlepic" src="http://www.kellyrob99.com/blog/wp-content/gallery/cache/30__750x_addingbamboograilsbuilder.png" alt="Adding the builder definition to Bamboo" title="Adding the builder definition to Bamboo" />
</a>

<p>A quick Google for &#8220;Bamboo git plugin&#8221; led to a bit of a hypertext chase that <a href="http://github.com/krosenvold/bgit">eventually ended up here</a>.  Looks like this particular plugin has passed through the hands of <a href="http://jira.atlassian.com/browse/BAM-2875">at least a couple of maintainers</a>, but so far it&#8217;s worked exactly as advertised.  And again, loving the dog food analogy, it&#8217;s nice to see a project enabling Git hosted on github. Thanks very much to <a href="http://incodewetrustinc.blogspot.com/">Kristian Rosenvold</a> for running with the ball on this one! Again, drop the jar into $BAMBOO_INSTALL_DIR/webapp/WEB-INF/lib and restart Bamboo. When creating a plan you will now have Git as a choice for a Source Repository. In my case I&#8217;m just using a plain file repository that resides on the build box, but it should work just as well with a remote repository.</p>

<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/bamboogitsetup.png" title="Select Git as the source repository for a Bamboo plan" class="shutterset_singlepic31" >
	<img class="ngg-singlepic" src="http://www.kellyrob99.com/blog/wp-content/gallery/cache/31__750x_bamboogitsetup.png" alt="Select Git as the source repository for a Bamboo plan" title="Select Git as the source repository for a Bamboo plan" />
</a>

<p>Setting up the Grails targets is similarly straightforward. Thanks to <a href="http://today.java.net/pub/a/today/2009/06/23/Grails-and-Continuous-Integration.html">this article</a>, which describes the Grails setup on Hudson, and reminded me about the &#8211;non-interactive flag since obviously the build server isn&#8217;t going to be able to interact with the console. I&#8217;m also using a couple of Grails plugins to provide static source code analysis so my parameters also include -coverage and a call to the codenarc script.</p>

<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/bamboograilssetup.png" title="Select Grails as a builder and specify which scripts to call for a Bamboo plan" class="shutterset_singlepic32" >
	<img class="ngg-singlepic" src="http://www.kellyrob99.com/blog/wp-content/gallery/cache/32__750x_bamboograilssetup.png" alt="Select Grails as a builder and specifying which scripts to call for a Bamboo plan" title="Select Grails as a builder and specifying which scripts to call for a Bamboo plan" />
</a>

<p>I had a little trepidation about how this would all turn out after <a href="http://www.dish2dish.com/confluence/display/NPB/2009/12/26/Grails+and+Tools+In+A+Corporate+World">reading this blog post</a>, but I&#8217;ve had much better results so far in my personal experience. It&#8217;s entirely possible that the key differentiator is wrapping Grails with Maven. It&#8217;s definitely not perfect, but it is <a href="http://www.guntheranderson.com/v/data/gettingb.htm">getting better all the time</a>. Hopefully you have better luck in the future Neil!</p>

<div class="ngg-galleryoverview" id="ngg-gallery-8-1015">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.kellyrob99.com/blog/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=8&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-30" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/addingbamboograilsbuilder.png" title="Adding the builder definition to Bamboo" class="shutterset_set_8" >
								<img title="Adding the builder definition to Bamboo" alt="Adding the builder definition to Bamboo" src="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/thumbs/thumbs_addingbamboograilsbuilder.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-31" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/bamboogitsetup.png" title="Select Git as the source repository for a Bamboo plan" class="shutterset_set_8" >
								<img title="Select Git as the source repository for a Bamboo plan" alt="Select Git as the source repository for a Bamboo plan" src="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/thumbs/thumbs_bamboogitsetup.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-32" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/bamboograilssetup.png" title="Select Grails as a builder and specify which scripts to call for a Bamboo plan" class="shutterset_set_8" >
								<img title="Select Grails as a builder and specifying which scripts to call for a Bamboo plan" alt="Select Grails as a builder and specifying which scripts to call for a Bamboo plan" src="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/thumbs/thumbs_bamboograilssetup.png" width="98" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-33" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/bamboorequirementssetup.png" title="All requirements satisfied to run a Bamboo plan!" class="shutterset_set_8" >
								<img title="All requirements satisfied to run a Bamboo plan!" alt="All requirements satisfied to run a Bamboo plan!" src="http://www.kellyrob99.com/blog/wp-content/gallery/bamboo-grails-and-git/thumbs/thumbs_bamboorequirementssetup.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/38734ac1-c6ec-4339-aaf2-b09678979e9b/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://img.zemanta.com/reblog_c.png?x-id=38734ac1-c6ec-4339-aaf2-b09678979e9b" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script type="text/javascript" src="http://static.zemanta.com/readside/loader.js" defer="defer"></script></span></div>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Bamboo%2C+Grails+and+Git+for+Continuous+Integration+http://b4x66.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.kellyrob99.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Bamboo%2C+Grails+and+Git+for+Continuous+Integration+http://b4x66.th8.us" title="Post to Twitter">Tweet This Post</a></p>

<p>Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/03/21/gource-visualizations-of-the-groovygrailsgriffon-projects/' rel='bookmark' title='Permanent Link: Gource Visualizations of the Groovy/Grails/Griffon Projects'>Gource Visualizations of the Groovy/Grails/Griffon Projects</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/12/16/jira-grails-plugin/' rel='bookmark' title='Permanent Link: Jira Grails Plugin'>Jira Grails Plugin</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/02/21/developing-faster-with-the-atlassian-intellij-connector/' rel='bookmark' title='Permanent Link: Developing Faster with the Atlassian IntelliJ Connector'>Developing Faster with the Atlassian IntelliJ Connector</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kellyrob99.com/blog/2010/01/07/bamboo-grails-and-git-for-continuous-integration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the TestNG DataProvider with Groovy</title>
		<link>http://www.kellyrob99.com/blog/2009/08/09/using-the-testng-dataprovider-with-groovy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-the-testng-dataprovider-with-groovy</link>
		<comments>http://www.kellyrob99.com/blog/2009/08/09/using-the-testng-dataprovider-with-groovy/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 06:49:58 +0000</pubDate>
		<dc:creator>TheKaptain</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[DataProvider]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TestNG]]></category>

		<guid isPermaLink="false">http://www.kellyrob99.com/blog/?p=590</guid>
		<description><![CDATA[TestNG is a great tool for testing in Java, and it works even better with a little Groovy thrown in. Just lately I&#8217;ve had a lot of success using the DataProvider pattern. A DataProvider method in TestNG can return either a two dimensional Object array or an Iterator over each of the test parameters. A [...]


Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/05/15/achieving-groovy-like-fluency-in-java-with-google-collections/' rel='bookmark' title='Permanent Link: Achieving Groovy-like Fluency in Java with Google Collections'>Achieving Groovy-like Fluency in Java with Google Collections</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/11/21/different-flavors-of-embedded-groovy-in-java-apps-or-how-to-make-your-java-groovier/' rel='bookmark' title='Permanent Link: Different Flavors of Embedded Groovy in Java Apps or &#8220;How To Make your Java Groovier!&#8221;'>Different Flavors of Embedded Groovy in Java Apps or &#8220;How To Make your Java Groovier!&#8221;</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/03/14/breaking-weak-captcha-in-slightly-more-than-26-lines-of-groovy-code/' rel='bookmark' title='Permanent Link: Breaking Weak CAPTCHA in&#8230; slightly more than 26 Lines of Groovy Code'>Breaking Weak CAPTCHA in&#8230; slightly more than 26 Lines of Groovy Code</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://testng.org/">TestNG</a> is a great tool for testing in Java, and it works even better with a little Groovy thrown in. Just lately I&#8217;ve had a lot of success using the <a href="http://testng.org/javadocs/org/testng/annotations/DataProvider.html">DataProvider</a> pattern.</p>
<p>A DataProvider method in TestNG can return either a two dimensional Object array or an Iterator over each of the test parameters. A consumer of that method will be triggered once time for each set of parameters from the provider. Parameters are injected into the consumer method at execution time.<br />
This greatly eases testing various expectations that run through essentially the same path of execution. </p>
<p>Here&#8217;s the simple method under test, courtesy of <a href="http://groovy-almanac.org/the-inject-method-of-list/">this example on Groovy Almanac</a></p>
<pre class="brush: groovy;">
    /**
     * Use the Groovy added List.inject() method to sum a list of numbers.
     */
    def sum(list)
    {
        def sum = list.inject(0) { sum, item -&gt; sum + item }
    }
</pre>
<p>And here&#8217;s the corresponding DataProvider test harness. The test is injected with a List of numbers to sum and the associated total expected for each case.</p>
<pre class="brush: groovy;">
    @DataProvider (name = &quot;test1&quot;)
    public Object[][] createListInjectSumData() {
        def array = new Object[3][]
        array[0] = [[1, 2, 3], 6] as Object[]
        array[1] = [[2, 4, 6], 12] as Object[]
        array[2] = [[3, 6, 9], 18] as Object[]
        return array
    }

    @Test (dataProvider = &quot;test1&quot;)
    void testListInjectSummation(list, expectedSum) {
        Assert.assertEquals(new ListInjectExample().sum(list), expectedSum)
    }
</pre>
<p>I&#8217;ve put the maven project I used to demo this up on github <a href="git://github.com/kellyrob99/TestNG-DataProvider-Demo.git">here</a>. Mostly just because I&#8217;m having a great time using <a class="zem_slink" href="http://git-scm.com/" title="Git (software)" rel="homepage">Git</a> lately.</p>
<p> <img src='http://www.kellyrob99.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Using+the+TestNG+DataProvider+with+Groovy+http://woa23.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.kellyrob99.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Using+the+TestNG+DataProvider+with+Groovy+http://woa23.th8.us" title="Post to Twitter">Tweet This Post</a></p>

<p>Related posts:<ol><li><a href='http://www.kellyrob99.com/blog/2010/05/15/achieving-groovy-like-fluency-in-java-with-google-collections/' rel='bookmark' title='Permanent Link: Achieving Groovy-like Fluency in Java with Google Collections'>Achieving Groovy-like Fluency in Java with Google Collections</a></li>
<li><a href='http://www.kellyrob99.com/blog/2009/11/21/different-flavors-of-embedded-groovy-in-java-apps-or-how-to-make-your-java-groovier/' rel='bookmark' title='Permanent Link: Different Flavors of Embedded Groovy in Java Apps or &#8220;How To Make your Java Groovier!&#8221;'>Different Flavors of Embedded Groovy in Java Apps or &#8220;How To Make your Java Groovier!&#8221;</a></li>
<li><a href='http://www.kellyrob99.com/blog/2010/03/14/breaking-weak-captcha-in-slightly-more-than-26-lines-of-groovy-code/' rel='bookmark' title='Permanent Link: Breaking Weak CAPTCHA in&#8230; slightly more than 26 Lines of Groovy Code'>Breaking Weak CAPTCHA in&#8230; slightly more than 26 Lines of Groovy Code</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.kellyrob99.com/blog/2009/08/09/using-the-testng-dataprovider-with-groovy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
