When I use 3.0.0-beta2 from 'mvn test' it seems to use TestNG instead of JUnit #2575

eviltester opened this Issue Aug 4, 2016 · 5 comments


None yet

3 participants


Meta -

OS: Windows 10

Selenium Version:
3.0.0-beta 2



Expected Behavior -

"mvn test" normally runs my tests using JUnit

Actual Behavior -

With beta2 "mvn test" seems to try and run with TestNG and as a result no tests are run

During the maven output I see:

"Running TestSuite
Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@77468bd
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.424 sec

If I change the version of Selenium to "3.0.0-beta1" my tests run normally.

If I change the version of Selenium 2 "2.53.1" my tests run normally.

This behaviour of 'no tests running' only happens when Selenium version is "3.0.0-beta2"

Steps to reproduce -

You could check out this project https://github.com/eviltester/wdci and change the version of webdriver to "3.0.0-beta2"


Have a look at the Travic-ci build that illustrates the problem:

This build is running against 2.53.1 and passes as normal


I amended the pom.xml to use 3.0.0-beta1


This ran the test as expected, and failed as expected because wires.exe is not available and 3.0.0 defaults to Marionette for Firefox.

I then amended the pom.xml to use 3.0.0-beta2 expecting the same results as the beta1 build, but no tests ran and the build tries to use TestNG


Then I change it back to 2.53.1 to get the build back to normal


lukeis commented Aug 4, 2016

looks like our dependency tree shifted quite a bit with simon and my tinkering :)

I will be checking it out further, but in beta1 testng is a dependency of the leg-rc package and you likely didn't include it explicitly and selenium-server did not depend upon it. In beta2 it seems to have leg-rc as a dependency of selenium-server. Going to check on our assumptions again on this, if that's the right thing to do or not.

lukeis commented Aug 4, 2016

ok.. so the pom's (and thus the maven dependency:tree) are going to change, but because of the leg-rc package that includes some TestNG extensions, testng is going to be included as a dependency. selenium-server -> leg-rc -> testng

If you don't require Selenium RC or WebDriverBacked selenium I would recommend excluding the leg-rc pacakge:


Or if you do need them, you can just exclude testng.

Sadly this is going to be around until ~4.0

The pom's in beta2 are still messed up a bit, but the changes won't affect this issue (i think)


Thanks Luke,

Excluding selenium-leg-rc didn't work for me, but excluding testng did.

When I mvn dependency:tree I don't see selenium legacy in there.

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ webdrivercibasics ---
[INFO] com.seleniumsimplified.webdriver:webdrivercibasics:jar:1.0
[INFO] +- junit:junit:jar:4.12:compile
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.seleniumhq.selenium:htmlunit-driver:jar:2.21:compile
[INFO] |  +- net.sourceforge.htmlunit:htmlunit:jar:2.21:compile
[INFO] |  |  +- xalan:xalan:jar:2.7.2:compile
[INFO] |  |  |  \- xalan:serializer:jar:2.7.2:compile
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] |  |  +- commons-codec:commons-codec:jar:1.10:compile
[INFO] |  |  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:compile
[INFO] |  |  +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.21:compile
[INFO] |  |  |  \- xerces:xercesImpl:jar:2.11.0:compile
[INFO] |  |  |     \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] |  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:compile
[INFO] |  |  |  \- org.w3c.css:sac:jar:1.3:compile
[INFO] |  |  +- commons-io:commons-io:jar:2.4:compile
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-client:jar:9.2.15.v20160210:compile
[INFO] |  |     +- org.eclipse.jetty:jetty-util:jar:9.2.15.v20160210:compile
[INFO] |  |     +- org.eclipse.jetty:jetty-io:jar:9.2.15.v20160210:compile
[INFO] |  |     \- org.eclipse.jetty.websocket:websocket-common:jar:9.2.15.v20160210:compile
[INFO] |  |        \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.15.v20160210:compile
[INFO] |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] \- org.seleniumhq.selenium:selenium-server:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-java:jar:3.0.0-beta2:compile
[INFO]    |  \- org.seleniumhq.selenium:selenium-support:jar:3.0.0-beta2:compile
[INFO]    |     \- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO]    +- org.seleniumhq.selenium:selenium-api:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-chrome-driver:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-edge-driver:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-firefox-driver:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-ie-driver:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-opera-driver:jar:3.0.0-beta2:compile
[INFO]    +- org.seleniumhq.selenium:selenium-remote-driver:jar:3.0.0-beta2:compile
[INFO]    |  \- cglib:cglib-nodep:jar:3.2.4:compile
[INFO]    +- org.seleniumhq.selenium:selenium-safari-driver:jar:3.0.0-beta2:compile
[INFO]    |  \- io.netty:netty:jar:3.5.7.Final:compile
[INFO]    +- com.beust:jcommander:jar:1.48:compile
[INFO]    +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO]    +- commons-logging:commons-logging:jar:1.2:compile
[INFO]    +- com.google.code.gson:gson:jar:2.3.1:compile
[INFO]    +- com.google.guava:guava:jar:19.0:compile
[INFO]    +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO]    +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile
[INFO]    +- org.apache.httpcomponents:httpmime:jar:4.5.2:compile
[INFO]    +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO]    +- org.seleniumhq.selenium:jetty-repacked:jar:9.2.13.v20150730:compile
[INFO]    +- net.java.dev.jna:jna:jar:4.1.0:compile
[INFO]    +- net.java.dev.jna:jna-platform:jar:4.1.0:compile
[INFO]    +- com.github.detro.ghostdriver:phantomjsdriver:jar:1.1.0:compile
[INFO]    +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO]    +- org.testng:testng:jar:6.9.9:compile
[INFO]    |  +- org.apache.ant:ant:jar:1.7.0:compile
[INFO]    |  |  \- org.apache.ant:ant-launcher:jar:1.7.0:compile
[INFO]    |  \- org.beanshell:bsh:jar:2.0b4:compile
[INFO]    \- org.yaml:snakeyaml:jar:1.15:compile

So using....


Worked for me.



@lukeis lukeis added this to the 3.0 milestone Aug 5, 2016
shs96c commented Aug 26, 2016

Is this still an open issue?

lukeis commented Aug 26, 2016

it won't be in beta3... since leg-rc will need to be explicitly included (which is what pulled in the transitive dependency of testng).

So, this is "fixed", when we release I'll update the maven downloads page on seleniumhq to talk about including the leg-rc package

@lukeis lukeis closed this Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment