<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.23228-</id>
  <updated>2009-11-05T20:12:45Z</updated>
  <title>Comments for Unit Testing with FlexUnit (http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.23228</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=23228" title="Unit Testing with FlexUnit" />
    <published>2008-04-24T15:00:00Z</published>
    <updated>2009-07-30T20:49:24Z</updated>
    <title>Unit Testing with FlexUnit</title>
    <summary>The concept of unit testing has been around for a long time as part of the traditional Waterfall model of software development.  However, it has gained in popular recently as one of the main tenets of Extreme Programming.  In Extreme Programming you write unit tests first and then your code.  You also refactor code often as you add features.  Unit tests help find errors quickly as code is refactored and can be used as part of regression testing to make sure new code has not affected existing functionality.</summary>
    <author>
      <name>Kelly Brown</name>
      
    </author>
    
    <category term="Features" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<strong>Introduction</strong><br/>
<br/>
FlexUnit is an open source framework created by Adobe for unit testing in Flex.  It is based on the widely used JUnit testing framework for Java.  FlexUnit provides a low level automated testing system that is your first line of defense for catching bugs in your application.<br/>
<br/>
The concept of unit testing has been around for a long time as part of the traditional Waterfall model of software development.  However, it has gained in popular recently as one of the main tenets of Extreme Programming.  In Extreme Programming you write unit tests first and then your code.  You also refactor code often as you add features.  Unit tests help find errors quickly as code is refactored and can be used as part of regression testing to make sure new code has not affected existing functionality.<br/>
<br/>
Unit testing can be automated and included as part of the build process.  To facilitate automated building Adobe has created Flex related tasks for the popular Ant build tool.  Using Ant you can automatically compile and test your Flex applications.<br/>
<br/>
Unit testing is not the end all be all of testing.  It is used to catch low level errors, but there are many classes of errors that are outside its ability to detect such as integration errors, system errors, and performance issues.<br/>
<br/>
<strong>What is Unit testing?</strong><br/>
<br/>
To understand unit testing, you must first understand what a &#8220;unit&#8221; is.  A unit is the smallest piece of code that is testable.  This doesn&#8217;t mean each line of code, but a piece of code that performs a specific task.  In Flex, this means a function, or more appropriately a method since Flex/ActionScript is an object oriented language.  Unlike many other forms of software testing, unit tests are usually completed by the developer.  The developer tests code at a low level to make sure each method is performing as expected.  In theory, if each function is working properly at a low level then the higher levels of integration testing should have fewer errors.<br/>
<br/>  
<strong>Test Subject</strong><br/>
<br/>
Before we talk about how to set up FlexUnit we need something to test.  Below is a simple bank account class that will be used as an example.  The class allows you to make deposits, withdrawals, and keeps track of your balance.<br/>
<br/>
<strong>BankAccount.as</strong>
<div class="acode" style="overflow: auto; padding: 10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>
package
{
 	<span class="category1">public</span> <span class="category1">class</span> BankAccount
 	{
  		<span class="category1">var</span> <span class="category1">private</span> balance:<span class="category2">Number</span>=0;
  		
  		<span class="category1">public</span> <span class="category1">function</span> deposit(amount:<span class="category2">Number</span>){
   			balance=balance+amount;
   		}
  		
  		<span class="category1">public</span> <span class="category1">function</span> withdraw(amount:<span class="category2">Number</span>){
   			balance=balance-amount;
   		}
  		
  		<span class="category1">public</span> <span class="category1">function</span> getBalance():<span class="category2">Number</span>{
   			<span class="category1">return</span> balance;
   		}		
  	}
}</pre>
</code>

</div></div> 
<br/>
<strong>Getting Started with FlexUnit</strong><br/>
<br/>
There are four steps necessary to gett FlexUnit running in a project:<br/>
<br/>
1.	Download FlexUnit and include the library<br/>
2.	Create unit tests<br/>
3.	Create a test suite<br/>
4.	Create a test runner<br/>
<br/>
<strong>Including the FlexUnit Library</strong><br/>
<br/>
FlexUnit is available for download on Google Code at <a href="http://code.google.com/p/as3flexunitlib/" target="_blank">http://code.google.com/p/as3flexunitlib/</a>.  After you extract the file from the zip, you will find a flexunit.swc in the bin directory.  You need to add this library to your project.  If you are creating a new project you can specify libraries as part of the project creation.  On the second screen of project creation there is a Library path tab, click on this tab and then select the Add SWC button.  This will open a file dialog where you can select the SWC file.  If you have an existing project you can set the library up in the project properties.  Right click the project, select properties.  On the left hand side in the properties menu select Flex Build Path and then the Library path tab.  Use the Add SWC button to add flexunit.swc.<br/>  
<br/>
The process is simpler for Flex 3 users.  Once you have downloaded the flexunit.swc you simply copy it into the libs directory of your project.<br/>
<br/>
<strong>Create Unit Tests</strong><br/>
<br/>
Next we create our unit tests.  Our unit tests will be contained in a new class that extends the base TestCase class.  I&#8217;m going to call it BankAccountTest.  This class will contain methods with our unit tests in them.  You typically create a new method for each unit you are testing.  In this case I&#8217;ll be testing the deposit and withdraw methods of the BankAccount, so my test class method names will be testDeposit and testWithdraw.  The method names for our test methods must start with the word test.  Later on when we add the unit tests to the test suite it automatically looks for method names that begin with the word test.  If your method names do not begin with the word test they will not be run.<br/>
<br/>
We know we are going to have two test methods, but how do you actually create a unit test?  A unit test is made up of logical assertions.  If an assertion is true, the unit test passes. If an assertion is false then the unit test fails.<br/>  
<br/>
There are several assertion methods available for our unit tests such as: assertTrue, assertFalse, assertNull, assertEquals, and several others.  The methods are all similar and take an optional text message and Boolean test of some type.  Although text messages are optional, it&#8217;s a good idea to use them to help you quickly locate which test failed.  If the result of the Boolean test is true, the assertion succeeds, and if not it fails.  For example, if I create a BankAccount and deposit fifty dollars, then my balance should be fifty dollars.  The unit test for this case is:<br/>
<br/>
<div class="acode" style="overflow: auto; padding: 10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>
<span class="category1">var</span> bankAccount:BankAccount=<span class="category1">new</span> BankAccount();
bankAccount.deposit(50);
assertTrue(&amp;#8220;Balance <span class="category1">on</span> a <span class="category1">new</span> account after 50 deposit is 50&amp;#8221;, bankAccount.getBalance() == 50);</pre>
</code>

</div></div> 
<br/>
This test is pretty straight forward.  If my balance isn&#8217;t 50 after I deposit 50, then either I have a problem with deposit method, or my getBalance method.  For this sample I only have a few assertions, but you typically want to cover as many cases as possible.  This is what my final test class looks like with a few more tests added:<br/>
<br/>
<strong>BankAccountTest.as</strong><br/>
<br/>
 <div class="acode" style="overflow: auto; padding: 10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>
package {
  
  	<span class="category1">import</span> flexunit.framework.TestCase;
  	
  	<span class="category1">public</span> <span class="category1">class</span> BankAccountTest <span class="category1">extends</span> TestCase {
    		  		
    		<span class="blockcomment">/**
    		 * Test Deposit
    		 */</span>
    		<span class="category1">public</span> <span class="category1">function</span> testDeposit():<span class="category1">void</span> {
   			<span class="category1">var</span> bankAccount:BankAccount=<span class="category1">new</span> BankAccount();
   			bankAccount.deposit(50);
   			assertTrue("<span class="quote">Balance on a new account after 50 deposit is 50</span>", bankAccount.getBalance() == 50);
   			bankAccount.deposit(25);
   			assertEquals("<span class="quote">Balance after 50 deposit and another 25 deposit is 75</span>", 75,bankAccount.getBalance());
      			
      		}
    		
    		<span class="blockcomment">/**
    		 * Test withdraw
    		 */</span>
    		<span class="category1">public</span> <span class="category1">function</span> testWithdraw():<span class="category1">void</span> {
   			<span class="category1">var</span> bankAccount:BankAccount=<span class="category1">new</span> BankAccount();
   			bankAccount.deposit(100);
   			bankAccount.withdraw(50);
   			assertTrue("<span class="quote">Balance on a new account after 100 deposit and a 50 withdraw is 50</span>", bankAccount.getBalance() == 50);
   			
   
      		}
    		
    	}
}</pre>
</code>

</div></div> 
<br/>
<strong>Creating the Test Suite and Test Runner</strong><br/>
<br/>
Now that we have our unit tests we are going to create a test suite and our test runner.  We will do this in a Flex file instead of an ActionScript class.  First we create a simple Flex application which only has one component, TestRunnerBase, which is part of the FlexUnit library.  Make sure you include the flexunit name space flexunit.flexui.* in your application so you can access the GUI components from the library.  Next we must add functions to set up the test suite and start the testing.  We create a createSuite method to create a new TestSuite object and adds all of our TestCase classes to it using the addTestSuite method.  The addTestSuite method uses reflection to find all the methods in the class that start with the name test and adds them to list of tests to run.  We only have one TestCase class (the BankAccountTest.as we created above), but it you had others they would go in this function as well.  Finally we create an onCreationComplete method that is called on the creationComplete of our main application.  This function sets the test property of the TestRunnerBase object to our test suite that is returned by the createSuite method.  Now we start the testing by calling the startTest method on the TestRunnerBase component.  The code should look like:<br/>
<br/>
<strong>TestRunner.mxml</strong><br/>
<br/>
 <div class="acode" style="overflow: auto; padding: 10px;" ><div style="overflow-x: visible;">
<code language="perl">
<pre>
&lt;?xml <span class="category2">version</span>="<span class="quote">1.0</span>" encoding="<span class="quote">utf-8</span>"?&gt;
&lt;mx:<span class="category2">Application</span> xmlns:mx="<span class="quote">http://www.adobe.com/2006/mxml</span>" xmlns="<span class="quote">*</span>"
				xmlns:flexunit="<span class="quote">flexunit.flexui.*</span>"
				creationComplete="<span class="quote">onCreationComplete()</span>"&gt;
	
	&lt;mx:Script&gt;
		&lt;![CDATA[
			<span class="category1">import</span> flexunit.framework.TestSuite;
			
			<span class="linecomment">// Create the test suite and run the tests</span>
			<span class="category1">private</span> <span class="category1">function</span> onCreationComplete():<span class="category1">void</span>
			{
  				testRunner.test = createSuite();
  				testRunner.startTest();
  			}
			
			<span class="linecomment">// Creates the test suite to run</span>
			<span class="category1">private</span> <span class="category1">function</span> createSuite():TestSuite {
  				<span class="category1">var</span> testSuite:TestSuite = <span class="category1">new</span> TestSuite();
  				
  				testSuite.addTestSuite( BankAccountTest );
  				
  				<span class="category1">return</span> testSuite;
  			}	
		]]&gt;
	&lt;/mx:Script&gt;

	&lt;!-- FlexUnit GUI Component --&gt;
	&lt;flexunit:TestRunnerBase id="<span class="quote">testRunner</span>" <span class="category2">width</span>="<span class="quote">100%</span>" <span class="category2">height</span>="<span class="quote">100%</span>" /&gt;
&lt;/mx:<span class="category2">Application</span>&gt;</pre>
</code>

</div></div> 
<br/>
Now we are ready to run our test cases.  The following image shows an example of the TestRunner GUI when it is run.<br/>
<br/>
<br/>
<div class="ap_c"style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/03/unit_testing_with_flexunit/fig1unit.png" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/03/unit_testing_with_flexunit/fig1unit.png" alt="fig1unit.png" title="Click to enlarge" width="400"/></a><div class="apcaption">A Successful Test</div></div>
<br/>
Because our tests are simple and run fast, the progress bar is filled almost immediately. When slower tests are run the progress bar will fill as the tests run.  It will also display the number of tests that have been run and the total number of tests.  If a test fails, the progress bar turns red and you will see a stack trace of the failed test.  The default view shows tests that have failed, but you can also click the All Tests tab to see a list of all the tests that have run.<br/>
<br/>
<br/>
<div class="ap_c"style="margin: 16px;"><a href="http://www.insideria.com/upload/2008/03/unit_testing_with_flexunit/fig2unit.png" class="highslide" onclick="return hs.expand(this)"><img src="http://www.insideria.com/upload/2008/03/unit_testing_with_flexunit/fig2unit.png" alt="fig2unit.png" title="Click to enlarge" width="400"/></a><div class="apcaption">A Unsuccessful Test</div></div>
<br/>
For this run I changed the first unit test to check for an invalid balance:<br/>
<br/>
assertTrue("Balance on a new account after 50 deposit is 50", bankAccount.getBalance() == 40);<br/>
<br/>
This of course is incorrect and the assertion generates an error.  You can see the stack trace for the test that failed in the right hand text area of the GUI.  In the first line you can see the text from our assertion:<br/>
<br/>
Error: Balance on a new account after 50 deposit is 50 - expected true but was false<br/>
<br/>
Since no line number is included in the stack trace, you should make sure you use good descriptions in your assertion text.  Once an assertion in a test method fails, the method is considered to have failed and no further tests are run in that method.  However, any other test methods (even from the same class will) still run.<br/>
<br/>
<strong>Conclusion</strong><br/>
<br/>
FlexUnit provides an automated way to test code at a low level.  It provides a framework to automate testing that would otherwise be very time consuming and helps find bugs much earlier in the development process.  The example in this article introduces the basics of unit testing with Flex, but it opens the door to many interesting possibilities such as test driven development and automated testing during the build process with tools such as ANT.<br/>
<br/>
<strong>Additional Resources</strong><br/>
<br/>
<strong>FlexUnit on Google Code</strong><br/>
<a href="http://code.google.com/p/as3flexunitlib/" target="_blank">http://code.google.com/p/as3flexunitlib/</a><br/>
<br/>
<strong>Extreme Programming</strong><br/>
<a href="http://www.extremeprogramming.org/" target="_blank">http://www.extremeprogramming.org/</a><br/>
<br/>
<strong>Ant</strong><br/>
<a href="http://ant.apache.org/" target="_blank">http://ant.apache.org/</a><br/>
<br/>
<strong>Flex Ant Tasks</strong><br/>
<a href="http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks" target="_blank">http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks
</a>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2016762</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2016762" />
    <title>Comment from Mansour Raad on 2008-04-24</title>
    <author>
        <name>Mansour Raad</name>
        <uri>http://thunderheadxpler.blogspot.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://thunderheadxpler.blogspot.com/">
        <![CDATA[<p>check out <a href="http://thunderheadxpler.blogspot.com/2008/04/flexunit-ant-air.html">http://thunderheadxpler.blogspot.com/2008/04/flexunit-ant-air.html</a> to run flexunit in a CI environment.</p>]]>
    </content>
    <published>2008-04-24T21:08:59Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2017352</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2017352" />
    <title>Comment from Shreepad Patankar on 2008-05-25</title>
    <author>
        <name>Shreepad Patankar</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Is there any testing tool to test accessibility of Flex Components ?</p>]]>
    </content>
    <published>2008-05-26T05:46:56Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2018952</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2018952" />
    <title>Comment from Shreepad Patankar on 2008-07-17</title>
    <author>
        <name>Shreepad Patankar</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>aDesigner is tool developed by IBM Japan supports Flash components. Using this tool you can report all errors for Sec508</p>]]>
    </content>
    <published>2008-07-17T12:38:11Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2021036</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2021036" />
    <title>Comment from sban on 2008-08-25</title>
    <author>
        <name>sban</name>
        <uri>http://blog.sban.com.cn/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://blog.sban.com.cn/">
        <![CDATA[<p><a href="http://blog.sban.com.cn/2008/08/26/flex-unittest.html">http://blog.sban.com.cn/2008/08/26/flex-unittest.html</a></p>]]>
    </content>
    <published>2008-08-25T18:20:27Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2042141</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2042141" />
    <title>Comment from Hardi on 2008-09-01</title>
    <author>
        <name>Hardi</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Why do I get an error<br />
1046: Type was not found or was not a compile-time constant: TestSuite<br />
on line 18<br />
  private function createSuite():TestSuite {</p>]]>
    </content>
    <published>2008-09-02T01:06:37Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2046070</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2046070" />
    <title>Comment from Radha on 2008-11-11</title>
    <author>
        <name>Radha</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I cannot see the stack trace after a failure  in the allTest tab.Do i have to include any trace statements<br />
Thanks </p>]]>
    </content>
    <published>2008-11-11T12:55:59Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2048124</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2048124" />
    <title>Comment from Gary Kaizer on 2008-12-04</title>
    <author>
        <name>Gary Kaizer</name>
        <uri>http://www.google.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.google.com">
        <![CDATA[<p>This FlexUnit walkthrough got me set up in 15 minutes. </p>

<p>This works suprisingly well with WebService integration and UI testing too.</p>]]>
    </content>
    <published>2008-12-04T15:13:17Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2048472</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2048472" />
    <title>Comment from Prakash on 2008-12-09</title>
    <author>
        <name>Prakash</name>
        <uri>http://scientyworld.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://scientyworld.com">
        <![CDATA[<p>Hi Folks,</p>

<p>Is there example of integrating flexunit with maven build task?</p>

<p><br />
Thanks</p>]]>
    </content>
    <published>2008-12-09T12:26:13Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2052726</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2052726" />
    <title>Comment from Pushpendra on 2009-02-10</title>
    <author>
        <name>Pushpendra</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi Friends,<br />
Even I cannot see the stack trace after a failure in the allTest tab. Do i have to include any trace statements.<br />
Thanks </p>]]>
    </content>
    <published>2009-02-10T12:08:28Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2053575</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2053575" />
    <title>Comment from JAVA&apos;s Before annotation on 2009-02-18</title>
    <author>
        <name>JAVA&apos;s Before annotation</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi, is there anything similar to java "Before" or "Before class" annotation?<br />
I need to unit test my class SettingsFileReader but before test starts I need to copy my settingFile.xml to the right possition for tester cllass.<br />
How can I doo it?</p>

<p>Thanks, <br />
pyso</p>]]>
    </content>
    <published>2009-02-18T17:03:53Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2056827</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2056827" />
    <title>Comment from Ricki on 2009-03-31</title>
    <author>
        <name>Ricki</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Very good start, awesome little tool.<br />
The thing that makes me love using JUnit in Java and eclipse is the "quick fix".</p>

<p>That means that you write your unit tests before you write a single line of code, then when testing the unit test will fail, but ask if it should generate all the methods and properties you referenced in your test case. Select "Yes" and it will generate the body of the code for you.</p>

<p>This actually means that JUnit testing is faster than writing the code yourself!</p>

<p>I want that in Flex ;)</p>]]>
    </content>
    <published>2009-03-31T11:29:41Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2059080</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2059080" />
    <title>Comment from Tyler Egeto on 2009-05-07</title>
    <author>
        <name>Tyler Egeto</name>
        <uri>http://www.tyleregeto.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.tyleregeto.com">
        <![CDATA[<p>Little late getting around to reading this, but thanks a lot, very helpful introduction.</p>]]>
    </content>
    <published>2009-05-08T04:59:56Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2059159</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2059159" />
    <title>Comment from Srini on 2009-05-08</title>
    <author>
        <name>Srini</name>
        <uri>http://www.srinivaskusunam.com/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.srinivaskusunam.com/">
        <![CDATA[<p>Nice introduction. Thanks for writing this.</p>]]>
    </content>
    <published>2009-05-08T20:36:13Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2059480</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2059480" />
    <title>Comment from Apollo on 2009-05-12</title>
    <author>
        <name>Apollo</name>
        <uri>http://imapollo.blogbus.com</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://imapollo.blogbus.com">
        <![CDATA[<p>Thanks for your introduction.</p>]]>
    </content>
    <published>2009-05-13T02:33:00Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2059630</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2059630" />
    <title>Comment from StanB on 2009-05-14</title>
    <author>
        <name>StanB</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Great article.  Simple and well designed example.  Two comments: <br />
* use assertEquals() whenever possible instead of assertTrue().  Out is more meaningful. <br />
* I'd love to have in FlexBuilder, just as Rickie said above, the quick fix functionality as it is in Java (for example: "Do you want to add a method getBalance() in BankAccount?").  It does speed up development quite a bit when you start adding a new feature by writing a test.  </p>]]>
    </content>
    <published>2009-05-14T16:47:18Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2070082</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2070082" />
    <title>Comment from StanB on 2009-08-10</title>
    <author>
        <name>StanB</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I'm not able to find how to structure a project the will have my Flex app, test and the test runner in the same Eclipse project.  It seems, an Flex project in Eclipse, using Flex Builder can have only one main app.  So, it's either my application or the test runner.  How do I solve this problem?  It seems an simple issue and people must have solved it if they use flexunit for their production development, but I'm not sure how to do it.</p>]]>
    </content>
    <published>2009-08-10T16:12:20Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2070257</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2070257" />
    <title>Comment from smarttester on 2009-08-12</title>
    <author>
        <name>smarttester</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi Folks,</p>

<p>I got this two automate flex testing tool. check the link below. </p>

<p><a href="http://www.rsdhariwal.com/2009/07/30/flex-ui-selenium-for-flex-application-testing/">http://www.rsdhariwal.com/2009/07/30/flex-ui-selenium-for-flex-application-testing/</a><br />
<a href="http://www.rsdhariwal.com/2009/07/29/testing-tool-for-flex-application/">http://www.rsdhariwal.com/2009/07/29/testing-tool-for-flex-application/</a></p>

<p>I hope you like the blog information .</p>]]>
    </content>
    <published>2009-08-12T19:36:50Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2082569</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2082569" />
    <title>Comment from Rajesh on 2009-09-03</title>
    <author>
        <name>Rajesh</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>i don't see any calls for the functions (testDeposit,testWithdraw), then how the functions have called?</p>]]>
    </content>
    <published>2009-09-04T05:38:09Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.23228-comment:2102723</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.23228" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/04/unit-testing-with-flexunit-1.html#comment-2102723" />
    <title>Comment from Renuka on 2009-09-17</title>
    <author>
        <name>Renuka</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>why i am getting this error</p>

<p>1046: Type was not found or was not a compile-time constant: TestRunnerBase</p>

<p>Renuka</p>]]>
    </content>
    <published>2009-09-17T16:10:21Z</published>
  </entry>

</feed
