g***@gmail.com
2016-03-24 11:22:23 UTC
Hi All,
I am new to cucumber. I am trying to start a project using cucumber. When I
run the .feature file, I am getting an error. I tried googling the issue
but didn't get any thing.
Please find below the details :
Feature File :
Feature:Proof of concept that my framework works
Scenario:My First Test
Given I naviagted to the zoo website
When I click on adoption link
Then I check to see that no animals are available
Runner File :
@RunWith(Cucumber.class)
@CucumberOptions(
format={"pretty", "json:target/cucumber.json"},
features = {"src/cucumber/features"},
glue ={"stepDefinitions"}
)
public class CucumberRunner {
}
Error :
Exception in thread "main" cucumber.runtime.CucumberException: Failed to
instantiate public
cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader) with
[***@1b0d33c]
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.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
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)
... 5 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)
... 10 more
Please help me in this.
Thanks & Regards,
Gaurav Sharma
I am new to cucumber. I am trying to start a project using cucumber. When I
run the .feature file, I am getting an error. I tried googling the issue
but didn't get any thing.
Please find below the details :
Feature File :
Feature:Proof of concept that my framework works
Scenario:My First Test
Given I naviagted to the zoo website
When I click on adoption link
Then I check to see that no animals are available
Runner File :
@RunWith(Cucumber.class)
@CucumberOptions(
format={"pretty", "json:target/cucumber.json"},
features = {"src/cucumber/features"},
glue ={"stepDefinitions"}
)
public class CucumberRunner {
}
Error :
Exception in thread "main" cucumber.runtime.CucumberException: Failed to
instantiate public
cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader) with
[***@1b0d33c]
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.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
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)
... 5 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)
... 10 more
Please help me in this.
Thanks & Regards,
Gaurav Sharma
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.