4 Replies Latest reply on Jun 23, 2009 2:42 PM by doughie

    Flexunit4 + ant automation?

    cytoe

      Hi,  has anyone got Flexunit4 running from ANT where it writes a Junit report out to a file?  Using Flexunit1, I could do this using this solution: http://weblogs.macromedia.com/pmartin/archives/2006/06/flexunit_ant.htmlIn Flexunit4, my tests no longer extend TestCase or TestSuite since it uses annotations (thanks Fluint!).  This prevents me from using the JUnitTestRunner.run since it takes an arguemnt of type Test.   I'm using FlexUnitCore and setting addListener to add a UIListener; how can I set this using the previous way of writting tests (extending TestCase and not using annotations and FlexUnitCore)?

        • 1. Re: Flexunit4 + ant automation?
          cytoe Level 1

          Apparently, FlexUnit4 will support JUnit results in FlexBuilder4.  They also have plans to support continuous integration (my problem): http://blogs.digitalprimates.net/codeSlinger/index.cfm/2009/6/3/FlexUnit-4-and-Flash-Build er-4.  In the meantime,  I hacked my own XMLListener based on org.flexunit.runner.notification.async.XMLListener.as and Peter's JunitTestRunner.as.

          • 2. Re: Flexunit4 + ant automation?
            doughie

            What are the plans with this?

             

            I wouldnt mind helping out to get this completed sooner rather than later.

             

            i would like an equivalent to arc-flexunit from http://code.google.com/p/antennae that could detect all tests given a directory and decide whether the tests were being run in flex unit 1 or 4 and would then run them.

             

            I have about 2000 tests that i do not want to have to rewrite and i want to maintain only a single build system.

            • 3. Re: Flexunit4 + ant automation?
              mlabriola Level 4

              All:

               

              Sorry we don't have more out here on this yet, we are just trying to finish up the functional portions, integration with Builder and testing, but CI is then next on our list. Right now in the SVN repository, we do have a JUnit style listener that you can check out if you are interested to look. We just don't have it built into the made code stream yet.

               

              Flex Unit 4 is already capable of running FU1 tests natively (in actuality, FU1 is embedded as one runner inside of FU4, which is what ensures 100% backward compatibility), so we won't need to make a decision externally. If you pass FU4 a FU4 srtyle test, it runs. If you pass it a FU1 style test or Fluint style test, it runs, not modifications needed.

               

              To give you some insight, we will have CI integration already written for most major CI environments. There is also an easy extensibility layer so you can tweak or change for any environment we do not support. Again, some of this already exists if you poke around the repository, but you will see a lot more in this area within the next month.

               

              Cheers,

              Mike

              • 4. Re: Flexunit4 + ant automation?
                doughie Level 1

                wow, thanks for the quick response.

                 

                I will be sure to check out the svn versions.  I am keen to start using this as soon as possible!