Right now I have both type of tests but when I say \"mvn test\" it only executes TestNG tests and not Junit. I want to execute both one after another. Any Idea ?
Based on previous solutions. I found this worked best for us. One more issue we were facing was TestNG trying to run old JUnit tests. We avoided this by naming all TestNG tests differently (e.g. *TestNG.java). Below is the configuration with two executions of surefire-plugin.
org.apache.maven.plugins
maven-surefire-plugin
2.12.4
none:none
**/*TestNG.java
test-testng
test
test
none:none
org.testng:testng
**/*TestNG.java
**/*Test.java