Monday, 17 September 2018

Testng - how to skip a test case at run time

@Test
public void m1(){
if(aboveMethodFailed)
throw new SkipException("Skipped");
}

using
throw new SkipException("Skipped"); statement we can skip an test case.

No comments:

Post a Comment