Skip to main content
January 23, 2009
Question

Run several test suites in sequence

  • January 23, 2009
  • 3 replies
  • 1145 views
Hi,

I have several test suites. I would like to run each of them in sequence because each has its own configuration. If I did the following, tests from different suites will be mixed with others while running.

testRunner.test = new Suite1();
testRunner.startTest();
testRunner.test = new Suite2();
testRunner.startTest();
testRunner.test = new Suite2();
testRunner.startTest();

Anyone has ideas how to solve this?

Thanks,
Dina
This topic has been closed for replies.

3 replies

Participant
February 4, 2009
Can someone post some code that allows this to work? I'm new to AS and don't think I can tackle a custom TestListener, etc. One would think this would already be supported behavior.

-Dave
Participant
February 2, 2009
Hi,<br /><br />Surely the ability to add test suites to test suites (the composite pattern) already allows this?<br /><br />Cheers,<br /><br />Ali<br /><br /><br />On 01/02/2009 02:03, "Daniel Rinehart" <member@adobeforums.com> wrote:<br /><br />A new message was posted by Daniel Rinehart in<br /><br />FlexUnit Development --<br /> Run several test suites in sequence<br /><br />A couple of suggestions. Dynamically create a new testRunner for each<br />TestSuite, that way you can run them in sequence. Each test runner<br />could be thrown into a tab navigator to easily view the results. The<br />TestRunnerBase fires a TestsCompleteEvent which could be used to<br />execute the next suite. The reporting of total tests across all suites<br />could be done with a custom TestListener.<br /><br />-- Daniel R. <danielr@neophi.com> [http://danielr.neophi.com/]<br /><br />> I have several test suites. I would like to run each of them in sequence<br />> because each has its own configuration. If I did the following, tests from<br />> different suites will be mixed with others while running.<br />><br />> testRunner.test = new Suite1();<br />> testRunner.startTest();<br />> testRunner.test = new Suite2();<br />> testRunner.startTest();<br />> testRunner.test = new Suite2();<br />> testRunner.startTest();<br /><br /><br />------------------------------------------------------<br />View/reply at <a href=http://www.adobeforums.com/webx?13@@.59b799c6/0><br />Replies by email are OK.<br />Use the unsubscribe form at <a href=http://www.adobeforums.com/webx?280@@.59b799c6!folder=.59b62b92> to cancel your email subscription.
Participating Frequently
February 1, 2009
A couple of suggestions. Dynamically create a new testRunner for each<br />TestSuite, that way you can run them in sequence. Each test runner<br />could be thrown into a tab navigator to easily view the results. The<br />TestRunnerBase fires a TestsCompleteEvent which could be used to<br />execute the next suite. The reporting of total tests across all suites<br />could be done with a custom TestListener.<br /><br />-- Daniel R. <danielr@neophi.com> [http://danielr.neophi.com/]<br /><br />> I have several test suites. I would like to run each of them in sequence<br />> because each has its own configuration. If I did the following, tests from<br />> different suites will be mixed with others while running.<br />><br />> testRunner.test = new Suite1();<br />> testRunner.startTest();<br />> testRunner.test = new Suite2();<br />> testRunner.startTest();<br />> testRunner.test = new Suite2();<br />> testRunner.startTest();