is it possible to run the same test suite for multiple times.
I’ve 10 websites which is similar in design and architecture . so I’ve prepared a test suite using TestNG but the problem is with the execution of test suite.
Like, i want to run the same suite for all the 10 url’s or website consecutively.
is there any way to apply loop in the test suite .?
What you need is to have a custom test runner for you tests. This is basically a small piece of code which runs testng programatically. You can include your suite file as many times as you want. here is a sample code
TestNG runner = new TestNG(); ;
List<String> tempSuite = new ArrayList<String>();
tempSuite .add(“YOUR SUite file path here”);