[ACCEPTED]-Running JUnit tests with Maven under Eclipse-junit

Accepted answer
Score: 17

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.

Score: 3

Add this to your pom.xml


run maven with clean test


More Related questions