Forum Discussion

cliffberg's avatar
cliffberg
Not applicable
1 year ago

Cannot get Cucumber to run tests under Maven Failsafe plugin and JUnit 5

I have tried everything. I cannot get the Maven Failsafe plugin to run my cucumber tests. I am not new at this. I had a configuration that worked great under JUnit 4. On upgrading to 5, and using the new structure for the test runner, I have not been able to get Cucumber to run any tests. I have all of the JUnit and Cucumber dependencies. I have all of the artifacts in the right places. I have had GPT/4o check my configuration. I am using the latest versions. It just doesn't work.

It is likely something that I have wrong, but these tools should not be so brittle.

I am attaching the POM and an image of my directory structure.

1 Reply

  • mancy34's avatar
    mancy34
    New Contributor

    This sounds like a JUnit 4 → JUnit 5 configuration issue, particularly around Cucumber’s JUnit Platform engine and Maven Failsafe test discovery. If you’re still dealing with it, checking those versions and the Failsafe include patterns would be a good place to start.