Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-377

When JUnit and TestNG tests are in same project, only one set gets run

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: TestNG support
    • Labels:
      None

      Description

      The attached Maven project has two tests: one JUnit test and one TestNG test. According to the documentation, in this case TestNG should run both tests.

      Run "mvn test". Only the TestNG test will run. If you modify the pom to set the property "junit=true", only the JUnit test will run.

      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.4-SNAPSHOT</version>
      <configuration>
      <properties>
      <property>
      <name>junit</name>
      <value>true</value>
      </property>
      </properties>
      </plugin>

        Attachments

        1. testng-junit-together.zip
          3 kB
          Dan Fabulich
        2. surefire377.patch
          8 kB
          Dan Fabulich

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dfabulich Dan Fabulich
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: