`mvn test` doesn't run tests
See original GitHub issueHi all,
I’m having trouble executing Karate tests using Maven. Any help is welcome 😉
Steps to reproduce :
Create a new project using archetype
mvn archetype:generate \
-DarchetypeGroupId=com.intuit.karate \
-DarchetypeArtifactId=karate-archetype \
-DarchetypeVersion=0.9.4 \
-DgroupId=com.mycompany \
-DartifactId=myproject
Run tests
$ cd myproject
$ mvn test
Expected
Tests are compiled, then run.
Actual
Tests are compiled, but never run. The folder target/surefire-reports
doesn’t exist.
Here is the mvn test
output :
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.mycompany:myproject >-----------------------
[INFO] Building myproject 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myproject ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /tmp/karate/myproject/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ myproject ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ myproject ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ myproject ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /tmp/karate/myproject/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ myproject ---
[INFO] Surefire report directory: /tmp/karate/myproject/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.486 s
[INFO] Finished at: 2019-07-09T11:18:47+02:00
[INFO] ------------------------------------------------------------------------
About my environment
$ mvn --version
Apache Maven 3.6.1 (NON-CANONICAL_2019-05-22T16:10:23+02:00_root; 2019-05-22T16:10:23+02:00)
Maven home: /opt/maven
Java version: 1.8.0_222, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk/jre
Default locale: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.1.15-arch1-1-arch", arch: "amd64", family: "unix"
Thanks 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Why Maven Doesn't Find JUnit Tests to Run - Baeldung
Placing tests in the wrong folder is another reason why the tests aren't considered for execution. This occurs mainly due to the default...
Read more >Maven doesn't execute any unit test - Stack Overflow
I am using Maven with multi-modules. There are 3 projects. ... I do got tests in my projects. But why it doesn't run...
Read more >`mvn test` doesn't run tests · Issue #823 · karatelabs/karate
Hi all, I'm having trouble executing Karate tests using Maven. Any help is welcome ;) Steps to reproduce : Create a new project...
Read more >Why Your JUnit 5 Tests Are Not Running Under Maven - DZone
Do you have JUnit 5 tests that run fine from your IDE but fail to run under Maven? Your test output looks like...
Read more >Maven Surefire Plugin – Inclusions and Exclusions of Tests
Tests from dependencies. In order to scan dependencies by the Surefire plugin and find the test classes to execute in the dependencies, use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@yaci only 2 suggestions. try with karate 0.9.5.RC3 also refer: https://github.com/intuit/karate/wiki/Gradle
@reddyharinath I’m sorry I can’t help unless you follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue