[JVM] Cucumber.Options Deprecation Errors

3,836 views
Skip to first unread message

Max Saperstone

unread,
Sep 16, 2013, 10:29:45 AM9/16/13
to cu...@googlegroups.com
I have just upgraded to the latest versions of cucumber, but appear to have some issues in my cucumber setup file. My option @Cucumber.Options appears depricated, and is causing a run failure. I read through the release notes, specifically:
  • [JUnit/Core] @cucumber.junit.api.Cucumber.Options is deprecated in favour of @cucumber.api.Options (#549 Aslak Hellesøy)
but have no success re-referencing, and looked through the jars for a new option. I now can no longer run anything. Can anyone please advise. Below is my code, and error messages I am receiving, and versions:

Jars:
  • cucumber-core-1.1.5.jar
  • cucumber-html-0.2.3.jar
  • cucumber-java-1.1.5.jar
  • cucumber-junit-1.1.5.jar
  • gherkin-2.12.1.jar
Hook Code:
package dental.delta.definitions;


import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;


@RunWith(Cucumber.class)
//@RunWith(Parameterized.class)
@Cucumber.Options(
 features
= {"src/dental/delta/features/GetQuoteCompact.feature"},
 glue
= {"dental.delta.definitions"},
 format
= {"pretty",
 
"html:target/cucumber-html-report",
// "json-pretty:target/cucumber-report.json",
 
"junit:target/cucumber-junit-report/allcukes.xml"},
 tags
= {"@Smoke"}
 
//name = {""}
)
public class CucumberTestRunner {
}

Error Message
    [javac] Compiling 35 source files to C:\Users\Max Laptop\workspace\DeltaDent
alAutomation\AutomatedTests\target\classes
    [javac] Note: C:\Users\Max Laptop\workspace\DeltaDentalAutomation\AutomatedT
ests\src\dental\delta\definitions\CucumberTestRunner.java uses or overrides a de
precated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

runcukes:
    [mkdir] Created dir: C:\Users\Max Laptop\workspace\DeltaDentalAutomation\Aut
omatedTests\target\cucumber-junit-report
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: cucumber/
deps/com/thoughtworks/xstream/converters/ConverterRegistry
     [java]     at cucumber.runtime.Runtime.<init>(Runtime.java:85)
     [java]     at cucumber.runtime.Runtime.<init>(Runtime.java:67)
     [java]     at cucumber.runtime.Runtime.<init>(Runtime.java:63)
     [java]     at cucumber.api.cli.Main.run(Main.java:24)
     [java]     at cucumber.api.cli.Main.main(Main.java:16)
     [java] Caused by: java.lang.ClassNotFoundException: cucumber.deps.com.thoug
htworks.xstream.converters.ConverterRegistry
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
     [java]     ... 5 more
     [java] Java Result: 1

Max Saperstone

unread,
Sep 16, 2013, 10:39:11 AM9/16/13
to cu...@googlegroups.com
On Mon, Sep 16, 2013 at 10:29 AM, Max Saperstone <max.sap...@coveros.com> wrote:
I have just upgraded to the latest versions of cucumber, but appear to have some issues in my cucumber setup file. My option @Cucumber.Options appears depricated, and is causing a run failure. I read through the release notes, specifically:
  • [JUnit/Core] @cucumber.junit.api.Cucumber.Options is deprecated in favour of @cucumber.api.Options (#549 Aslak Hellesøy)
but have no success re-referencing, and looked through the jars for a new option. I now can no longer run anything. Can anyone please advise. Below is my code, and error messages I am receiving, and versions:

Jars:
  • cucumber-core-1.1.5.jar
  • cucumber-html-0.2.3.jar
  • cucumber-java-1.1.5.jar
  • cucumber-junit-1.1.5.jar
  • gherkin-2.12.1.jar
Hook Code:
package dental.delta.definitions;


import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;


@RunWith(Cucumber.class)
//@RunWith(Parameterized.class)
@Cucumber.Options(

Changed to @CucumberOptions, and fixed my imports. Now getting the same error, without the deprecation message


 
--
-- 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 a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/XGwW5qowMbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Max Saperstone

unread,
Sep 16, 2013, 12:17:59 PM9/16/13
to cu...@googlegroups.com
On Mon, Sep 16, 2013 at 10:39 AM, Max Saperstone <max.sap...@coveros.com> wrote:
On Mon, Sep 16, 2013 at 10:29 AM, Max Saperstone <max.sap...@coveros.com> wrote:
I have just upgraded to the latest versions of cucumber, but appear to have some issues in my cucumber setup file. My option @Cucumber.Options appears depricated, and is causing a run failure. I read through the release notes, specifically:
  • [JUnit/Core] @cucumber.junit.api.Cucumber.Options is deprecated in favour of @cucumber.api.Options (#549 Aslak Hellesøy)
but have no success re-referencing, and looked through the jars for a new option. I now can no longer run anything. Can anyone please advise. Below is my code, and error messages I am receiving, and versions:

Jars:
  • cucumber-core-1.1.5.jar
  • cucumber-html-0.2.3.jar
  • cucumber-java-1.1.5.jar
  • cucumber-junit-1.1.5.jar
  • gherkin-2.12.1.jar
Hook Code:
package dental.delta.definitions;


import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;


@RunWith(Cucumber.class)
//@RunWith(Parameterized.class)
@Cucumber.Options(

Changed to @CucumberOptions, and fixed my imports. Now getting the same error, without the deprecation message


Adding in cucumber-jvm-deps-1.0.3.jar solved this issue 
Reply all
Reply to author
Forward
0 new messages