1

I have custom runner of JUNIT, run with annotation: @RunWith(SomeClass.class)

When running maven goal test it does not run it. What should be done? is it configurable?

Raghuram
  • 51,854
  • 11
  • 110
  • 122
Kfir Bloch
  • 68
  • 2
  • 6
  • Just in case, are you sure you don't have TestNG on your classpath? http://stackoverflow.com/questions/1232853/how-to-execute-junit-and-testng-tests-in-same-project-using-maven-surefire-plugin – Tomasz Nurkiewicz Feb 16 '11 at 19:11
  • Is your JUnit executed without @RunWith when you run mvn test? – padis Feb 16 '11 at 22:03
  • Related to http://stackoverflow.com/questions/2717902/runwith-causes-maven-to-ignore-my-test-running-with-my-own-runner? – Raghuram Feb 17 '11 at 04:02

1 Answers1

3

Most likely the problem isn't related to @RunWith; otherwise you should at least get an error. Does the test class match one of Maven's (Surefire's) naming patterns for test classes (e.g. **/*Test.java)?

Peter Niederwieser
  • 121,412
  • 21
  • 324
  • 259