Question

I am using Junit and Maven along with selenium. For reporting i am using surefire plugin. My requirement is to update the surefire reports with message on failure. It can be done using Assert but it will abort the test case. But i dont want to abort it but to just report it.

Était-ce utile?

La solution

you can use the maven.test.failure.ignore property (system property on command line) like:

mvn -Dmaven.test.failure.ignore=true 

or to ignore failures during build process you can use the configuration for the maven-surefire-plugin:

<configuration>
  .
  <testFailureIgnore>true</testFailureIgnore>
  .
</configuration>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top