5 Replies Latest reply on Sep 15, 2009 10:33 AM by aguacaliente82

    time test methods


      i'm writing a series of tests that will be used to measure performance of various methods.  My organization already has a bunch of fluint tests that are now running under flexUnit 4.  I can see in TestCase (fluint source) that it times the execution of each test method, but i don't see how i can access this information to report it in output (command line, via ant).  Does anybody know how?  Also, do I need to migrate my tests over to strictly flexunit 4?  It seems there is some form of legacy support for fluint tests, but new tests should be handles by flexunit?


      thanks for your help.

        • 1. Re: time test methods
          mlabriola Level 4

          You are correct that there isn't currently a way to get this information. We actually collect information about assertion counts, timing and even metadata included in the tests but don't report it as of yet. One of our goals for the next beta is to expose all of this information.


          As far as fluint versus FlexUnit 4 tests, fluint tests will always be supported in FlexUnit 4. Internally, we actually run your tests through the fluint code, it is not emulated, so any changes or bug fixes in fluint will also work in flexunit 4. FlexUnit 4, will be receiving some of its own support for more integration level testing too, so eventually you can make the choice based solely on the issue you are trying to test.


          However, at this time, there is parity between the two frameworks so all functionality in fluint is also in flexunit 4.



          • 2. Re: time test methods
            aguacaliente82 Level 1

            Thanks for your quick response.  Good information to know.  On another note, relatively unrelated, is it possible to access the meta data [Test(myInfo="1520")] attached to a method and trace it to console indicating pass/fail and myInfo?  do all the new features like meta data and [Before], [After] and [Test] work even for my existing fluint tests?

            • 3. Re: time test methods
              mlabriola Level 4

              Actual, it isn't unrealted at all. You can't print that info out currently, but that was what I was referring to above when I mentioned metadata along with the timing being part of the next goal. So, short term answer no, medium term answer, yes.


              When flexunit 4 identifies one of your tests as a fluint test, it literally instantiates the fluint code in the background and sends it your test to run. It then records to results in flexunit 4 style. That means that newer features of flexunit 4 such as [Before] and [After] won't be available in fluint. However, fluint does support the setup and teardown methods which mostly do the same thing at this point.



              • 4. Re: time test methods
                mlabriola Level 4

                One more note, fluint does support the [Test] metadata but that is because fluint has that support natively. It is not because of the integration with flexunit 4

                • 5. Re: time test methods
                  aguacaliente82 Level 1

                  thanks again. FlexUnit has come a long way and it's exciting to see it plow forward!  Keep up the good work.