fabianlinz / serenity-junit5

JUnit5 integration for Serenity BDD
Apache License 2.0
6 stars 11 forks source link

"There were failing tests" without any tests actually running #29

Closed JoaoGFarias closed 3 years ago

JoaoGFarias commented 3 years ago

Immediately after running gradle clean test aggregate, I receive a message that there were test errors, despite no test actually running.

image

My setup is as follows:

build.gradle

image

image

And I have a test runner, which previously use @RunWith, but now it uses @SerenityTest

image

Does this plugin support @CucumberOptions properly, so it will glue the code in stepDefinitions?

fabianlinz commented 3 years ago

This project is intended to allow defining scenarios with Serenity BDD directly in Junit5 Jupiter style/syntax (see also https://github.com/serenity-bdd/serenity-core/issues/1039#issuecomment-731555744 and https://serenity-bdd.github.io/theserenitybook/latest/junit-basic.html)

Cucumber support is a different story (so @SerenityTest is not a replacement for @RunWith(CucumberWithSerenity.class)). As far as I know Cucumber has support to run on the Junit5 Platform (by implementing a custom engine). So in contrast to this project they do not extend Junit5 Jupiter. See also https://junit.org/junit5/docs/current/user-guide/#overview-what-is-junit-5 for more details on the difference between Junit5 Platform and Jupiter, as well as https://github.com/cucumber/cucumber-jvm/issues/1149#issuecomment-373544140).

At the moment I think the junit-platform-engine is not supported by serenity-cucumber6. Also not sure about the state of the Junit5 engine for Cucumber.