Open mkonir0 opened 10 months ago
You need to use this plugin for Serenity 4 and Cucumber 7 regardless of whether you are running the tests in parallel or not.
@wakaleo Thanks for help! I didn't notice it in any of the migration guides.
Also in one of our projects, where we're still using junit4 we have a single cucumber runner (which is beiing executed in runtime) -
import org.junit.runner.RunWith;
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
features = { ... },
glue = { ... },
plugin = { "com.oracle.runtime.cucumber.CustomCucumberListener", "io.cucumber.core.plugin.SerenityReporterParallel" })
public class CustomCucumberRunner {
}
when we upgraded to serenity4 and started using plugin io.cucumber.core.plugin.SerenityReporterParallel
the tests started to run twice(that wasn't the case in serenity3)
there's seems to be no issue with the glue or the features values.
Could you advise me which of these annotations to use with serenity4 🙏 either this
import net.serenitybdd.cucumber.CucumberWithSerenity;
@RunWith(CucumberWithSerenity.class)
or this one
import io.cucumber.junit.Cucumber;
@RunWith(Cucumber.class)
If you are running in JUnit 4 you need to use CucumberWithSerenity with the JUnit 5 legacy mode.
What happened?
When using nested steps in Serenity 4 with Cucumber and simultaneously not using the
io.cucumber.core.plugin.SerenityReporterParallel
plugin, tests that are expected to fail are incorrectly marked as passed. This issue started occurring only after upgrading from Serenity 3 to Serenity 4 ( it worked fine before). I would also like to mention that we do not want to run steps in parallel, so using the SerenityReporterParallel plugin is not an option for us.What did you expect to happen?
since nested step contains failing assertion tests should end up as failure.
Serenity BDD version
4.0.15 (same issue is in 4.0.21)
JDK version
17
Execution environment