xframium / xframium-java

xFramium - Rapid unified test case development
http://www.xframium.org
GNU General Public License v3.0
12 stars 18 forks source link

Issue in test execution sequence. #59

Closed ManasBBSR closed 7 years ago

ManasBBSR commented 7 years ago

Hi,

We have test cases where we have dependencies between the test cases where we need to execute test case 1 before the other test cases so we had placed the test case in order in the XML file but the execution is not happening in sequence. In our specific case, test 2 is getting executed before test case 1 as a result of which the test case 1 is failing. We tried to debug the execution and found that it is picking up the names in sequence and adding those to the test case list in sequence but in the statement below it picks up the 2nd test case.

KeyWordTest test = KeyWordDriver.instance().getTest( testName.getTestName().split( "\." )[ 0 ] );

Is there a way to set the priority of test case execution to resolve the above issue as in TestNG.

Sorry for my ignorance but I'm QA tester so do not have the technical expertise to resolve the issue.

Thanks, Manas

xframium commented 7 years ago

Manas,

As far as priority there is no way to set that yet. If one test case relies on another then I would make them functions instead of test cases and have a parent test case call them in the appropriate order.

So, if testTwo reles on testOne then I woulc create testOneTwo as in:

Then mark eitherchange testOne and testTwo to functions or mark them as inactive tests. Either way they can be called in the order required as above.

In version 1.7 there will be the ability to call device setup, pretest and post test function which may help here as well

Thanks Allen