[ISSUE] spring-cucumber doesn't run the cucumber tests
pgfaller opened this issue · comments
Article and Module Links
Cucumber Spring Integration
Affected module
Describe the Issue
mvn test
only runs the SpringContextText
and skips the Cucumber tests
To Reproduce
Steps to reproduce the behavior:
- Clone the repository
- Change directory to tutorials/spring-cucumber
- Run
mvn clean compile test
- Observe that only one test runs
Expected Behavior
Expected to see more than one test run, and expected to see results of the Cucumber tests
Screenshots
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ spring-cucumber ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.baeldung.SpringContextTest
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.1.5)
08:18:06.600 [main] INFO com.baeldung.SpringContextTest - Starting SpringContextTest using Java 17.0.4 with PID 3268 (started by peter in C:\Users\peter\Baeldung\tutorials\spring-cucumber)
08:18:06.610 [main] INFO com.baeldung.SpringContextTest - No active profile set, falling back to 1 default profile: "default"
08:18:08.605 [main] INFO com.baeldung.SpringContextTest - Started SpringContextTest in 2.756 seconds (process running for 5.136)
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.529 s - in com.baeldung.SpringContextTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.127 s
[INFO] Finished at: 2023-12-19T08:18:09+02:00
[INFO] ------------------------------------------------------------------------
Environment (please complete the following information):
- OS: Windows
- Browser: N/A
- Version: N/A
Additional Context
PS C:\Users\peter\Baeldung\tutorials\spring-cucumber> mvn --version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Users\peter\apache-maven-3.8.6
Java version: 17.0.4, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.4.8-hotspot
Default locale: en_ZA, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Thanks for the clarification @ulisseslima