Jenkins + selenium tests with failsafe plugin <p>I have a Jenkins platform which calls maven to make unit tests (with surefire plugin) and integration tests (with failsafe plugin). When there is an error in the integration tests, Jenkins considers the build as successfull. Is this behavior normal? I'd prefer it considers the build as unstable. More generally, do you know how Jenkins read and interprets the result of the build to consider a build as successfull or unstable? I read somewhere on the net that the failsafe reports must be redirected to the surefire report path. I did id but the problem is still here.</p> <p>pom.xml :</p> <pre class="lang-xml prettyprint-override"><code>[...] &lt;plugin&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;version&gt;2.10&lt;/version&gt; &lt;configuration&gt; &lt;disableXmlReport&gt;false&lt;/disableXmlReport&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;default-test&lt;/id&gt; &lt;phase&gt;test&lt;/phase&gt; &lt;configuration&gt; &lt;includes&gt; &lt;include&gt;**/tests/**&lt;/include&gt; &lt;/includes&gt; &lt;excludes&gt; &lt;exclude&gt;**/testsIntegration/**&lt;/exclude&gt; &lt;/excludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt; &lt;version&gt;2.7.2&lt;/version&gt; &lt;configuration&gt; &lt;disableXmlReport&gt;false&lt;/disableXmlReport&gt; &lt;reportsDirectory&gt;${basedir}/target/surefire-reports&lt;/reportsDirectory&gt; &lt;includes&gt; &lt;include&gt;com/acelys/conventionsJuridiques/*.java&lt;/include&gt; &lt;!-- ... inclure les tests Selenium --&gt; &lt;/includes&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;integration-test&lt;/id&gt; &lt;phase&gt;integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;integration-test&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;includes&gt; &lt;include&gt;**/testsIntegration/**&lt;/include&gt; &lt;/includes&gt; &lt;excludes&gt; &lt;exclude&gt;**/tests/**&lt;/exclude&gt; &lt;/excludes&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; [...] </code></pre> <p>output of jenkins :</p> <pre><code>[...] mojoStarted org.apache.maven.plugins:maven-failsafe-plugin:2.7.2(integration-test) [INFO] [INFO] --- maven-failsafe-plugin:2.7.2:integration-test (integration-test) @ BaseContrats --- [INFO] Failsafe report directory: C:\jenkins_home\workspace\Base Contrats EXT JS MAVEN\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.acelys.conventionsJuridiques.testsIntegration.connexion.TestConnexion Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 23.971 sec &lt;&lt;&lt; FAILURE! Results : Failed tests: testHomePage(com.acelys.conventionsJuridiques.testsIntegration.connexion.TestConnexion) Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! mojoSucceeded org.apache.maven.plugins:maven-failsafe-plugin:2.7.2(integration-test) mojoStarted org.apache.tomcat.maven:tomcat6-maven-plugin:2.1-SNAPSHOT(tomcat-shutdown) [INFO] [INFO] --- tomcat6-maven-plugin:2.1-SNAPSHOT:shutdown (tomcat-shutdown) @ BaseContrats --- 25 févr. 2013 09:32:08 org.apache.coyote.http11.Http11Protocol destroy INFO: Stopping Coyote HTTP/1.1 on http-8080 25 févr. 2013 09:32:08 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 25 févr. 2013 09:32:08 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc mojoSucceeded org.apache.tomcat.maven:tomcat6-maven-plugin:2.1-SNAPSHOT(tomcat-shutdown) projectSucceeded BaseContrats:BaseContrats:1.0-SNAPSHOT sessionEnded [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:07.408s [INFO] Finished at: Mon Feb 25 09:32:08 CET 2013 [INFO] Final Memory: 13M/51M [INFO] ------------------------------------------------------------------------ Projects to build: [MavenProject: BaseContrats:BaseContrats:1.0-SNAPSHOT @ C:\jenkins_home\workspace\Base Contrats EXT JS MAVEN\pom.xml] [JENKINS] Archiving C:\jenkins_home\workspace\Base Contrats EXT JS MAVEN\pom.xml to C:\jenkins_home\jobs\Base Contrats EXT JS MAVEN\modules\BaseContrats$BaseContrats\builds\2013-02-25_09-29-58\archive\BaseContrats\BaseContrats\1.0-SNAPSHOT\BaseContrats-1.0-SNAPSHOT.pom [JENKINS] Archiving C:\jenkins_home\workspace\Base Contrats EXT JS MAVEN\target\ConventionsJuridiques.war to C:\jenkins_home\jobs\Base Contrats EXT JS MAVEN\modules\BaseContrats$BaseContrats\builds\2013-02-25_09-29-58\archive\BaseContrats\BaseContrats\1.0-SNAPSHOT\BaseContrats-1.0-SNAPSHOT.war channel stopped Finished: SUCCESS </code></pre>