I am new to selenium and I want to run two classes or two methods at the same time not one after the other. I referred many links specially this link but in vain. Below is my code of testing.xml (for testing methods) where testStageDashboard
and prodDashboards1
are test methods inside single class:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Parallel test suite" parallel="methods" thread-count="2">
<test name="Test 1">
<classes>
<class name="com.sd.selenium.FirstTestSelenium" />
<!-- <class name="com.sd.selenium.practice.Monday_Test_Selenium_Till_Scrum_Call"
/> -->
</classes>
</test>
</suite>
Testing.xml(for testing classes) :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Parallel test suite" parallel="classes" thread-count="2">
<test name="Test 1">
<classes>
<class name="com.sd.selenium.FirstTestSelenium"/>
<class name="com.sd.selenium.practice.Monday_Test_Selenium_Till_Scrum_Call"/>
</classes>
</test>
</suite>
where FirstTestSelenium
and Monday_Test_Selenium_Till_Scrum_Call
are two different classes under different packages.Do I need to write anything in java for browser nodes or something ? and how to run this ? What I did is I right clicked on my project and run as > Test NG test. Is anything else needed ? Thanks in advance :)