Skip to content

cucumber-jvm/examples/spring-txn isn't really run #1916

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

Closed
christianhujer opened this issue Mar 6, 2020 · 2 comments
Closed

cucumber-jvm/examples/spring-txn isn't really run #1916

christianhujer opened this issue Mar 6, 2020 · 2 comments
Labels
🐛 bug Defect / Bug

Comments

@christianhujer
Copy link

christianhujer commented Mar 6, 2020

Describe the bug
cucumber-jvm/examples/spring-txn isn't really run. When you run mvn package or mvn verify there, the report is as follows:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

This means that the tests aren't really run.
(Also, there is no output from Spring.)

To Reproduce
Steps to reproduce the behavior:

  1. git clone cucumber-jvm
  2. cd cucumber-jvm/examples/spring-txn
  3. mvn package

If you like, modify src/test/java/io/cucumber/examples/spring/txn/SeeMessagesStepDefinitions.java and insert org.junit.jupiter.api.Assertions.fail(); as the first statement in method there_is_a_User().

Expected behavior
Tests are run.

Context & Motivation
I wanted to use test isolation via Spring transactions in a project and couldn't get it running, so I thought of checking the Cucumber example, and that's when I figured that the Cucumber example for how to do this actually isn't run.

Screenshots
If applicable, add screenshots to help explain your problem.

Your Environment

  • Versions used: Cucumber 5.4.2
  • Operating System and version: Ubuntu 18.04.4 LTS
  • Build tool: Apache Maven 3.6.3

Workaround (also possible solution)

  1. Point the Maven Surefire Plugin to version 3.0.0-M4
  2. Add a dependency (to the normal bom, not the plugin) for org.junit.platform:junit-platform-commons:1.6.0
    Now the tests are running as expected (and they pass).
@christianhujer christianhujer added the 🐛 bug Defect / Bug label Mar 6, 2020
@mpkorstanje
Copy link
Contributor

Cheers!

@thinkingdyw
Copy link

@TxN don't work

Environment
Versions used: Cucumber 5.6.0
springboot:1.2.3
Build tool: Apache Maven 3.6.3
junit :4.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

No branches or pull requests

3 participants