-
-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When upgraden from 4.2.7 to 4.2.8 or newer tests wont run #3598
Comments
The changes between those versions are quite small I believe - can you be more specific about what is not working? If you need direct help with your company project we can do that with the commercial support packages. |
The main difference is in serenity-cucumber, where serenity-junit5 was added. My project has a junit4 runner like this: import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
features = "src/test/resources/features",
tags = "not @skip"
)
public class CucumberTestIT {
} And using maven to start the suite doesnt work anymore wtih versions from 4.2.8. While starting the suite directly from the java class does work with the newer versions. But in our jenkins pipeline we use maven to start the tests. |
Have a look at the differences between the versions and see if you can see anything that might cause the issues you see. All of those things seem to work correctly in the smoke test projects and in the projects I have seen, so there may be something specific to your setup |
I found the problem, it seems that from version 4.2.8, where the serenity-junit5 artifact was added in the serenity-cucumber pom.xml at the compile scope, which caused the maven failsafe plugin to think that the tests should run with junit5. I am using version 3.5.2 from the maven-surefire-plugin. I excluded the junit platform dependency and my tests are running again: <dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>4.2.11</version>
<exclusions>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency> |
Thanks for spotting that - it is due to the batching feature being added to Cucumber. Since the hard dependency on serenity-junit5 introduces breaking changes I am rolling it back for release 4.1.12 (serenity-junit5 and serenity-cucumber should be independent). |
What happened?
I upgraded the dependencies
serenity-core, serenity-cucumber and serenity-maven-plugin from 4.2.7 to 4.2.8.
Then i tried to execute my test suite via: mvn clean verify
What did you expect to happen?
When i use 4.2.7 everthing runs as expected. With 4.2.8 no tests are run at all. I also tried newer versions, 4.2.11, with the same result
Serenity BDD version
4.2.7
JDK version
17
Execution environment
Windows, not using a browser, but executing backend tests.
How to reproduce the bug.
Its a project from work, so i cant share it. But it happened by only upgrading to 4.2.8 or newer en exectuing the maven command: mvn clean verify
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered: