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/05/18 18:16:50 UTC
Anyone have a plugin to check if the surefire tests pass?
Hey, before you think this guy is crazy, surefire will do that for you...
pre-integration-test: jetty:run daemon=true
integration-test: surefire:test testFailureIgnore=true
post-integration-test: jetty:stop
verify: ______:______
so that I can run my integration tests and tidy-up afterwards and then fail
the build after the tidy-up...
yes, yes, yes I know about putting the tests in a separate module and all
that jazz... but this is in some ways a bit cleaner
-Stephen
Re: Anyone have a plugin to check if the surefire tests pass?
Posted by Jeffrey N Hagelberg <jn...@us.ibm.com>.
We've got one. It uses the SurefireReportParser from the
maven-surefire-report-plugin to parse the reports. I'll have to get
permission from my manager to send it, but that's the basic idea.
-Jeff
Jeffrey Hagelberg, Software Engineer
XMeta Development
IBM Software Group
Phone: 978-899-2055 T/L:276-2055)
Email:jnhagelb@us.ibm.com
From: Kalle Korhonen <ka...@gmail.com>
To: Maven Users List <us...@maven.apache.org>
Date: 05/18/2009 04:00 PM
Subject: Re: Anyone have a plugin to check if the surefire tests pass?
Why don't you just write a unit test base class that runs Jetty embedded?
If
you store the server in a static attribute and start it in @BeforeClass (or
similar) conditionally if hasn't been started before, you'll save the
restart costs between each test. As a bonus, these integration tests are
easily runnable from your IDE. This is exactly what I do.
Kalle
On Mon, May 18, 2009 at 9:16 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> Hey, before you think this guy is crazy, surefire will do that for you...
>
> pre-integration-test: jetty:run daemon=true
> integration-test: surefire:test testFailureIgnore=true
> post-integration-test: jetty:stop
> verify: ______:______
>
> so that I can run my integration tests and tidy-up afterwards and then
fail
> the build after the tidy-up...
>
> yes, yes, yes I know about putting the tests in a separate module and all
> that jazz... but this is in some ways a bit cleaner
>
> -Stephen
>
Re: Anyone have a plugin to check if the surefire tests pass?
Posted by Kalle Korhonen <ka...@gmail.com>.
Why don't you just write a unit test base class that runs Jetty embedded? If
you store the server in a static attribute and start it in @BeforeClass (or
similar) conditionally if hasn't been started before, you'll save the
restart costs between each test. As a bonus, these integration tests are
easily runnable from your IDE. This is exactly what I do.
Kalle
On Mon, May 18, 2009 at 9:16 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> Hey, before you think this guy is crazy, surefire will do that for you...
>
> pre-integration-test: jetty:run daemon=true
> integration-test: surefire:test testFailureIgnore=true
> post-integration-test: jetty:stop
> verify: ______:______
>
> so that I can run my integration tests and tidy-up afterwards and then fail
> the build after the tidy-up...
>
> yes, yes, yes I know about putting the tests in a separate module and all
> that jazz... but this is in some ways a bit cleaner
>
> -Stephen
>
Re: Anyone have a plugin to check if the surefire tests pass?
Posted by Brian Fox <br...@infinity.nu>.
Use one of the enforcer rules or make a new one to validate the conditionss.
On Mon, May 18, 2009 at 2:59 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:
> nope.
>
> that will stop trying to build the current module but continue with the
> next module... I don't want the current module to stop after
> integration-test but after verify
>
> I have a sneaky feeling I'm going to have to write a plugin to do this
>
> but seriously, my use case has got to have been faced by somebody else
> already
>
> Sent from my [rhymes with myPod] ;-)
>
>
> On 18 May 2009, at 18:31, "Edelson, Justin" <Ju...@mtvstaff.com>
> wrote:
>
> Can you use -fae to do this?
>>
>> On May 18, 2009, at 12:17 PM, "Stephen Connolly" <
>> stephen.alan.connolly@gmail.com> wrote:
>>
>> Hey, before you think this guy is crazy, surefire will do that for you...
>>>
>>> pre-integration-test: jetty:run daemon=true
>>> integration-test: surefire:test testFailureIgnore=true
>>> post-integration-test: jetty:stop
>>> verify: ______:______
>>>
>>> so that I can run my integration tests and tidy-up afterwards and then
>>> fail
>>> the build after the tidy-up...
>>>
>>> yes, yes, yes I know about putting the tests in a separate module and all
>>> that jazz... but this is in some ways a bit cleaner
>>>
>>> -Stephen
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: Anyone have a plugin to check if the surefire tests pass?
Posted by Stephen Connolly <st...@gmail.com>.
nope.
that will stop trying to build the current module but continue with
the next module... I don't want the current module to stop after
integration-test but after verify
I have a sneaky feeling I'm going to have to write a plugin to do this
but seriously, my use case has got to have been faced by somebody else
already
Sent from my [rhymes with myPod] ;-)
On 18 May 2009, at 18:31, "Edelson, Justin"
<Ju...@mtvstaff.com> wrote:
> Can you use -fae to do this?
>
> On May 18, 2009, at 12:17 PM, "Stephen Connolly" <stephen.alan.connolly@gmail.com
> > wrote:
>
>> Hey, before you think this guy is crazy, surefire will do that for
>> you...
>>
>> pre-integration-test: jetty:run daemon=true
>> integration-test: surefire:test testFailureIgnore=true
>> post-integration-test: jetty:stop
>> verify: ______:______
>>
>> so that I can run my integration tests and tidy-up afterwards and
>> then fail
>> the build after the tidy-up...
>>
>> yes, yes, yes I know about putting the tests in a separate module
>> and all
>> that jazz... but this is in some ways a bit cleaner
>>
>> -Stephen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Anyone have a plugin to check if the surefire tests pass?
Posted by "Edelson, Justin" <Ju...@mtvstaff.com>.
Can you use -fae to do this?
On May 18, 2009, at 12:17 PM, "Stephen Connolly" <stephen.alan.connolly@gmail.com
> wrote:
> Hey, before you think this guy is crazy, surefire will do that for
> you...
>
> pre-integration-test: jetty:run daemon=true
> integration-test: surefire:test testFailureIgnore=true
> post-integration-test: jetty:stop
> verify: ______:______
>
> so that I can run my integration tests and tidy-up afterwards and
> then fail
> the build after the tidy-up...
>
> yes, yes, yes I know about putting the tests in a separate module
> and all
> that jazz... but this is in some ways a bit cleaner
>
> -Stephen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org