How do I run a test script in TestNG?
You can execute TestNG test cases in multiple ways .
-
Create a Simple TestNG class, add testNG plugin in your IDE, right click the Class File and you can see "Run As TestNG class.
-
Use testng testsuite xml file , right click and run as TestSuite .
-
Add individual Test Class or test Suite xml in build tool like Maven and you trigger the test cases from test goal of your build tool