TestNG has got "Skip", individual tests might throw SkipException.
Example:
/*
* @test
* @run testng Skip
*/
import org.testng.annotations.Test;
import org.testng.SkipException;
public class Skip {
@Test
public void test1() {
throw new SkipException("not applicable");
}
@Test
public void test2() {
}
}
TestNG status of execution such test will be:
===============================================
Skip.java
Total tests run: 2, Failures: 0, Skips: 1
===============================================
But if this test is run by jtreg the status will be:
STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
jtreg should be updated to not treat skipped tests as failures.
Example:
/*
* @test
* @run testng Skip
*/
import org.testng.annotations.Test;
import org.testng.SkipException;
public class Skip {
@Test
public void test1() {
throw new SkipException("not applicable");
}
@Test
public void test2() {
}
}
TestNG status of execution such test will be:
===============================================
Skip.java
Total tests run: 2, Failures: 0, Skips: 1
===============================================
But if this test is run by jtreg the status will be:
STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
jtreg should be updated to not treat skipped tests as failures.
- duplicates
-
CODETOOLS-7901759 jtreg should not count skipped tests as failed
-
- Closed
-
- relates to
-
CODETOOLS-7900165 Exception in TestNG DataSource does not result in a reported test failure
-
- Resolved
-
- links to