I realized while running through the quick start guide that Webtestit was running each @test function in the test file in alphabetical order. Although in my test file I have the test case “SearchForItemTestCase” BEFORE “AddItemToCartTestCase” it would always execute the “AddItemToCartTestCase” BEFORE “SearchForItemTestCase”.
I built my own PO’s and test file for our web based applications and the behavior was the same. It appears to execute alphabetically through the test file instead of in the order which they are scripted.
I tried adding priority to each @test function (i.e. @Test(Priority = 1) and it DOES execute in the priority affinity defined. However, if set to Run all test files and if I have priority set in 2 test files, it will run priority 1 tests from 2 separate test files if they share the same priority affinity. (i.e. TestCasew/priority 1 from test file one, then TestCasew/priority1 from test file 2)
Is there a way to define in the pom or script specifically to ignore affinity and just execute as ordered in my script?
Thanks for your help!