Quantcast
Channel: Adobe Community : Popular Discussions - FlexUnit
Viewing all articles
Browse latest Browse all 25673

How can i link between two or more test cases(with 1 Test suite) using testRunnesBase?

$
0
0

Hi.

How can i link between two or more test cases which i have written in the following manner.

private function createSuite(suiteMethod:TestSuite):TestSuite

                              {

 

                                        var suite:TestSuite = new TestSuite();

 

                                        suite.addTest(testCaseEx1);

  suite.addTest(testCaseEx2); 

                                        suite.addTest(testCaseEx3);

                                         suite.addTest(testCaseEx4);                             

                                        suite.addTest(testCaseEx5);

 

                                          return suite;

                              }

 

 

 

private function onCreationComplete():void

                              {                                                               

                                        testRunner.test = this.createSuite();

                                        testRunner.startTest();

    } 

 

I want testCaseEx2 has to be ran only after successfull execution of testCaseEx1.

Currently test cases are independent of each other.

------------

 

I tried by writing the below code in successhandler method of testCaseEx1(with help of event handlers)

testRunner.test = this.createSuite(testCaseEx2);

testRunner.startTest();

 

This will over write the output shown in GUI page...

 

Can anyone help me to overcome this problem?

 


Viewing all articles
Browse latest Browse all 25673

Trending Articles