I want to run a test case multiple times. Is that configurable in the testng.xml? If I add a loop in the test method, then the results of each run will not be a
None of the answers so far really give the user the ability to up the invocation count from the testng file, which is what was asked for. This solution piggybacks off of gaurav25's DataProvider solution.
class TestClass() {
int invocationCount;
@Parameters({ "invocationCount" })
@BeginClass
void BeginClass( @Optional("1") String invocationCount) {
this.invocationCount = Ingeter.parse(invocationCount)
}
// It will return a 2D array of size 3x1
@DataProvider(name="URLprovider")
private Object[][] getURLs() {
ArrayList
Now you can alter how many test sets get run through the test function with this testng.xml file: