[ACCEPTED]-Running JUnit tests with Maven under Eclipse-junit
Accepted answer
you can run Junit 4 with Maven. You just 4 need the Junit 4 dependency in your pom. You 3 also need the surefire plugin to execute 2 the tests.
See: http://maven.apache.org/plugins/maven-surefire-plugin/
Hint: By default surefire 1 looks for files with *Test.java
naming to find tests.
Add this to your pom.xml
<project>
[...]
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
[...]
</project>
run maven with clean test
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.