<?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>Eyefodder &#187; Flash &amp; Actionscript</title>
	<atom:link href="http://eyefodder.com/category/engineering/flash-actionscript/feed" rel="self" type="application/rss+xml" />
	<link>http://eyefodder.com</link>
	<description></description>
	<lastBuildDate>Sat, 26 Aug 2017 21:12:17 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Code Coverage with Flex &#8211; a headless agent for CI builds</title>
		<link>http://eyefodder.com/2009/07/code_coverage_with_flex_a_head.html</link>
		<comments>http://eyefodder.com/2009/07/code_coverage_with_flex_a_head.html#comments</comments>
		<pubDate>Tue, 28 Jul 2009 17:29:37 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=33</guid>
		<description><![CDATA[<p>In my last blog post I gave details of how I user the modified code coverage viewer for flex in an automated build to follow the trend of code coverage over time. The trouble with this approach was that there was a problem either with the localConnection in flex or the code that uses it [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/code_coverage_with_flex_a_head.html">Code Coverage with Flex &#8211; a headless agent for CI builds</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In my last blog post I gave details of how I user the modified <a href="http://www.eyefodder.com/2009/07/code_coverage_with_flex_runnin.html">code coverage viewer for flex</a> in an automated build to follow the trend of code coverage over time. The trouble with this approach was that there was a problem either with the <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=security2_13.html">localConnection</a> in flex or the code that uses it and there was a wide variance of the values being reported. This post shows you how I fixed it by creating a headless code coverage reporter that you can drop into your test harness and remove the need for a second application altogether.</p>
<p><span id="more-33"></span><br />
In order to try and do this I decided to use as much of the code as possible that the <a href="http://code.google.com/p/flexcover/">FlexCover</a> guys had written, and only change what I needed to get it working.Once I had it up and running I could worry about making it faster / leaner / more neatly coded&#8230;</p>
<h3>The approach</h3>
<p>So here&#8217;s the basic plan:</p>
<ol>
<li>Swap out the default localConnection reporting mechanism for one that will pick and choose depending on environment the app is running in</li>
<li>Create a headless agent that will pull the code coverage data collection and reporting side of the coverageViewer into the app</li>
<li>Use commandline options to swap between the headless and localConnnection agent</li>
<li>Default to using the localConnnection</li>
</ol>
<h3>How it works</h3>
<p>When your app compiles using the instrumented SDK created for using <a href="http://code.google.com/p/flexcover/">FlexCover</a>, your application makes use of a class called CoverageManager. This manager is a patch that allows you to plug in a custom code coverage agent for use in your app. By default it uses a class called <code>LocalConnectionCoverageAgent</code> which broadcasts code coverage metadata to the coverage viewer application. What my patch does is get in and allow you to use a different, headless agent. To do this simply call during the preinitialize event of your main application:</p>
<pre class="brush: as3; title: ; notranslate">
private function injectAgent():void{
CoverageManager.agent = new CoverageAgentSwitch();
}</pre>
<p>As a quick test, run your app as you had previously and confirm it still works by sending data over a localConnection to the CoverageViewer. This is expected as by default, the switch will create a LocalConnectionCoverageAgent. In order to use the headless agent you need to set a few commandline properties. First you need to tell the switch that you want to go headless. Then the headless agent needs to know where it&#8217;s getting its metadata from, where it should output the code coverage report. The commandline options are:</p>
<pre class="brush: bash; title: ; notranslate">
-coverage-agent-type=headless &lt;em&gt;Headless is only option, anything else will default to localConnectionAgent&lt;/em&gt;
-coverage-metadata='/full/path/to/coverage/metadata.cvm'
-coverage-output='/full/path/to/coverage/reportInOriginalFormat.cvr'
-emma-report='/full/path/to/coverage/reportInEmmaFormat.xml'
</pre>
<p>Note that if you don&#8217;t specify the metadata path and at least one of the report formats, the headless agent will log errors but otherwise fail silently.<br />
In terms of the edits I made to get it working, that is pretty much it. The headlessCoverageAgent swc is probably larger than it needs to be and is definitely grossly inefficient. I will update this soon to improve this, but right now I only have time to get this post up.<br />
Obviously you will have to change your build script to pass these new commandline parameters in to the test harness when you run it. If there is any interest, I&#8217;ll post my updated build script and test harness modifications that dispense with the log parser altogether and make for a more repeatable build script.</p>
<h3>The Result</h3>
<p>My build process is now much quicker because I don&#8217;t have to wait to be sure that the coverage viewer has initialized. It&#8217;s also completely stable and the code coverage trend has been a great motivator for the team.<br />
<img src="http://www.eyefodder.com/images/betterCoverage.png" alt="better coverage" width="324" height="266" /><br />
<em>Code Coverage trend without crazy variance found using the external viewer</em><br />
<a href="http://www.eyefodder.com/blog/downloads/headlessCoverageAgent.swc.zip">Download headless library</a></p>
<h3>Update</h3>
<p>A few of you have asked for a copy of the source code so you can play around with it and undoubtedly make it all work better for your needs. Attached here—with no warranty or support—is the <a href="http://www.eyefodder.com/blog/downloads/headlessCoverageAgent_src.zip">headless agent project</a>. In order to get it to work, you will need to have the <a href="http://flexcover.googlecode.com/svn/trunk/CoverageAgent/">CoverageAgent</a> and <a href="http://flexcover.googlecode.com/svn/trunk/CoverageUtilities">CoverageUtilities</a> projects in your workspace, as well as the modified <a href="http://www.eyefodder.com/2009/07/flex_code_coverage_process_par.html">CoverageViewer</a> project from previous posts. Good luck with it &#8211; It&#8217;s code I haven&#8217;t looked at for a while so don&#8217;t hate on me for it :/</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/code_coverage_with_flex_a_head.html">Code Coverage with Flex &#8211; a headless agent for CI builds</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2009/07/code_coverage_with_flex_a_head.html/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Code Coverage with Flex &#8211; ANT build for running the viewer</title>
		<link>http://eyefodder.com/2009/07/code_coverage_with_flex_runnin.html</link>
		<comments>http://eyefodder.com/2009/07/code_coverage_with_flex_runnin.html#comments</comments>
		<pubDate>Sat, 25 Jul 2009 19:47:08 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=32</guid>
		<description><![CDATA[<p>In my last post, I gave you my elegant extension hack for generating EMMA style code coverage reports from FlexCover. This post covers the first route I took to incorporating this in my build process. It does work, but it&#8217;s not very consistent in its reporting and I&#8217;ll explain why at the end&#8230; So by [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/code_coverage_with_flex_runnin.html">Code Coverage with Flex &#8211; ANT build for running the viewer</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In my last post, I gave you my <del>elegant extension</del> hack for generating <a href="http://emma.sourceforge.net/">EMMA</a> style code coverage reports from <a href="http://code.google.com/p/flexcover/">FlexCover</a>. This post covers the first route I took to incorporating this in my build process. It does work, but it&#8217;s not very consistent in its reporting and I&#8217;ll explain why at the end&#8230;</p>
<p><span id="more-32"></span><br />
So by now I had my code coverage viewer happily spitting out EMMA formatted code coverage reports that my <a href="https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins">build machine</a> was just dying to consume. All I had to do was get the running of the code coverage test and the outputting of the report to be an integral part of my build. Here is the sequence of events for my build process:</p>
<ol>
<li>clean my output folders (delete and recreate them)</li>
<li>Compile the main application using the instrumented SDK. This will generate the .cvr metadatafile that the coverageViewer needs</li>
<li>Compile the test harness using the instrumented SDK. This is so that when it runs, the hooks injected by the SDK report coverage data.</li>
<li>Launch the code coverage viewer Application (specifying EMMA output file)</li>
<li>Run the test harness. When it is finished, call CoverageManager.exit() which will close the viewer</li>
<li>Wait for the test results and code coverage report to be available. By implication this means that the test harness and code coverage viewer have quit.</li>
<li>Compile the main app using the standard SDK</li>
<li>(AIR Apps only) remove test harness and any test data from the output folder</li>
<li>(AIR Apps only) package up the application</li>
</ol>
<p>In theory this is all well and good. In practice there are a few problems:</p>
<ul>
<li>The viewer has to launch and parse the code coverage metadata file. There isn&#8217;t a simple way to feed this back to the ant script, so you have to get the script to wait. I set mine to 30 seconds, which should be enough. Nevertheless, this sort of thing frankly just irks me &#8211; either at some point it will fail, and up until that point, the build is taking longer han it needs to.</li>
<li>There are two applications being launched by the build process. In order for this to work, you need to launch the coverageViewer with <code>spawn='true'</code> If something goes wrong with the build, the script no longer has control of this process (I might be wrong on this one &#8211; correct me if so..)</li>
<li>The code coverage agent (that gets injected into our test harness by the instrumented SDK) and the viewer communicate via <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=security2_13.html">LocalConnection</a>. This allows two flash applications on the same machine to talk to one another. Unfortunately, LocalConnections can be kind of flaky and you have to build a separate local connection for each direction of communication.</li>
</ul>
<p>The first two I could live with, but when I put this together, I found that there was quite a wide variance of about 10% from build to build of code coverage values:<br />
<img src="http://www.eyefodder.com/blog/images/coverageCIBad.gif" alt="coverageCIBad.gif" width="325" height="250" /><br />
<em>Code Coverage trend showing wide variance of reporting results</em></p>
<p>I was left with one of two conclusions:</p>
<ol>
<li>There was a bug/ fragility in the localConnection and it couldn&#8217;t be relied on</li>
<li>There was a bug in the coverageAgent.exit() code sequence</li>
</ol>
<p>The way CoverageAgent.exit() works is that you call it from within your application and it:</p>
<ol>
<li>Waits until the application has sent all remianing code coverage data</li>
<li>Sends a message to the code coverage viewer asking it to prepare for exit</li>
<li>The viewer writes out any report files</li>
<li>Exits, and sends a message back to the main application telling it to exit</li>
</ol>
<p>Somewhere in this back and forth code coverage data was getting lost, and occasionally the build was failing because the report file was not getting written. I could have attempted to debug the code, but in my experience, debugging LocalConnections is a royal ballache. In the end I decided to bring the reporting side of the viewer &#8216;in-house&#8217; and avoid the need for a second application altogether. My next post will show this and give you a download to the swc so that you can do it yourself&#8230;<br />
Just in case you are interested, I have attached the buildfile I used for running the coverageViewer application as part of the build. If you can wait till I post the next update to this, I&#8217;d suggest you do <img src="http://eyefodder.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /><br />
<a href="http://www.eyefodder.com/blog/downloads/coverageViewerANTBuild.zip">Download build file archive</a></p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/code_coverage_with_flex_runnin.html">Code Coverage with Flex &#8211; ANT build for running the viewer</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2009/07/code_coverage_with_flex_runnin.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Code Coverage with Flex &#8211; creating EMMA formatted reports</title>
		<link>http://eyefodder.com/2009/07/flex_code_coverage_process_par.html</link>
		<comments>http://eyefodder.com/2009/07/flex_code_coverage_process_par.html#comments</comments>
		<pubDate>Fri, 24 Jul 2009 15:16:58 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=31</guid>
		<description><![CDATA[<p>Details on my hack for creating EMMA formatted code coverage reports using FlexUnit</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/flex_code_coverage_process_par.html">Code Coverage with Flex &#8211; creating EMMA formatted reports</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Over the last few months I have adopted <a href="https://hudson.dev.java.net/">Hudson</a> as my build machine of choice as it is just so easy to setup and administer. Another thing I really like is being able to watch the trend of the number of tests in my test harness over time. It&#8217;s not the best metric, but it does act as a reasonable motivator.<br />
A slightly less crude metric is <a href="http://en.wikipedia.org/wiki/Code_coverage">code coverage</a>, which measures the amount of an application that gets exercised when it&#8217;s run. <a href="http://code.google.com/p/flexcover/">FlexCover</a> is a very cool tool for this and props to my colleague &#8211; <a href="http://blogs.adobe.com/auhlmann/">Alex Uhlmann</a> and <a href="http://joeberkovitz.com/">Joe Berkowitz</a> of Allurent for the great work they&#8217;ve done. There is a great UI for exploring code coverage in detail and it can also export xml formatted reports on coverage.<br />
The thing is, I want to be able to track code coverage over time in Hudson, just like I can with the number of tests. I achieved this by extending FlexCover to output <a href="http://emma.sourceforge.net/">EMMA</a> formatted reports&#8230;</p>
<p><span id="more-31"></span><br />
So as I was starting to look at this, I could see one of three paths:</p>
<ol>
<li>Create a Hudson plugin to consume flexCover&#8217;s code coverage report format</li>
<li>Add some sort of XSLT transform to my build process</li>
<li>Modify FlexCover to be able to output a report format that Hudson understands</li>
</ol>
<p>Creating a plugin for Hudson certainly seemed like a possibility, but the plugins for EMMA and Cobertura were already there and stable, so it seemed like it would be much simpler to try and create a code coverage report in a format one of these plugins would understand. Creating an XSLT would work for this, but I&#8217;m not an XML guroid, so I figured I&#8217;d go down the route of the simplest thing that would work for me and <del>hack</del> extend flexcover to be able to output EMMA formatted code coverage reports.<br />
As it turns out this was a pretty simple job, and after a few hours work I managed to create a patch that allows you to output .cvr or EMMA reports with an additional commandline argument. Alex, Joe and I have talked and although my way of doing it works, it is not designed to be scalable or modular to support more formats. They are incorporating the patch, but will probably rework it with these things in mind. They are super busy guys and it wont happen quickly; if you want to in the meantime you can grab the patch from here, but bear in mind it is offered with absolutely no warranties or support <img src="http://eyefodder.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<h4>Installation</h4>
<p>First thing you need to do is checkout the FlexCover code from Google code  (http://flexcover.googlecode.com/svn/trunk/CoverageViewer) and patch it with the file attatched. The patch is created from the project level down. To do this, you can right click the file from within Eclipse and select &#8216;Team&gt;Apply Patch&#8230;&#8217; Follow the instructions and you should be good to go&#8230;</p>
<h4>Usage</h4>
<p>In order to write out the code coverage report file with the viewer, you need to supply the commandline argument:</p>
<pre class="brush: bash; title: ; notranslate">-output /full/path/to/my/flexcoverreport.xml</pre>
<p>This functionality is unchanged, but now you can also specify an EMMA formatted file using the following:</p>
<pre class="brush: bash; title: ; wrap-lines: true; notranslate">-emma-report /full/path/to/my/EmmaReportName.xml</pre>
<p>And that&#8217;s about it! My next post covers the challenges I had integrating this into my build process, and how I overcame them&#8230;</p>
<p><a href='http://www.eyefodder.com/downloads/emmaReportPatch2.txt'>Download patch file</a></p>
<h3>Update</h3>
<p>Sorry this has taken so long to get together, and work out what was going on. I got swamped under a tonne of work, and neglected to update this <img src="http://eyefodder.com/wp-includes/images/smilies/icon_sad.gif" alt=":(" class="wp-smiley" /></p>
<p>The link above is for an updated patch file (and note &#8211; I did this patch from the root level of the project), and for your pleasure below is the infamous missing class. I had to hunt through my old email as my old dev machine died a way back and appalingly I didn&#8217;t have the file under source control (I think it&#8217;s because I was patching someone elses repository). Anyhoo &#8211; enough excuses; here is the missing class: <a href='http://www.eyefodder.com/downloads/EMMAReportAdapter.as'>now renamed EMMAReportAdapter</a></p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2009/07/flex_code_coverage_process_par.html">Code Coverage with Flex &#8211; creating EMMA formatted reports</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2009/07/flex_code_coverage_process_par.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FlexUnit eclipse plugin alpha</title>
		<link>http://eyefodder.com/2007/08/flexunit_eclipse_plugin_alpha.html</link>
		<comments>http://eyefodder.com/2007/08/flexunit_eclipse_plugin_alpha.html#comments</comments>
		<pubDate>Thu, 30 Aug 2007 07:26:37 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>
		<category><![CDATA[Test Driven Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=30</guid>
		<description><![CDATA[<p>I&#8217;ve been kind of quiet recently for three reasons: Its summer Work has been insanely busy I&#8217;ve been beavering away on a new plugin for eclipse The plugin is designed with one key goal in mind: shortening the develop-test feedback loop. It integrates eclipse and the flexunit framework to make our lives as developers easier. [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/08/flexunit_eclipse_plugin_alpha.html">FlexUnit eclipse plugin alpha</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been kind of quiet recently for three reasons:</p>
<ul>
<li>Its summer</li>
<li>Work has been insanely busy</li>
<li>I&#8217;ve been beavering away on a new plugin for eclipse</li>
</ul>
<p>The plugin is designed with one key goal in mind: shortening the develop-test feedback loop. It integrates eclipse and the flexunit framework to make our lives as developers easier.<br />
The plan is to release the plugin on <a href="http://labs.adobe.com/">labs</a> as soon as possible (I&#8217;m about to go on holiday for a couple of weeks so it&#8217;ll be October at the earliest&#8230;) but I thought I&#8217;d give you an early heads-up on what I&#8217;ve been doing when its been too hot to walk the New York streets&#8230;</p>
<p><span id="more-30"></span><br />
So, here&#8217;s what I&#8217;ve done so far:</p>
<ul>
<li>Modded the flexunit visual layout to work better in an IDE window</li>
<li>Setup the plugin to switch test runner when you switch between projects</li>
<li>Modded the flexunit swf to make it easier to re-run the test by clciking on the bar</li>
<li>Re-run the test when the test harness is recompiled</li>
<li>Set it up so that the developer can run a subset of tests</li>
<li>Set it up so that the test harness mxml is templated and can be distinct per project</li>
</ul>
<p>Plans for the future:</p>
<ul>
<li>integrate more tightly with CI build processes</li>
<li>autogenerate ANT build script</li>
<li>ability to choose tests on a per-method rather than per-test class basis</li>
<li>Incorporate other very cool stuff that flexunit has coming down the line</li>
</ul>
<p>So, for now we are planning to have an internal release; the plugin is definitely alpha and I&#8217;d like to keep it  to a limited group to iron out bugs, tighten up my bad Java and find out what a cross-section of our developers need. The plan is to release internally to Adobe Consulting, but if you are a forgiving and patient person who could really benefit from this, drop me a note and we can chat&#8230;</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/08/flexunit_eclipse_plugin_alpha.html">FlexUnit eclipse plugin alpha</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2007/08/flexunit_eclipse_plugin_alpha.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Continuous Integration with Flex &#8211; a better log parser</title>
		<link>http://eyefodder.com/2007/06/continuous_integration_with_fl_7.html</link>
		<comments>http://eyefodder.com/2007/06/continuous_integration_with_fl_7.html#comments</comments>
		<pubDate>Wed, 13 Jun 2007 10:01:34 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=28</guid>
		<description><![CDATA[<p>About a year ago, I posted a six part series explaining how to set up a continuous integration process for your Flex projects. Since then I have been refining the process when I have had a spare moment. One of the hassles I found when trying to setup continuous integration on a new machine was [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/06/continuous_integration_with_fl_7.html">Continuous Integration with Flex &#8211; a better log parser</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>About a year ago, I posted a six part series explaining how to set up a <a title="Continuous Integration with Flex – Introduction" href="http://www.eyefodder.com/2006/05/continuous_integration_with_fl.html">continuous integration</a> process for your Flex projects. Since then I have been refining the process when I have had a spare moment. One of the hassles I found when trying to setup continuous integration on a new machine was getting the <a title="Continuous Integration with Flex – Part 4" href="http://www.eyefodder.com/2006/05/continuous_integration_with_fl_4.html">python based flash log parser</a> working. I decided to remove the python dependency altogether and create a jar that parses the flash logs.</p>
<p><span id="more-28"></span><br />
So, grab the <a href="http://www.eyefodder.com/blog/downloads/FlashLogParser.jar.zip">jar from here</a> and unzip it to your externals/lib directory. Then add the following properties to your build:</p>
<pre class="brush: xml; title: ; wrap-lines: true; notranslate">&lt;property name=&quot;logParser&quot; value=&quot;${lib}/FlashLogParser.jar&quot;/&gt;
&lt;property name=&quot;flashStatus.location&quot; value=&quot;${logs}/status.txt&quot;/&gt;
&lt;property name=&quot;flashOutput.location&quot; value=&quot;${logs}/TEST-testOutput.xml&quot;/&gt;
</pre>
<p>Then, change your parseFlashLog target to look like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;target name=&quot;parseFlashLog&quot; description=&quot;parses flash log&quot; depends=&quot;clean&quot; &gt;
&lt;java jar=&quot;${logParser}&quot; failonerror=&quot;true&quot; fork=&quot;true&quot;&gt;
&lt;arg line=&quot;'${flashlog.location}'&quot;/&gt;
&lt;arg line=&quot;'${flashStatus.location}'&quot;/&gt;
&lt;arg line=&quot;'${flashOutput.location}'&quot;/&gt;
&lt;/java&gt;
&lt;/target&gt;
</pre>
<p>Now you should be good to go&#8230;<br />
In my next post I am going to do a full dissection of my latest build file &#8211; I have spent some time refining it over the last year, and I think its probably helpful to spend some time looking at it bit by bit&#8230;</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/06/continuous_integration_with_fl_7.html">Continuous Integration with Flex &#8211; a better log parser</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2007/06/continuous_integration_with_fl_7.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CruiseControl on the Mac &#8211; modifying the build script to work x-platform</title>
		<link>http://eyefodder.com/2007/06/cruisecontrol_on_the_mac_modif.html</link>
		<comments>http://eyefodder.com/2007/06/cruisecontrol_on_the_mac_modif.html#comments</comments>
		<pubDate>Tue, 12 Jun 2007 16:10:22 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>
		<category><![CDATA[Test Driven Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=27</guid>
		<description><![CDATA[<p>So, I thought I was doing pretty well, getting svn working on the mac, installing cruisecontrol for my continuous integration, even getting SCPlugin working with unsigned certificates. Then I tried to run my ant build, and ended up having all sorts of problems getting my mac debug player to run. Some investigating and help from [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/06/cruisecontrol_on_the_mac_modif.html">CruiseControl on the Mac &#8211; modifying the build script to work x-platform</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>So, I thought I was doing pretty well, getting svn working on the mac, installing <a href="http://cruisecontrol.sourceforge.net/overview.html">cruisecontrol</a> for my continuous integration, even getting <a href="http://scplugin.tigris.org/servlets/ProjectProcess?pageID=rgnEkt">SCPlugin</a> working with unsigned certificates. Then I tried to run my ant build, and ended up having all sorts of problems getting my mac debug player to run. Some investigating and help from the ANT folks later, and I have a solution</p>
<p><span id="more-27"></span><br />
So, when I ran my ant build, all went well until the <code>runTest</code> target executed (or at least tried to execute). I got the following build error:</p>
<pre class="brush: java; title: ; wrap-lines: true; notranslate">
Execute failed: java.io.IOException: debugPlayerMac.app cannot execute
</pre>
<p>You see the problem is that on a mac, the standalone player (like other applications on the Mac) is actually a folder containing all sorts of cleverness inside. Ant doesn&#8217;t know how to execute a folder, so I was a bit stuck. Until, after lots of digging, I found the answer in an old <a href="http://osflash.org/">osflash</a> mailing list <a href="http://readlist.com/lists/osflash.org/osflash/0/1908.html">archive</a>. Basically I have to use the &#8216;open&#8217; command to launch the app &#8211; something like this:</p>
<p>&nbsp;</p>
<pre class="brush: xml; title: ; notranslate">&lt;exec executable=&quot;open&quot;&gt;
&lt;arg line=&quot;${pathToFlashPlayer}&quot;/&gt;
&lt;arg line=&quot;${pathToSWFToPlay}&quot;/&gt;
&lt;/exec&gt;</pre>
<p>I tried this, and it worked nicely. The problem is that my ant build needs to wait until the test harness runs and closes the player before reading the log and parsing the results for cruisecontrol to consume. In the ant script above, the open command only stalls the ant script until it has finished doing its opening magic, so ant gets upset as the test results haven&#8217;t been written yet. I slept on this, then couldn&#8217;t think of an answer so I sent an email to the <a href="http://www.nabble.com/Running-.app-on-Mac-OSX-tf3908536.html">ant users </a> mailing list. Mere minutes later I got a <a href="http://www.nabble.com/Running-.app-on-Mac-OSX-tf3908536.html">reply</a> that helped me work out how to crack this.<br />
Basically, ant has the ability to run two threads, and move on when they are both complete. So in one thread we launch the player, and in another thread we first wait for the file to be available, then we do a check to see if it contains what we want (I am testing against the flag <code>-----------------TESTRUNNEROUTPUTENDS----------------</code> which I used in my result printer).  It worked like a charm:</p>
<pre class="brush: xml; title: ; notranslate">&lt;target name=&quot;runTest&quot; description=&quot;runs the test harness&quot; depends=&quot;compileTest&quot;&gt;
&lt;parallel&gt;
&lt;exec executable=&quot;open&quot; spawn=&quot;no&quot;&gt;
&lt;arg line=&quot;${debugPlayer}&quot;	/&gt;
&lt;arg line=&quot;'${testHarness.swf}'&quot;/&gt;
&lt;/exec&gt;
&lt;sequential&gt;
&lt;waitfor&gt;
&lt;available file=&quot;${flashlog.location}&quot;/&gt;
&lt;/waitfor&gt;
&lt;waitfor&gt;
&lt;isfileselected file=&quot;${flashlog.location}&quot;&gt;
&lt;contains text=&quot;-----------------TESTRUNNEROUTPUTENDS----------------&quot;/&gt;
&lt;/isfileselected&gt;
&lt;/waitfor&gt;
&lt;/sequential&gt;
&lt;/parallel&gt;
&lt;/target&gt;
</pre>
<p>The last step to making this properly cross platform for cruisecontrol was to have the right <code>&lt;exec&gt;</code> command called depending on the OS. Fortunately there is an <code>os</code> attribute you can specify on <code>&lt;exec&gt;</code> and the task will only run if the os matches the platform you are running the task on. A few minutes later, I had my amended runTest target:</p>
<pre class="brush: xml; title: ; notranslate">&lt;target name=&quot;runTest&quot; description=&quot;runs the test harness&quot; depends=&quot;compileTest&quot;&gt;
&lt;parallel&gt;
&lt;exec executable=&quot;${debugPlayerWin}&quot; spawn=&quot;no&quot; os=&quot;Windows XP&quot;&gt;
&lt;arg line=&quot;'${testHarness.swf}'&quot;/&gt;
&lt;/exec&gt;
&lt;exec executable=&quot;open&quot; spawn=&quot;no&quot; os=&quot;Mac OS X&quot;&gt;
&lt;arg line=&quot;${debugPlayerMac}&quot;	/&gt;
&lt;arg line=&quot;'${testHarness.swf}'&quot;/&gt;
&lt;/exec&gt;
&lt;sequential&gt;
&lt;waitfor&gt;
&lt;available file=&quot;${flashlog.location}&quot;/&gt;
&lt;/waitfor&gt;
&lt;waitfor&gt;
&lt;isfileselected file=&quot;${flashlog.location}&quot;&gt;
&lt;contains text=&quot;-----------------TESTRUNNEROUTPUTENDS----------------&quot;/&gt;
&lt;/isfileselected&gt;
&lt;/waitfor&gt;
&lt;/sequential&gt;
&lt;/parallel&gt;
&lt;/target&gt;
</pre>
<p>I&#8217;m planning to post my completed project build script and step through it in more detail than I did <a href="http://www.eyefodder.com/blog/2006/05/continuous_integration_with_fl_2.shtml">previously</a>. I&#8217;ve updated it quite a lot in the last year, and so far, I think its a lot neater. Before I do that, I&#8217;m going to post about my removing the python dependency from my continuous integration process.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2007/06/cruisecontrol_on_the_mac_modif.html">CruiseControl on the Mac &#8211; modifying the build script to work x-platform</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2007/06/cruisecontrol_on_the_mac_modif.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinkBar tied to component states</title>
		<link>http://eyefodder.com/2006/08/flex_linkbar_state_binding.html</link>
		<comments>http://eyefodder.com/2006/08/flex_linkbar_state_binding.html#comments</comments>
		<pubDate>Wed, 16 Aug 2006 12:57:27 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=22</guid>
		<description><![CDATA[<p>I just did a quick extension of the Flex LinkBar so you can tie it to the states of a component. I haven&#8217;t tested it throughly yet, so if you find anything weird in there, let me know&#8230; usage: you can download the code here, or just cut and paste from below:</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/flex_linkbar_state_binding.html">LinkBar tied to component states</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>I just did a quick extension of the Flex LinkBar so you can tie it to the states of a component. I haven&#8217;t tested it throughly yet, so if you find anything weird in there, let me know&#8230;<br />
usage:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;components:StateLinkBar dataProvider=&quot;{states}&quot;/&gt;
</pre>
<p><span id="more-22"></span><br />
you can <a href="http://www.eyefodder.com/downloads/StateLinkBar.as">download the code here</a>, or just cut and paste from below:</p>
<pre class="brush: as3; title: ; notranslate">
package view.components
{
	import flash.display.DisplayObject;
	import flash.events.MouseEvent;
	import mx.controls.LinkBar;
	import mx.core.UIComponent;
	import mx.events.StateChangeEvent;
	public class StateLinkBar extends LinkBar
	{
		private var measurementHasBeenCalled:Boolean = false;
		private var __pendingStates:Array;
		private var __states:Array;
		public function StateLinkBar()
		{
			super();
			labelField = &quot;name&quot;;
		}
		override public function set dataProvider(value:Object):void{
			super.dataProvider = value;
			if(value==parentDocument.states){
				setStateListeners(value as Array);
			}
		}
		override protected function commitProperties():void{
			super.commitProperties();
			if(!measurementHasBeenCalled &#038;&amp; __pendingStates){
				measurementHasBeenCalled = true
				setStateListeners(__pendingStates);
			}
		}
		override protected function clickHandler(event:MouseEvent):void{
			if(__states){
				var index:int = getChildIndex(DisplayObject(event.currentTarget));
				var uic:UIComponent = parentDocument as UIComponent;
				uic.currentState = __states[index].name;
				hiliteSelectedNavItem(index);
			}
			super.clickHandler(event);
		}
		private function setStateListeners(arr:Array):void{
			if(!measurementHasBeenCalled){
				__pendingStates = arr;
				invalidateProperties();
				return;
			}
			var p:UIComponent = parentDocument as UIComponent;
			if(p !=null){
				__states = arr;
				//setup listeners
				p.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE,onParentStateChange);
			}
		}
		private function onParentStateChange(event:StateChangeEvent):void{
			var newState:String = event.newState;
			if(__states){
				var max:Number = __states.length;
				for (var i:Number=0;i&lt;max;++i){
					if(__states[i].name==newState){
						selectedIndex = i
						hiliteSelectedNavItem(i);
					}
				}
			}
		}
	}
}
</pre>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/flex_linkbar_state_binding.html">LinkBar tied to component states</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2006/08/flex_linkbar_state_binding.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I built those firefox plugins to google search a site</title>
		<link>http://eyefodder.com/2006/08/how_i_built_those_firefox_plug.html</link>
		<comments>http://eyefodder.com/2006/08/how_i_built_those_firefox_plug.html#comments</comments>
		<pubDate>Thu, 10 Aug 2006 16:04:43 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Agile Software Development]]></category>
		<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=21</guid>
		<description><![CDATA[<p>Ok, so Mathias just asked how I managed to get the firefox search plugins to just search one site. I started to write a comment explaining it, but got a little long, so here&#8217;s Paul&#8217;s quick n dirty ghetto way of getting a firefox plugin to search just one site&#8230; So basically, I got started [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/how_i_built_those_firefox_plug.html">How I built those firefox plugins to google search a site</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ok, so Mathias just asked how I managed to get the <a title="Finding Flex Facts Faster" href="http://www.eyefodder.com/2006/08/finding_flex_facts_faster.html">firefox search plugins</a> to just search one site. I started to write a comment explaining it, but got a little long, so here&#8217;s Paul&#8217;s quick n dirty ghetto way of getting a firefox plugin to search just one site&#8230;</p>
<p><span id="more-21"></span></p>
<p>So basically, I got started by looking at the <a href="http://mycroft.mozdev.org/deepdocs/quickstart.html#firstplugin">mycroft quickstart guide to building your first search plugin</a>.  That helped me to understand the basics of what I wanted to do, but really all I needed was a google search restricted to one site, just like typing site:livedocs.macromedia.com/flex/2 [myterm] into google.</p>
<p>The firefox search plugin format is pretty simple. Basically, you tell it what url to use, and then you can append querystring values on to the end of it using the following syntax:</p>
<pre class="brush: xml; title: ; notranslate">&lt;input name=&quot;parameterName&quot; value=&quot;parameterValue/&gt;</pre>
<p>Then for the user input, you simple use the value &#8216;user&#8217; instead of writing value=&#8217;blah&#8217;. So, if you take a look at the google search plugin source (should be found somewhere like &#8216;C:Program FilesMozilla Firefoxsearchpluginsgoogle.src&#8217;) you will see a node that looks like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;input name=&quot;q&quot; user&gt;</pre>
<p>So, what I actually wanted to do is append &#8216;site:livedocs.macromedia.com/flex/2&#8242; to my &#8216;q&#8217; querystring value that the user enters. After a bit of digging, I found that you can repeat input nodes of the same &#8216;name&#8217; and firefox simply joins these values together. so, in order to search just in the livedocs site, my input nodes looked like this:</p>
<pre class="brush: xml; title: ; notranslate">&lt;input name=&quot;q&quot; value=&quot;site:livedocs.macromedia.com/flex/2 &quot;/&gt;
&lt;input name=&quot;q&quot; user&gt;</pre>
<p>You should be able to find my flex plugin source files in a location similar to this:</p>
<pre class="brush: bash; title: ; notranslate">C:Documents and Settings[USERNAME]Application DataMozillaFirefoxProfilesytb1w5n7.defaultsearchplugins</pre>
<p>. If you can&#8217;t be arsed to go digging, you can download them <a href="http://www.eyefodder.com/downloads/flexcoders.src">here</a> and <a href="http://www.eyefodder.com/downloads/flex2LiveDocs.src">here</a></p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/how_i_built_those_firefox_plug.html">How I built those firefox plugins to google search a site</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2006/08/how_i_built_those_firefox_plug.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Flex Facts Faster</title>
		<link>http://eyefodder.com/2006/08/finding_flex_facts_faster.html</link>
		<comments>http://eyefodder.com/2006/08/finding_flex_facts_faster.html#comments</comments>
		<pubDate>Wed, 09 Aug 2006 16:53:59 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Flash & Actionscript]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=20</guid>
		<description><![CDATA[<p>so today, firefox decided to die a death on me. I choked it doing some Flex debugging and as a result I lost the functionality in my search bar. This got me thinking about what would really be useful for me is a way to search the places I usually go for flex info &#8211; [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/finding_flex_facts_faster.html">Finding Flex Facts Faster</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>so today, firefox decided to die a death on me. I choked it doing some Flex debugging and as a result I lost the functionality in my search bar. This got me thinking about what would really be useful for me is a way to search the places I usually go for flex info &#8211; the livedocs and the flexcoders mailing list. What I&#8217;ve ended up with is a quick way to search both these resources at the same time&#8230;</p>
<p><span id="more-20"></span></p>
<p>So, the first thing I did was to create a couple of specialised search bar engines using google. My first thought was to try and get google to search two site: locations in the same query, but it just wont let you&#8230; as it turned out, the solution I came up with I think is more usable.</p>
<p>The first thing you will want to do is install the search plugins. You can get the <a href="addEngine('flexcoders','png','Flex',0)">flexcoders one here</a>, and the <a href="addEngine('flex2LiveDocs','png','Flex',0)">livedocs one here.</a> When you have installed them, restart firefox and your search engines should now appear in the searchbar at the top right of your window</p>
<p>The next thing I wanted to do is combine the functionality of these two together. After a few minutes digging, I found that the advanced search sidebar plugin for firefox does exactly what I need it to do. If you dont have it, you can <a href="https://addons.mozilla.org/firefox/1271/" target="_blank">get it here</a>. When you have the search sidebar installed, open it up and in the &#8216;within&#8217; dropdown, select &#8216;Edit Categories&#8230;&#8217; Under the category dropdown, click New&#8230; create a category called &#8216;Flex&#8217; and add the two flex search engines.</p>
<p>&nbsp;</p>
<p>Hey presto, you can now search across livedocs and flexcoders in one action&#8230;</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/08/finding_flex_facts_faster.html">Finding Flex Facts Faster</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2006/08/finding_flex_facts_faster.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>FlexUnit / ASUnit deathmatch results</title>
		<link>http://eyefodder.com/2006/07/flexunit_asunit_deathmatch_res.html</link>
		<comments>http://eyefodder.com/2006/07/flexunit_asunit_deathmatch_res.html#comments</comments>
		<pubDate>Sun, 02 Jul 2006 12:08:53 +0000</pubDate>
		<dc:creator><![CDATA[Paul Barnes-Hoggett]]></dc:creator>
				<category><![CDATA[Flash & Actionscript]]></category>
		<category><![CDATA[Test Driven Development]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=19</guid>
		<description><![CDATA[<p>As I mentioned a few posts ago, I am looking into how asunit and flexunit can fit into our continuous integration set up. The move into AS3 has given me an opportunity to reassess how the 2 frameworks fit my/our needs. The prior post set out the criteria I was testing against &#8211; here is [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/07/flexunit_asunit_deathmatch_res.html">FlexUnit / ASUnit deathmatch results</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>As I mentioned a few <a href="http://www.eyefodder.com/blog/2006/06/unit_test_frameworks_for_as3_a.shtml">posts</a> ago, I am looking into how <a href="http://ww.asunit.org">asunit</a> and <a href="http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries#FlexUnit">flexunit</a> can fit into our continuous integration set up. The move into AS3 has given me an opportunity to reassess how the 2 frameworks fit my/our needs. The prior post set out the criteria I was testing against &#8211; here is what I found&#8230;</p>
<p><span id="more-19"></span></p>
<h2>Overall</h2>
<p>Both frameworks seem to have followed the junit framework, and attempted a port from java to AS3. The good thing about  this is that there are very close similarities between usage of the two frameworks, and so switching from one to the other isn&#8217;t too much of a ballache. Both setups have the notion of a testRunner and resultPrinter, and I actually found that it was a very simple affair to adapt the <a href="http://www.eyefodder.com/blog/2006/06/flexunit_for_cruise_control_xm.shtml">code I wrote to use FlexUnit with Cruise Control</a> to work with ASUnit instead.</p>
<p>I did however find a problem when using the ASUnit testListener. When you run a test, the following methods get called on any testListeners you have (in my case its the CruiseControlResultPrinter):</p>
<ol>
<li>startTest</li>
<li>If an error / failure occurs:
<ul>
<li>addError</li>
<li>addFailure</li>
</ul>
</li>
<li>endTest</li>
</ol>
<p>The problem is that when startTest gets clled, the getCurrentMethod() method of the testCase returns null instead of the testMethod that is about to be executed. If you have had a nosy at my result printer code, you will see that I need this method to return the correct value when startTest gets called so I can append a testCase node with the method name as its &#8216;name&#8217; attribute. I managed to work around this by allowing a node to be added with a &#8216;null&#8217; value for its name; then when I try and access the testcase node, it first searches for a node with a matching name attribute, then for a node with a value of null for the name. I didn&#8217;t feel very comfortable with this, as it injects a weak link in my code. However, it wasn&#8217;t enough for me to strongly favour one framework over the other yet&#8230;</p>
<p>The next problem I had with ASUnit was unfortunately for me a show stopper. One of my criteria is that I am able to execute an asynchronous test (as well as asynchronous test setup). Unfortunately I didn&#8217;t manage to find a clean solution for doing this in ASUnit. There was a <a href="http://sourceforge.net/mailarchive/forum.php?thread_id=14658324&amp;forum_id=42743">discussion on the mailing list </a>about how one might go about doing this, but unfortunately I couldnt find a solution that worked within my requirements. Luke made a very good point about the difference between asynchronous and event-driven, but nevertheless I still couldnt get an async test to work and correctly report back before the alltestscomplete event gets triggered with the test suite.</p>
<p>One of my other criteria was also that the framework didnt rely on Flex. For me right now, this is secondary as my current work is using Flex. However, it is still important to me to be able to have the ability to build a test suite for a flash based project. As far as I can see, the only real reliance Flexunit has on flex is the testRunner / result printer that ships with the framework. This would mean that if I needed to, I could build a flash only test runner. I think that the name flexunit doesn&#8217;t help, and if it were me, I&#8217;d be tempted to find a different name.</p>
<p>I also really like the ability to automatically create test suites that ASUnit provides. <a href="http://www.lennel.org/blog/2006/02/27/building-unit-tests-in-eclipse-from-an-ant-script-for-asunit/">Johannes pulled out the functionality for this to enable us to do this as a python script,</a> so I guess with different templates, you could get this working for flexunit.</p>
<h2>In conclusion</h2>
<p>If you have got this far, I guess you will have worked out that I will be going with flexunit for the time being. I&#8217;m kind of sad about this &#8211; I suppose I&#8217;m quite attached to ASUnit, as Ive been using it for a year and a half, and I really like the community spirit behind it. Ultimately though, it doesnt quite do what I need, and I really didnt want to get deeply under the hood of the framework code. I&#8217;m going to keep a very open mind on this decision, and see how asunit progresses. If anyone has anything to add to sway my decision one way or the other, I&#8217;d love to hear it too&#8230;</p>
<p>The post <a rel="nofollow" href="http://eyefodder.com/2006/07/flexunit_asunit_deathmatch_res.html">FlexUnit / ASUnit deathmatch results</a> appeared first on <a rel="nofollow" href="http://eyefodder.com">Eyefodder</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://eyefodder.com/2006/07/flexunit_asunit_deathmatch_res.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
