Tuesday, 24 November 2015

How to execute Selenium testcases in parallel in TestNg

Here two browsers will open as thread-count = "2" (you can change it according to your requirement). In one browser all the classes will be executed which are under 1st test and in 2nd browser, all the classes will be executed which are under 2nd test.

<suite name="Suite" parallel="tests" thread-count="2">
  <test name="Test1">
    <classes>
      <class name="Library.Module1"/>
    </classes>
  </test> 
  <test name="Test2">
    <classes>
      <class name="Library.Module2"/>
    </classes>
  </test>
</suite>

No comments:

Post a Comment