Well, I tried using @tester and even @login and @hellotester but it doesn't work. I am still getting the "java.lang.UnsupportedOperationException".
Hi,
I have zipped and uploaded the complete project for your reference. Please let me know the issue in it.
Regards,
Arun
Can I get all the updated JARS in one place? I just noted down the names and downloaded them one by one by looking at your video? Is there a better approach?
Below are the latest JAR's that I downloaded and included and I am getting this new error
Cucumber-core-1.1.5.jar
cucumber-html-0.2.3
cucumber-java-1.1.3
cucumber-junit-1.1.5
gherkin-2.12.2
hamcrest-core-1.3
jchronic-0.2.6
junit-4.12
Error:
cucumber.runtime.CucumberException: java.lang.reflect.InvocationTargetException
update this 2 file.
http://mvnrepository.com/artifact/info.cukes/cucumber-core/1.2.4
http://mvnrepository.com/artifact/info.cukes/cucumber-junit/1.2.4
That did not still help me either. i did update the JAR's as per your previous comment and I am getting the below error. Also attached the jar's screenshot for your reference. Please help!
cucumber.runtime.CucumberException: Failed to instantiate public cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader) with [cucumber.runtime.io.MultiLoader@13b6d03]
at cucumber.runtime.Reflections.newInstance(Reflections.java:44)
at cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:30)
at cucumber.runtime.Runtime.loadBackends(Runtime.java:98)
at cucumber.runtime.Runtime.<init>(Runtime.java:65)
at cucumber.api.junit.Cucumber.createRuntime(Cucumber.java:78)
at cucumber.api.junit.Cucumber.<init>(Cucumber.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at cucumber.runtime.Reflections.newInstance(Reflections.java:41)
... 23 more
Caused by: java.lang.NoSuchMethodError: cucumber.runtime.io.ClasspathResourceLoader.getAnnotations(Ljava/lang/String;)Ljava/util/Collection;
at cucumber.runtime.java.ClasspathMethodScanner.findCucumberAnnotationClasses(ClasspathMethodScanner.java:75)
at cucumber.runtime.java.ClasspathMethodScanner.<init>(ClasspathMethodScanner.java:23)
at cucumber.runtime.java.JavaBackend.<init>(JavaBackend.java:30)
... 28 more
change this [color=#FF0000:rcm6nrky]@cucumber.option[/color:rcm6nrky] to this [color=#FF0000:rcm6nrky]@cucumberoption(features = {"path/to/myfile.feature"})[/color:rcm6nrky]
Hi,
I actually looked at module-42 videos and integrated maven with cucumber. I added the respective dependencies and when I copied the respective scripts and ran, it worked fine and I am glad I am able to proceed with the cucumber tutorial now. I believe the issue is with the jar files earlier.
Btw, I am already using "@CucumberOptions(plugin={"html:output"})" in the runner class since options is deprecated. Thanks a lot for your continuous support and I appreciate it.