Comcast / zucchini

Run your cucumber-jvm tests in parallel across all your devices
http://comcast.github.io/zucchini/
Apache License 2.0
34 stars 19 forks source link

NoSuchMethodError: cucumber.runtime.RuntimeOptionsFactory.<init>(Ljava/lang/Class;)V #35

Closed iuliiasobolevska closed 8 years ago

iuliiasobolevska commented 8 years ago

Hi! I'm trying to use zucchini for multi-thread execution of BDD tests previously run by the Junit runner and get the following error all the time: Exception in thread "firefox" java.lang.NoSuchMethodError: cucumber.runtime.RuntimeOptionsFactory.(Ljava/lang/Class;)V at com.comcast.zucchini.TestNGZucchiniRunner.(TestNGZucchiniRunner.java:56) at com.comcast.zucchini.AbstractZucchiniTest.runWith(AbstractZucchiniTest.java:210) at com.comcast.zucchini.TestRunner.run(TestRunner.java:51) at java.lang.Thread.run(Thread.java:745) I have created a separate test project and it works there. Could you please suggest what I might have misconfigured?

trentontrees commented 8 years ago

Hi there...so from the trace above I'm not able to get enough information to tell you exactly what has gone wrong. But there are a few things to check.

  1. Currently Zucchini doesn't support junit. It only supports testng
  2. Make sure you are including cucumber jvm in your project setup
dimaj commented 8 years ago

Hello @andromeda16,

What are the odds of you sharing with us some code snippet and / or your pom.xml file (at least the parts dealing with cucumber and zucchini)?

Also, what is the version of zucchini that you are using?

iuliiasobolevska commented 8 years ago

Hi! Thanks much for your answers. I think the problem is that we use the JUnit runner.

The full log look like: "C:\Program Files\Java\jdk1.7.0_79\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61466,suspend=y,server=n -ea -Didea.testng.sm_runner -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2\plugins\testng\lib\testng-plugin.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar;C:\Users\iuliia.sobolevska\Documents\Cicero\integration-tests\target\test-classes;C:\Users\iuliia.sobolevska\Documents\Cicero\integration-tests\target\classes;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-core\1.1.8\cucumber-core-1.1.8.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-jvm-deps\1.0.3\cucumber-jvm-deps-1.0.3.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-java\1.1.8\cucumber-java-1.1.8.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-junit\1.1.8\cucumber-junit-1.1.8.jar;C:\Users\iuliia.sobolevska.m2\repository\ru\stqa\selenium\webdriver-factory\1.1.52\webdriver-factory-1.1.52.jar;C:\Users\iuliia.sobolevska.m2\repository\com\codeborne\phantomjsdriver\1.2.1\phantomjsdriver-1.2.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-server\2.53.1\selenium-server-2.53.1.jar;C:\Users\iuliia.sobolevska.m2\repository\com\beust\jcommander\1.48\jcommander-1.48.jar;C:\Users\iuliia.sobolevska.m2\repository\org\bouncycastle\bcprov-jdk15on\1.48\bcprov-jdk15on-1.48.jar;C:\Users\iuliia.sobolevska.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.48\bcpkix-jdk15on-1.48.jar;C:\Users\iuliia.sobolevska.m2\repository\mx4j\mx4j-tools\3.0.1\mx4j-tools-3.0.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\jetty-repacked\9.2.13.v20150730\jetty-repacked-9.2.13.v20150730.jar;C:\Users\iuliia.sobolevska.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\jetty-rc-repacked\5\jetty-rc-repacked-5.jar;C:\Users\iuliia.sobolevska.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\yaml\snakeyaml\1.8\snakeyaml-1.8.jar;C:\Users\iuliia.sobolevska.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-api\2.53.1\selenium-api-2.53.1.jar;C:\Users\iuliia.sobolevska.m2\repository\com\google\guava\guava\19.0\guava-19.0.jar;C:\Users\iuliia.sobolevska.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-java\2.53.0\selenium-java-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\2.53.0\selenium-chrome-driver-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\2.53.0\selenium-edge-driver-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\2.53.0\selenium-ie-driver-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\net\java\dev\jna\jna\4.1.0\jna-4.1.0.jar;C:\Users\iuliia.sobolevska.m2\repository\net\java\dev\jna\jna-platform\4.1.0\jna-platform-4.1.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\2.53.0\selenium-safari-driver-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\io\netty\netty\3.5.7.Final\netty-3.5.7.Final.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-leg-rc\2.53.0\selenium-leg-rc-2.53.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-support\2.53.1\selenium-support-2.53.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\2.53.1\selenium-remote-driver-2.53.1.jar;C:\Users\iuliia.sobolevska.m2\repository\cglib\cglib-nodep\2.1_3\cglib-nodep-2.1_3.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\httpcomponents\httpclient\4.5.1\httpclient-4.5.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\httpcomponents\httpcore\4.4.3\httpcore-4.4.3.jar;C:\Users\iuliia.sobolevska.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\2.53.1\selenium-firefox-driver-2.53.1.jar;C:\Users\iuliia.sobolevska.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\iuliia.sobolevska.m2\repository\com\comcast\zucchini\zucchini\2.2.7\zucchini-2.2.7.jar;C:\Users\iuliia.sobolevska.m2\repository\info\cukes\cucumber-testng\1.2.4\cucumber-testng-1.2.4.jar;C:\Users\iuliia.sobolevska.m2\repository\net\masterthought\cucumber-reporting\0.0.23\cucumber-reporting-0.0.23.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\iuliia.sobolevska.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\iuliia.sobolevska.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\Users\iuliia.sobolevska.m2\repository\velocity-tools\velocity-tools\1.4\velocity-tools-1.4.jar;C:\Users\iuliia.sobolevska.m2\repository\org\mockito\mockito-all\1.9.0\mockito-all-1.9.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\plugins\maven-gpg-plugin\1.4\maven-gpg-plugin-1.4.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-plugin-api\2.0.6\maven-plugin-api-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-project\2.0.6\maven-project-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-settings\2.0.6\maven-settings-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-profile\2.0.6\maven-profile-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-artifact-manager\2.0.6\maven-artifact-manager-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-repository-metadata\2.0.6\maven-repository-metadata-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\wagon\wagon-provider-api\1.0-beta-2\wagon-provider-api-1.0-beta-2.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-plugin-registry\2.0.6\maven-plugin-registry-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-artifact\2.0.6\maven-artifact-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\maven\maven-model\2.0.6\maven-model-2.0.6.jar;C:\Users\iuliia.sobolevska.m2\repository\org\codehaus\plexus\plexus-utils\2.0.5\plexus-utils-2.0.5.jar;C:\Users\iuliia.sobolevska.m2\repository\com\googlecode\totallylazy\totallylazy\1077\totallylazy-1077.jar;C:\Users\iuliia.sobolevska.m2\repository\org\testng\testng\6.8.8\testng-6.8.8.jar;C:\Users\iuliia.sobolevska.m2\repository\org\beanshell\bsh\2.0b4\bsh-2.0b4.jar;C:\Users\iuliia.sobolevska.m2\repository\org\slf4j\slf4j-api\1.6.4\slf4j-api-1.6.4.jar;C:\Users\iuliia.sobolevska.m2\repository\ch\qos\logback\logback-classic\1.1.2\logback-classic-1.1.2.jar;C:\Users\iuliia.sobolevska.m2\repository\ch\qos\logback\logback-core\1.1.2\logback-core-1.1.2.jar;C:\Users\iuliia.sobolevska.m2\repository\junit\junit\4.11\junit-4.11.jar;C:\Users\iuliia.sobolevska.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\iuliia.sobolevska.m2\repository\org\jsoup\jsoup\1.8.1\jsoup-1.8.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\pdfbox\pdfbox\1.8.10\pdfbox-1.8.10.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\pdfbox\fontbox\1.8.10\fontbox-1.8.10.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\pdfbox\jempbox\1.8.10\jempbox-1.8.10.jar;C:\Users\iuliia.sobolevska.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\bundles\jaxrs-ri\2.16\jaxrs-ri-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\javax\ws\rs\javax.ws.rs-api\2.0.1\javax.ws.rs-api-2.0.1-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-common\2.16\jersey-common-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\javax\ws\rs\javax.ws.rs-api\2.0.1\javax.ws.rs-api-2.0.1.jar;C:\Users\iuliia.sobolevska.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\bundles\repackaged\jersey-guava\2.16\jersey-guava-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\hk2-api\2.4.0-b09\hk2-api-2.4.0-b09.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\hk2-utils\2.4.0-b09\hk2-utils-2.4.0-b09.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\external\aopalliance-repackaged\2.4.0-b09\aopalliance-repackaged-2.4.0-b09.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\external\javax.inject\2.4.0-b09\javax.inject-2.4.0-b09.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\hk2-locator\2.4.0-b09\hk2-locator-2.4.0-b09.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\media\jersey-media-jaxb\2.16\jersey-media-jaxb-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-client\2.16\jersey-client-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-server\2.16\jersey-server-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.16\jersey-container-servlet-core-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet\2.16\jersey-container-servlet-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-common\2.16\jersey-common-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\media\jersey-media-jaxb\2.16\jersey-media-jaxb-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-client\2.16\jersey-client-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\core\jersey-server\2.16\jersey-server-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.16\jersey-container-servlet-core-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet\2.16\jersey-container-servlet-2.16-sources.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\media\jersey-media-moxy\2.16\jersey-media-moxy-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\glassfish\jersey\ext\jersey-entity-filtering\2.16\jersey-entity-filtering-2.16.jar;C:\Users\iuliia.sobolevska.m2\repository\org\eclipse\persistence\org.eclipse.persistence.moxy\2.5.0\org.eclipse.persistence.moxy-2.5.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\eclipse\persistence\org.eclipse.persistence.core\2.5.0\org.eclipse.persistence.core-2.5.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\eclipse\persistence\org.eclipse.persistence.asm\2.5.0\org.eclipse.persistence.asm-2.5.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\eclipse\persistence\org.eclipse.persistence.antlr\2.5.0\org.eclipse.persistence.antlr-2.5.0.jar;C:\Users\iuliia.sobolevska.m2\repository\com\fasterxml\jackson\core\jackson-core\2.0.0\jackson-core-2.0.0.jar;C:\Users\iuliia.sobolevska.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.0.0\jackson-annotations-2.0.0.jar;C:\Users\iuliia.sobolevska.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.0.0\jackson-databind-2.0.0.jar;C:\Users\iuliia.sobolevska.m2\repository\org\apache\commons\commons-lang3\3.4\commons-lang3-3.4.jar;C:\Users\iuliia.sobolevska.m2\repository\org\reflections\reflections\0.9.9-RC1\reflections-0.9.9-RC1.jar;C:\Users\iuliia.sobolevska.m2\repository\org\javassist\javassist\3.16.1-GA\javassist-3.16.1-GA.jar;C:\Users\iuliia.sobolevska.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\iuliia.sobolevska.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\iuliia.sobolevska.m2\repository\org\hamcrest\hamcrest-all\1.3\hamcrest-all-1.3.jar;C:\Users\iuliia.sobolevska.m2\repository\joda-time\joda-time\2.9.4\joda-time-2.9.4.jar;C:\Users\iuliia.sobolevska.m2\repository\com\google\code\findbugs\jsr305\2.0.1\jsr305-2.0.1.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2\plugins\testng\lib\jcommander.jar" org.testng.RemoteTestNGStarter -port 61464 -usedefaultlisteners false -socket61465 @w@C:\Users\iuliia.sobolevska\AppData\Local\Temp\idea_working_dirs_testng.tmp -temp C:\Users\iuliia.sobolevska\AppData\Local\Temp\idea_testng.tmp Connected to the target VM, address: '127.0.0.1:61466', transport: 'socket' [TestNG] Running: C:\Users\iuliia.sobolevska.IdeaIC2016.2\system\temp-testng-customsuite.xml 15:00:11.356 [firefox] DEBUG c.c.zucchini.AbstractZucchiniTest - ZucchiniTest[firefox] starting Exception in thread "firefox" java.lang.NoSuchMethodError: cucumber.runtime.RuntimeOptionsFactory.(Ljava/lang/Class;)V at com.comcast.zucchini.TestNGZucchiniRunner.(TestNGZucchiniRunner.java:56) at com.comcast.zucchini.AbstractZucchiniTest.runWith(AbstractZucchiniTest.java:210) at com.comcast.zucchini.TestRunner.run(TestRunner.java:51) at java.lang.Thread.run(Thread.java:745)

Default Suite

Total tests run: 1, Failures: 0, Skips: 0

15:00:11.381 [Thread-2] WARN c.c.zucchini.ZucchiniShutdownHook - There are 0 features run Disconnected from the target VM, address: '127.0.0.1:61466', transport: 'socket'

Process finished with exit code 0

And I missed row: [TestNG] Running:....

@dimaj Zucchini version 2.2.8 Please find the attached runner MultiThreadExecution.txt and part of the pom pom.txt

dimaj commented 8 years ago

Thanks for that information @andromeda16.

The problem is that you are depending on a older version of cucumber-jvm. You are using version 1.1.8 while Zucchini 2.2.8 is depending on version 1.2.4.

What I'd suggest you do is remove all cucumber and junit dependencies from your project and let Zucchini manage it for you. Zucchini has a dependency on cucumber-jvm which in turn will bring in cucumber-core, cucumber-java, cucumber-junit and junit

If you must depended on cucumber version 1.1.8, then you'll need to downgrade Zucchini to version 2.0.6. That is the last version of Zucchini that was based on Cucumber 1.1.8

iuliiasobolevska commented 8 years ago

Thanks much for your answer and recommendations - it helped)

dimaj commented 8 years ago

glad to hear!