Parallel execution of two suites using web driver and Selenium -
i have 2 testng suites in project. want run both of them in parallel.
suite1:
class class b
suite2:
class c class d
i want run suite1
, suite2
in parallel on same machine. however, class b
of suite1
should run after class a
. same second suite: first , second classes need run in serial.
how achieve this?
in order achieve, need add annotation @test(priority=??). default value 0 priority.
if don't mention priority, take test cases "priority=0" , execute.
if define priority "priority=", these test cases executed when test cases don't have priority default priority set "priority=0"
you dont need 2 xml requirement. follow these , should have same test running parallel.
<suite name="test-class suite" parallel="tests" thread-count="2"> <test name="test-class test 1"> <classes> <class name="com.classa" /> <class name="com.classb" /> </classes> </test> <test name="test-class test 2"> <classes> <class name="com.classc" /> <class name="com.classd" /> </classes> </test>
make sure parallel parameter have parallel='true' , thread-count per requirement.
Comments
Post a Comment