Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901747

jtreg treats TestNG Skip status as failure.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.2
    • jtreg4.2
    • tools
    • None
    • b04

      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.

            jjg Jonathan Gibbons
            dfazunen Dmitry Fazunenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: