Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98800

TestNG run set of test cases in loop

$
0
0

Searched everywhere but could not find solution how to do following: As Example:

 for (int i = 0; i < 5; i++) {
@Test
public void test1(){
assertThat(assertvalue 1);
}

@Test
public void test2(){
assertThat(assertvalue 2);
}
@Test
public void test3(){
assertThat(assertvalue 3);
}
}

Of course I can use dataProvider or invocationCount and do all asserts in one test case, but if one assert will fail whole test case fail. I want kind of separate one big test case for 3 small test cases Any help appreciated


Viewing all articles
Browse latest Browse all 98800


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>