Running a single test in maven -> No tests were executed Running a single test in maven -> No tests were executed selenium selenium

Running a single test in maven -> No tests were executed


Perhaps you are seeing this bug, which is said to affect surefire 2.12 but not 2.11?


You are probably picking up JUnit3 on your classpath somewhere, which effectively disables JUnit4.

Run mvn dependency:tree to find out where it's coming in from and add an exclude to the dependency.


I had the same problem. It was caused by testng dependency that came with junit3. Just add a exclusion statement for it and tests should work.

<dependency>  <groupId>org.seleniumhq.selenium</groupId>  <artifactId>selenium</artifactId>  <version>2.0b1</version>  <exclusions>    <exclusion>      <groupId>org.testng</groupId>      <artifactId>testng</artifactId>    </exclusion>  </exclusions></dependency>