To run them together there are few options available but I have chosen using different profiles for Junit and TestNG. But now problem is with excluding and including test c
I didn't find any combined solution online for both Surefire and Failsafe. The POM file changes below worked for me.
Both solutions are hacks that I found online. I think the link to the Surefire trick is in another answer to this question.
maven-surefire-plugin
${surefire.version}
org.apache.maven.surefire
surefire-junit47
${surefire.version}
org.apache.maven.surefire
surefire-testng
${surefire.version}
org.apache.maven.plugins
maven-failsafe-plugin
${failsafe.version}
test-testng
integration-test
verify
none:none
test-junit
integration-test
verify
none:none