-2

I have to run a specific test through the command prompt. Could you please clarify how to pass an input parameter as test class name in testing?

robinCTS
  • 5,746
  • 14
  • 30
  • 37
cocoHeat
  • 1
  • 1

1 Answers1

0

Assuming that you have TestNG in your class path, you can simply run the below command:

java org.testng.TestNG testng1.xml com.example.Foo.testMethod1

Make sure you have specified the fully qualified name of the test method.

You can also have a look to the official TestNG documentation to play around the commands to run the test cases.

robinCTS
  • 5,746
  • 14
  • 30
  • 37
Atul Dwivedi
  • 1,452
  • 16
  • 29