<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Best Served Cold - ant</title>
			<link>http://www.pjk.us/paul/index.cfm</link>
			<description>Place where I talk.</description>
			<language>en-us</language>
			<pubDate>Tue, 07 Sep 2010 21:05:48 -0700</pubDate>
			<lastBuildDate>Mon, 31 Jul 2006 19:58:00 -0700</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>paul@pjk.us</managingEditor>
			<webMaster>paul@pjk.us</webMaster>
			
			
			
			
			
			<item>
				<title>All this talk of cfcUnit is making me nervous...</title>
				<link>http://www.pjk.us/paul/index.cfm/2006/7/31/All_this_talk_of_cfcUnit_is_making_me_nervous...</link>
				<description>
				
				&lt;p&gt;There are a number of people writing of the improvements in the 
latest version of cfcUnit, and I have not been one of them. So, you 
might be wondering why. Well, this last month since CFUnited, I have 
been busy making cfcUnit 1.1 ready for full release. That means fixing 
some bugs, adding some new assertions, and most importantly making sure 
that there is some better documentation available. On top of all that, 
though, I have been very busy making sure that you can run cfcUnit from 
everyone&apos;s favorite build tool, Ant.&lt;/p&gt;

&lt;p&gt;Apparently, the absence of a cfcUnit Ant task and the existence of 
one for CFUnit has been a critical distinction between the two CF testing 
frameworks, giving people a reason not to use cfcUnit. Well, at CFUnited
John Paul Ashenfelter took the initial stab at this elusive feature to
show that it could be done without &lt;em&gt;too&lt;/em&gt; much effort using the
existing test runner that produces its results in WDDX.&lt;/p&gt;

&lt;p&gt;There were a couple of problems with the first implementation, first
among them that &lt;a href=&quot;http://www.jdom.org&quot;&gt;JDOM&lt;/a&gt; was used to process 
the XML document. This meant that when using the cfcUnit Ant task, you 
had to first download and install the JDOM libaray (and any of its
subsequent dependencies) somewhere in the Ant classpath. A number of
people discovered just how difficult (and not to say tedious) this process
was for them just to get going.&lt;/p&gt;

&lt;p&gt;Another problem was that the data format produced by the test runner was 
WDDX, a format that isn&apos;t very friendly to someone trying to read using
XPath expressions since it really conveys no meaning at all to anything
besides another WDDX parser.&lt;/p&gt;

&lt;p&gt;So, what did I do about this?&lt;/p&gt;

&lt;p&gt;Well, the first thing I did was come up with a new XML grammar that
better describes the test results in a much more concise way. Once the
format was in nailed down, I wrote a test runner to produce that XML. Once
that was done, I needed to fix the problem posed by JDOM and its numerous
dependencies.&lt;/p&gt;

&lt;p&gt;One thing that is nice about Ant is that it is configured using XML. In 
fact, it uses &lt;a href=&quot;http://xerces.apache.org/xerces2-j/&quot;&gt;Xerces&lt;/a&gt; and &lt;a href=&quot;http://xml.apache.org/xalan-j/&quot;&gt;Xalan&lt;/a&gt; to process build configuration files, and I
figured the cfcUnit task could take advantage of the fact that by running
inside Ant it already has access to these libraries. So, after a bit of
work, the cfcUnit Ant task is now a lot easier to install without any
external libraries.&lt;/p&gt;

&lt;p&gt;Now, some people might be wondering why I have gone to all this trouble
of producing XML in the test runner and parsing it in the Ant task. Why not
just format the text in ColdFusion and just display it in the console? Well,
there is a good reason for this, and its pretty simple really. By sending
raw data to the client, I can give the cfcUnit task a lot of options in
how it handles errors and failures in both the individual tests and in the
test runner itself. It can be configured to halt a build when something fails
or to keep going, or show a full formatted stacktrace generated by an error 
inside a test.&lt;/p&gt;

&lt;p&gt;Anyhow, after working with Ant for a little bit and seeing how Eclipse
can automatically run cfcUnit whenever a file is changed, I can see why
some people have gotten all bent out of shape because cfcUnit did not have
an Ant task, but I&apos;m sure that will all change soon.&lt;/p&gt;

&lt;p&gt;Anyhow, here are some of the things others have been saying about cfcUnit lately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://corfield.org/blog/index.cfm/do/blog.entry/entry/Unit_Testing_Love_Affair&quot;&gt;Unit Testing Love Affair&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.markdrew.co.uk/blog/index.cfm/2006/7/26/CFCUnit-Assertions&quot;&gt;CFCUnit Assertions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.corfield.org/blog/index.cfm/do/blog.entry/entry/Automated_Testing_with_cfcUnit&quot;&gt;Automated Testing with cfcUnit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cdscott.blogspot.com/2006/07/thank-you-paul-and-john-paul.html&quot;&gt; Thank you Paul and John Paul!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
				
				</description>
						
				
				<category>unit testing</category>				
				
				<category>ant</category>				
				
				<category>cfcUnit</category>				
				
				<pubDate>Mon, 31 Jul 2006 19:58:00 -0700</pubDate>
				<guid>http://www.pjk.us/paul/index.cfm/2006/7/31/All_this_talk_of_cfcUnit_is_making_me_nervous...</guid>
				
			</item>
			
		 	
			</channel></rss>