LambdaTest Community

Find answers, support, and inspiration from other users

LambdaTest Community

How can I run multiple test cases in Selenium Webdriver?

I want to run multi test cases in selenium webdriver, can anyone please help me with that.

Up Vote Down Vote 0 Votes
Posted 4 months ago


If you are using TestNG framework then:

  1. All the methods with annotation @Test will run as independent test cases.
  2. You can prioritize the tests as per the scenario using priority attribute with test annotation. Ex: @Test(priority=1).
  3. If you wish run only specific set of methods from TestNG class, you can use group annotation. Ex: @Test(group={“runtest”,”test1?}). Then include the group in TestNG xml. Ex: <group> <run> < include name=”runtest”/> <exclude name=”test2?/> </run> </group>
  4. All the tests with group 'runtest' would be run and the ones with 'test2' will be excluded from run
Up Vote Down Vote 0 Votes
Posted 2 months ago