Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-713

TestNG tests not executed when @Test annotation is used for class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9-rc-1

      Description

      TestNG tests not executed when @Test annotation is used for class

      such behaviour is not compatible with what TestNG users can expect. See TestNG documentation:
      http://testng.org/doc/documentation-main.html#class-level
      "The effect of a class level @Test annotation is to make all the public methods of this class to become test methods even if they are not annotated. You can still repeat the @Test annotation on a method if you want to add certain attributes."

      for example tests from this class will not be executed

      import org.testng.annotations.Test;
      import static org.testng.Assert.assertTrue;

      @Test
      public class MyClassTestNGTest {

      public void testMyClass()

      { assertTrue(false); }

      }

      run "gradle test" on the attached project to see it happening (or rather not happening)

        Attachments

          Activity

            People

            Assignee:
            teyckmans Tom Eyckmans
            Reporter:
            tomekk Tomek Kaczanowski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: