I have written a Java TestNG script, it initializes the drivers

I have written a Java TestNG script, it initializes the drivers parallelly but it does not run the test case.

Hi Emma,
To run parallel tests using TestNG, we would have to execute the below commands in the terminal:

For the above example code

mvn test

For the cloned Java-TestNG-Selenium repo used to run our first sample test

mvn test -D suite=parallel.xml

Reference: https://www.lambdatest.com/support/docs/testng-with-selenium-running-java-automation-scripts-on-lambdatest-selenium-grid/#executing-parallel-tests-using-testng

1 Like