maven-surefire-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nalaka Gamage" <nalakai...@gmail.com>
Subject Running both Junit4 and TestNG test cases in single Maven project
Date Fri, 31 Oct 2008 10:43:19 GMT
In my project I need to have both both Junit4 and TestNG test cases and
build using Maven2.

However I found that when I run 'mvn test' goll, Junit4 test cases are
ignored by Maven surfire plugin and only TestNG test cases are run. However
when I use JUnit3 and TestNG test cases together, both the test cases are
picked correctly. Can anyone propose a solution?

I have append my POM file for your reference.

Thanks in advance.

- Nalaka
<project>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.8</version>
            <scope>test</scope>
            <classifier>jdk15</classifier>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message