Email Required, but never shown. Improving the question-asking experience. I added it manually and I made a mistake. I had an old version of the surefire plugin which was trying to run TestNG and not jUnit. I have the following POM relevant section only. Hi RyanStewart i'm in the situation where it doesn't work.
Uploader: | Daigar |
Date Added: | 3 November 2017 |
File Size: | 70.2 Mb |
Operating Systems: | Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X |
Downloads: | 6260 |
Price: | Free* [*Free Regsitration Required] |
Have you configured your maven-compile-plugin for the correct compiler level, like: Improving the question-asking experience.
Subscribe to RSS
I am trying to test a java app from Maven using JUnit. Well, at least the maven-surefire-plugin configuration if you have one or if surefire-junit.4.3.jar are inheriting one. You should always add dependencies by "Insert Dependency" menu. Here is the output from "mvn -X test": How do we handle problem users?
Notice the "Running TestSuite". Improving the question-asking experience. Maven reports it ran the test suite but did not run any of my JUnit tests Ask Question.
Add junit to your dependencies: Is there anything else I am missing? It is located here: Surefire is not picking up Junit 4 tests Ask Question.
Email Required, but never shown. Now, just to validated that this is not a "global problem" I don't think so TBHcould you create a project from scratch, for example by running:. Active 2 years, 11 months ago. However it goes surefore-junit-2.4.3.jar to say: Yeah, I saw your solution. Sign up using Email and Password. Except that I just looked back over your post and saw that testng is listed on your classpath. Thanks everybody for your help.
Index of /groups/public/org/apache/maven/surefire/surefire-junit/
Actually, you should accept your own answer as it is providing the whole solution to your problem: Could you post your POM? Then possibly leave it in that structure and add the java module as a dependency to the war project.
What is the artifact type of your pom? Your method could benefit others while debugging same problem, too. I did what you suggested and indeed both tests AppTest and my test were executed.
I spent several sureire-junit-2.4.3.jar debugging because of this "feature". Thank you so much for this tip. Last I checked, surefire will only run either testng tests or junit tests but not both in the same build. I had the same question, and for me the solution was this bug. Later I came across this Maven issue and configured surefire to run only "JUnit" tests like this: Remember that there is a naming convention to what tests will be "seen" and if you don't name the test class correctly, it is ignored.
In my case surefirre-junit-2.4.3.jar was with maven version dependecy.
No comments:
Post a Comment