Posted on 16 Aug 2022, this text provides information on QA/Testing related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
I have a maven program, it compiles fine. When I run mvn test it does not run any tests (under TESTs header says There are no tests">tests to run.).
I've recreated this problem with a super simple setup which I will include below as well as the output when run with -X.
The unit tests run fine from eclipse (both with its default junit package and when I instead include the junit.jar downloaded by maven). Also mvn test-compile correctly creates the class under test-classes. I am running this on OSX 10.6.7 with Maven 3.0.2 and java 1.6.0_24.
xml version="1.0" encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">4.0.0my_groupmy_programjar1.0-SNAPSHOTMy Programjunitjunit4.8.1testorg.apache.maven.pluginsmaven-compiler-plugin1.51.5project>
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
2 years ago
I have a maven program, it compiles fine. When I run
mvn test
it does not run any tests (under TESTs header saysThere are no tests">tests to run.
).I've recreated this problem with a super simple setup which I will include below as well as the output when run with
-X
.The unit tests run fine from eclipse (both with its default junit package and when I instead include the junit.jar downloaded by maven). Also mvn
test-compile
correctly creates the class under test-classes. I am running this on OSX 10.6.7 with Maven 3.0.2 and java 1.6.0_24.Here is the directory structure:
pom.xml:
ClassUnderTest.java:
ClassUnderTestTests.java: