Closed AbhishekKota closed 5 years ago
Please share your build.gradle
Sure, Here you go.. apply plugin: 'java' apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'eclipse' apply plugin: 'groovy'
description = "Api Manager Browser Test"
buildscript { repositories { mavenCentral() mavenLocal() } dependencies { } }
configurations { cucumberRuntime { extendsFrom testRuntime }
}
repositories { maven { url "http://rcore-ci.dev.prod.jp.local/nexus/content/repositories/releases/" } mavenCentral() mavenLocal() jcenter() }
sourceSets{ test{ groovy{ srcDirs = ['src/test/java'] } java{ srcDirs = [] } resources{ srcDir 'resources' } } }
dependencies {
configurations.all { resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' }
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:'3.11.0'
compile group: 'io.appium', name: 'java-client', version:'2.2.0'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
compile(group: 'log4j', name: 'log4j', version:'1.2.15') {
exclude(module: 'jmxtools')
exclude(module: 'jmxri')
exclude(module: 'jms')
}
compile group: 'org.im4java', name: 'im4java', version: '1.4.0'
compile group: 'com.sun.jersey', name: 'jersey-client', version:'1.18.1'
compile group: 'com.google.code.gson', name: 'gson', version:'2.3.1'
compile group: 'redis.clients', name: 'jedis', version:'2.7.0'
compile group: 'com.jayway.jsonpath', name: 'json-path', version:'2.0.0'
compile group: 'com.sun.jersey', name: 'jersey-json', version:'1.18.1'
compile group: 'com.owlike', name: 'genson', version:'0.99'
compile group: 'org.apache.poi', name: 'poi', version:'3.11'
compile group: 'org.apache.poi', name: 'poi-ooxml', version:'3.11'
compile group: 'net.sf.json-lib', name: 'json-lib', version:'2.3', classifier:'jdk15'
compile group: 'org.apache.commons', name: 'commons-pool2', version:'2.3'
compile group: 'com.jcraft', name: 'jsch', version:'0.1.53'
compile group: 'com.eowise', name: 'gradle-imagemagick', version: '0.4.0'
compile group: 'jmagick', name: 'jmagick', version: '6.6.9'
compile group: 'org.sikuli', name: 'sikuli-api', version: '1.2.0'
compile group: 'org.sikuli', name: 'sikuli-core', version: '1.2.2'
compile group: 'org.sikuli', name: 'sikuli-webdriver', version: '1.0.1'
compile group: 'com.sikulix', name: 'sikulixlibsmac', version: '1.1.0'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.4.13'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
testCompile 'io.github.prashant-ramcharan:courgette-jvm:3.3.0'
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.1-groovy-2.4'
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version:'1.2.3'
testCompile group: 'org.picocontainer', name: 'picocontainer', version:'2.15'
testCompile group: 'info.cukes', name: 'cucumber-java', version:'1.2.2'
testCompile group: 'info.cukes', name: 'cucumber-junit', version:'1.2.2'
testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'com.mashape.unirest', name: 'unirest-java', version:'1.4.9'
compile group: 'com.saucelabs', name: 'sauce_junit', version: '2.1.17'
testCompile group: 'com.saucelabs', name: 'sauce_java_common', version:'2.1.20'
testCompile 'com.anotherchrisberry:spock-retry:0.6.4'
testCompile( 'com.athaydes:spock-reports:1.6.0' ) {
transitive = false // this avoids affecting your version of Groovy/Spock
}
}
task wrapper(type: Wrapper) { gradleVersion = '2.0' }
Remove the following from your build.gradle and refresh
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version:'1.2.3'
testCompile group: 'info.cukes', name: 'cucumber-java', version:'1.2.2'
testCompile group: 'info.cukes', name: 'cucumber-junit', version:'1.2.2'
Thanks Prashanth, that helped, small tweak is.. It needed
testCompile group: 'info.cukes', name: 'cucumber-picocontainer', version:'1.2.3'
but upgradation of the version helped me to resolve this.
Thanks a lot for helping out.
Also a quick thing, I see that on the navigation bar of the results in IntelliJ, it always shows as failed but in the logs we see that the tests are passed, Is this something known?
The IntelliJ bar will show the tests as ignored.
This is a known limitation.
Sure, For now this helps.! Thanks a lot!
Hi, I have been getting this error when I am trying to use your framework as an extension in my framework, can you help here.. I am using 3.3.0
Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:153) at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:65) at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:42) at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82) at cucumber.runner.Runner.(Runner.java:28)
at cucumber.runner.SingletonRunnerSupplier.createRunner(SingletonRunnerSupplier.java:38)
at cucumber.runner.SingletonRunnerSupplier.get(SingletonRunnerSupplier.java:32)
at cucumber.runtime.Runtime.run(Runtime.java:75)
at cucumber.api.cli.Main.run(Main.java:26)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:141)
... 9 more
Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:153)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:65)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:42)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
at cucumber.runner.Runner.(Runner.java:28)
at cucumber.runner.SingletonRunnerSupplier.createRunner(SingletonRunnerSupplier.java:38)
at cucumber.runner.SingletonRunnerSupplier.get(SingletonRunnerSupplier.java:32)
at cucumber.runtime.Runtime.run(Runtime.java:75)
at cucumber.api.cli.Main.run(Main.java:26)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:141)
... 9 more
Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:153)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:65)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:42)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
at cucumber.runner.Runner.(Runner.java:28)
at cucumber.runner.SingletonRunnerSupplier.createRunner(SingletonRunnerSupplier.java:38)
at cucumber.runner.SingletonRunnerSupplier.get(SingletonRunnerSupplier.java:32)
at cucumber.runtime.Runtime.run(Runtime.java:75)
at cucumber.api.cli.Main.run(Main.java:26)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:141)
... 9 more
Exception in thread "main" cucumber.runtime.CucumberException: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:153)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:65)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:42)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
at cucumber.runner.Runner.(Runner.java:28)
at cucumber.runner.SingletonRunnerSupplier.createRunner(SingletonRunnerSupplier.java:38)
at cucumber.runner.SingletonRunnerSupplier.get(SingletonRunnerSupplier.java:32)
at cucumber.runtime.Runtime.run(Runtime.java:75)
at cucumber.api.cli.Main.run(Main.java:26)
at cucumber.api.cli.Main.main(Main.java:8)
Caused by: java.lang.AbstractMethodError: cucumber.runtime.java.picocontainer.PicoFactory.addClass(Ljava/lang/Class;)Z
at cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:141)
... 9 more
courgette.runtime.CourgetteTestFailureException: There were failing tests. Refer to the Courgette html report for more details.
Process finished with exit code 254