[JVM] upgrading to cucumber-java 1.1.4

185 views
Skip to first unread message

Sridevi Yedidha

unread,
Dec 1, 2013, 11:13:22 PM12/1/13
to cu...@googlegroups.com
I have been using cucumber-java 1.1.1 and moving to 1.1.4.
But, when I run the tests from eclipse, I am getting the following error. I am not sure why.

please let me know how I can resolve this issue.


com.xyz.test.abc.testngintgn.CucumberTestImpl.cucumber failed
java.lang.IllegalArgumentException: Not a file or directory: /Users/me/git/qa_abcTestCases/cucumbertests/classpath:cucumber/runtime
    at cucumber.runtime.io.FileResourceIterator$FileIterator.<init>(FileResourceIterator.java:54)
    at cucumber.runtime.io.FileResourceIterator.<init>(FileResourceIterator.java:20)
    at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19)
    at cucumber.runtime.io.ResourceLoaderReflections.getDescendants(ResourceLoaderReflections.java:30)
    at cucumber.runtime.io.ResourceLoaderReflections.instantiateSubclasses(ResourceLoaderReflections.java:55)
    at cucumber.runtime.Runtime.loadBackends(Runtime.java:78)
    at cucumber.runtime.Runtime.<init>(Runtime.java:52)
    at com.paypal.test.abc.testngintgn.CucumberTestImpl.cucumber(CucumberTestImpl.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)

aslak hellesoy

unread,
Dec 2, 2013, 4:47:54 AM12/2/13
to Cucumber Users
On Mon, Dec 2, 2013 at 4:13 AM, Sridevi Yedidha <sridevi...@gmail.com> wrote:
I have been using cucumber-java 1.1.1 and moving to 1.1.4.
But, when I run the tests from eclipse, I am getting the following error. I am not sure why.

please let me know how I can resolve this issue.


What options are you passing to Cucumber when you launch it?

From your stack trace it looks like your team has written their own custom runner that instantiates a new cucumber.runtime.Runtime object. I'm not sure why you have this - perhaps to use Cucumber-JVM with TestNG?

TestNG support was added to Cucumber-JVM in version 1.1.5. Have you considered using that?

Aslak
 

--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sridevi Yedidha

unread,
Dec 3, 2013, 9:37:42 AM12/3/13
to cu...@googlegroups.com
Thank you Aslak for taking a quick look.

I took testng integration code from https://github.com/talios/cucumber-testng-factory sometime back.

This is how the cucumber invocation looks like:

        RuntimeOptions runtimeOptions = new RuntimeOptions(props);
        runtimeOptions.getFeaturePaths().addAll(Arrays.asList(feature));
        runtimeOptions.getGlue().addAll(Arrays.asList(gluePaths));
        runtimeOptions.getFormatters().add(formatter);
       
        cucumber.runtime.Runtime runtime = new cucumber.runtime.Runtime(new FileResourceLoader(), classLoader, runtimeOptions);

Thanks a lot for cucumber-JVM with testNG release. If this issue is something that can be easily fixed, then I want to get this done, while I work on moving to Cucumber-JVM with testNG parallelly.
Reply all
Reply to author
Forward
0 new messages