Closed alvigo92 closed 4 years ago
Cucumber 5 has changed some of the class locations - just delete your imports and reimport.
I have already done what you said on my project files, but i am having problems with that file, that actually is from this project.
Ah, I see. serenity-core 2.2.0+ is only compatible with Cucumber 5, so must be used with serenity-cucumber5 (https://github.com/serenity-bdd/serenity-cucumber5). This repo is for Cucumber 2.x, which is deprecated.
Ok. With that version my project compiles fine. But the glue is not working properly. As far as i have read, the cucumber options, have changed. How am i supposed to do it? Actually i am using them like this:
@CucumberOptions( features = {"directory"}, plugin = {"pretty", "html:target/cucumber", "json:target/cucumber-report.json"}, glue = {"package1", "package2"})
I am talking about this, because i see this new warning:
WARNING: Passing commandline options via the property
cucumber.optionshas been deprecatedin favour of explicitly using property names. Please use these instead: [cucumber.ansi-colors.disabled, cucumber.execution.dry-run, cucumber.execution.limit, cucumber.execution.order, cucumber.execution.strict, cucumber.execution.wip, cucumber.features, cucumber.filter.name, cucumber.filter.tags, cucumber.glue, cucumber.object-factory, cucumber.plugin, cucumber.snippet-type]
You can ignore that warning for now.
The problem I have is that the steps from package2, are being ignored.
I don't think the warning is related to the @CucumberOptions annotation - its about how you pass options through on the command line.
Ok. I will work on it, and try to find out whats going on. Thank you very much.
The warning resolves once the command line options are passed in the newer format. e.g. -Dcucumber.fiter.tags ="@some_tags" -Ducucumber.filter.name="^My test scenario$"
The package serenity-core (version 2.2.0) has been updated to work with Cucumber 5.5, but the class
CucumberWithSerenity
is still using some java classes from older versions of cucumber, making it imposible to be used.