Perform the following steps to create a test with methods:
method-testng.xmlto the project with following content:
<suite name="Method Suite" verbose="1"> <test name="Method Test"> <classes> <class name="test.firstpackage.FirstTestClass"> <methods> <include name="firstTest" /> </methods> </class> </classes> </test> </suite>
testng XML suite defines a class that needs to be considered for test execution and the test method that needs to be included for execution. To add methods to your test suite we have to use the tags
exclude under them to add ...