1

I am trying to integrate jbehave-maven-plugin with cargo-maven2-plugin.

jbehave-maven-plugin is configured to run during integration-test phase

<configuration>
    <scope>compile</scope>
    <ignoreFailureInStories>true</ignoreFailureInStories>
    <ignoreFailureInView>false</ignoreFailureInView>
    <verboseFailures>true</verboseFailures>
    <batch>true</batch>
    ...
</configuration>
<executions>
<execution>
    <id>run-stories-as-embeddables</id>
    <phase>integration-test</phase>
    <goals>
        <goal>run-stories-as-embeddables</goal>
    </goals>
</execution>

cargo-maven2-plugin is configured to cargo:start server and deploy web app war in pre-integration-test phase and cargo:stop server in post-integration-test

My Intention is to

  • Starts server & deploy apps in pre-integration-test phase
  • Run jBehave tests in integration-test phase
  • Stop server in post-integration-test phase
  • Report any test failures in verify phase

when I try to run this setup with

mvn clean verify

it works fine when there are no test failures.

However when there are test failures maven stops in integration-test phase and rest of the phases are not executed . this results in failure to stop server.

Is there any way to make this setup work so that reports are generated and failures are reported in verify phase

just like Maven Failsafe Plugin does with two distinct goals (failsafe:integration-test & failsafe:verify ) ?

Prashant Bhate
  • 10,907
  • 7
  • 47
  • 82
  • In my opinion you have to change `ignoreFailureInView` to true. Furthermore it sounds like the jbehave-maven-plugin behaves not correctly in the situation where a story etc. has failed. Can you show a log file excerpt? – khmarbaise May 01 '14 at 11:28
  • If I set ignoreFailureInView to true it wouldn't report failure at all – Prashant Bhate May 01 '14 at 11:57

0 Answers0