I have a question regarding testNG.
I have five classes of tests (class a,class b,class c , class d,class e)
and in each class 3 tests (test1 test2 test3)
The problem is that I have @Test(groups = {"smokeTest"}, enabled = true, priority = 1)
in all tests
@Test(groups = {"smokeTest"}, enabled = true, priority = 1)
- class a
@Test(groups = {"smokeTest"}, enabled = true, priority = 2)
- class a
@Test(groups = {"smokeTest"}, enabled = true, priority = 3)
- class a
@Test(groups = {"smokeTest"}, enabled = true, priority = 1)
- class b
@Test(groups = {"smokeTest"}, enabled = true, priority = 2)
- class b
@Test(groups = {"smokeTest"}, enabled = true, priority = 3)
- class b
@Test(groups = {"smokeTest"}, enabled = true, priority = 1)
- class c
@Test(groups = {"smokeTest"}, enabled = true, priority = 2)
- class c
@Test(groups = {"smokeTest"}, enabled = true, priority = 3)
- class c
@Test(groups = {"smokeTest"}, enabled = true, priority = 1)
- class d
@Test(groups = {"smokeTest"}, enabled = true, priority = 2)
- class d
@Test(groups = {"smokeTest"}, enabled = true, priority = 3)
- class d
@Test(groups = {"smokeTest"}, enabled = true, priority = 1)
- class e
@Test(groups = {"smokeTest"}, enabled = true, priority = 2)
- class e
@Test(groups = {"smokeTest"}, enabled = true, priority = 3)
- class e
When I run manually class by class all is working. However when I try to make testng do it, he is running paralleled, and jump between classes according the test's priority, and not finished the class itself. Class a test1 class b test1 ....... If I do not want any parallelization, I want it to be executed as a human do the actions, class by class, and inside the class perform the tests as priority, How can I make testng to run this way. this is my xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite allow-return-values="true" name="sanitySuite" parallel="false" thread-count="1" verbose="1" >
<test name="smoke" preserve-order="true" >
<parameter name="userName" value="selmadmin@gmail.com"/>
<parameter name="password" value="bbb"/>
<groups>
<run>
<include name="smokeTest"/>
</run>
</groups>
<packages>
<package name =".*"/>
</packages>
<classes>
<class name="tests.classA"></class>
<class name="tests.classB"></class>
<class name="tests.classC"></class>
<class name="tests.classD"></class>
<class name="tests.classE"></class>
</classes>
</test>
<!--<test name="jkljlkj">-->
<!--<packages>-->
<!--<package name=".*"/>-->
<!--</packages>-->
<!--</test>-->
</suite>