You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Connolly <st...@gmail.com> on 2009/12/08 10:55:48 UTC
Re: maven-failsafe-plugin: multiple executions using the same test
classes
hack solution = multiple executions of verify?
I think it's summary file you need to configure...
this was a use case I had not anticipated... so integration-test and verify
both communicate using the summary file, integration test overwrites each
time
please file a jira
thanks
-Stephen
2009/12/8 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>
> Hi all,
>
> our project has a set of integration tests that have to be passed using
> *several* combinations of systemProperties/argLine. (Note that the test
> classes are identical; only the configuration changes.)
>
> Getting the tests to execute is easy; I just bind multiple executions of
> failsafe:integration-test to the integration-test phase. Getting
> failsafe:verify to pick up all tests results, however, is not, as I
> wasn't able to figure out which parameters to tweak: summaryFile?
> reportsDirectory?
>
> What is the Maven way to achieve this -- and to have all combinations of
> systemProperties/argLine show up in the project reports as well?
> Duplicating our integration tests is certainly not the way to go...
>
> Any help is greatly appreciated.
>
> Andreas Sewe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: maven-failsafe-plugin: multiple executions using the same test
classes
Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
> please file a jira
Done: <http://jira.codehaus.org/browse/MOJO-1474>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-failsafe-plugin: multiple executions using the same test
classes
Posted by Stephen Connolly <st...@gmail.com>.
if you do not specify a phase in the execution and the goals specifiy
a default phase (which they do) then they will execute in that default
phase which is why this works.
I'd depend on it in your build as Benjamin stated that the above is
correct behaviour of Maven IIRC
-Stephen
2010/1/15 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>:
> Hi Stephen,
>
> you wrote:
>>
>> hack solution = multiple executions of verify?
>
> Just for the record: Typing-wise this isn't too bad. However, I think the
> solution below should *not* work -- but it does!
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>failsafe-maven-plugin</artifactId>
> <executions>
> <execution>
> <id>first</id>
> <goals>
> <goal>integration-test</goal>
> <goal>verify</goal>
> </goals>
> <configuration>
> <reportsDirectory>
> ${project.build.directory}/failsafe-reports/first
> </reportsDirectory>
> <summaryFile>
>
> ${project.build.directory}/failsafe-reports/first/failsafe-summary.xml
> </summaryFile>
> </configuration>
> </execution>
> <!-- And again for the second execution -->
> </executions>
> </plugin>
>
> Why does this works? After all, the <phase> element is only allowed once
> within an <execution> and then applies to all goals found therein. But the
> two goals are definitely bound to different phases (their respective default
> phases); "mvn post-integration-test" does not execute the "verify" goal.
>
> Is this a bug in Maven or a behavior I can rely on in my builds? If so, I am
> quite happy with this configuration.
>
> Best wishes,
>
> Andreas Sewe
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-failsafe-plugin: multiple executions using the same test
classes
Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi Stephen,
you wrote:
> hack solution = multiple executions of verify?
Just for the record: Typing-wise this isn't too bad. However, I think
the solution below should *not* work -- but it does!
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>failsafe-maven-plugin</artifactId>
<executions>
<execution>
<id>first</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<reportsDirectory>
${project.build.directory}/failsafe-reports/first
</reportsDirectory>
<summaryFile>
${project.build.directory}/failsafe-reports/first/failsafe-summary.xml
</summaryFile>
</configuration>
</execution>
<!-- And again for the second execution -->
</executions>
</plugin>
Why does this works? After all, the <phase> element is only allowed once
within an <execution> and then applies to all goals found therein. But
the two goals are definitely bound to different phases (their respective
default phases); "mvn post-integration-test" does not execute the
"verify" goal.
Is this a bug in Maven or a behavior I can rely on in my builds? If so,
I am quite happy with this configuration.
Best wishes,
Andreas Sewe
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org