You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Todd Chapman <to...@chaka.net> on 2014/01/10 22:59:36 UTC

Running cleanup code after tests in multi-module project.

What is the best way to run cleanup code after testing a multi-module
project?

Basically, post-integration-test for the entire reactor. Is the best way to
create another module that is last to run in the reactor order?

Thanks!

-Todd

Re: Running cleanup code after tests in multi-module project.

Posted by Barrie Treloar <ba...@gmail.com>.
On 14 January 2014 10:49, Todd Chapman <to...@chaka.net> wrote:
> Anders,
>
> I agree with you. Unfortunately I inherited this project and there is setup
> required that is identical for each module and is expensive to set up and
> tear down. It will take time to refactor the tests to be less expensive to
> prepare.
>
> In the mean time I'm looking for ways to deal with situation I have now.

It sounds like these tests are not unit tests if they need any
setup/teardown of external systems.
These are integration tests.

It would make more sense to move these tests into one integration-test module.
You then get your one setup/teardown and all the tests are together.

It should be a matter of moving things around in version control
rather than having to refactor the tests.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Running cleanup code after tests in multi-module project.

Posted by Todd Chapman <to...@chaka.net>.
Anders,

I agree with you. Unfortunately I inherited this project and there is setup
required that is identical for each module and is expensive to set up and
tear down. It will take time to refactor the tests to be less expensive to
prepare.

In the mean time I'm looking for ways to deal with situation I have now.

Thanks!

-Todd


On Mon, Jan 13, 2014 at 2:48 PM, Anders Hammar <an...@hammar.net> wrote:

> IMO each Maven project should be independent, even test projects. So there
> should be cleanup code in each module.
>
>
> On Fri, Jan 10, 2014 at 10:59 PM, Todd Chapman <to...@chaka.net> wrote:
>
> > What is the best way to run cleanup code after testing a multi-module
> > project?
> >
> > Basically, post-integration-test for the entire reactor. Is the best way
> to
> > create another module that is last to run in the reactor order?
> >
> > Thanks!
> >
> > -Todd
> >
>

Re: Running cleanup code after tests in multi-module project.

Posted by Anders Hammar <an...@hammar.net>.
IMO each Maven project should be independent, even test projects. So there
should be cleanup code in each module.


On Fri, Jan 10, 2014 at 10:59 PM, Todd Chapman <to...@chaka.net> wrote:

> What is the best way to run cleanup code after testing a multi-module
> project?
>
> Basically, post-integration-test for the entire reactor. Is the best way to
> create another module that is last to run in the reactor order?
>
> Thanks!
>
> -Todd
>