easiest way to replay tests for a set of configurations

12 views
Skip to first unread message

AdrianCole

unread,
Jun 30, 2009, 4:46:38 AM6/30/09
to testng-users
Hello.

I'm working on a project called jclouds, which has pluggable
transports for cloud services. I'd like to replay all of my testng
integration tests for each transport and without a lot of custom code
or configuration.

What's the easiest way to accomplish this using testng and maven?
These tests currently execute in the integration-test phase of maven
via pattern matching on test class name.

Regards,
-Adrian
http://code.google.com/p/jclouds

Cédric Beust ♔

unread,
Jun 30, 2009, 9:39:52 AM6/30/09
to testng...@googlegroups.com
Can you give more details on what changes between configurations?

If it's just simple values, you could just use variables defined inside testng.xml.  If you need more complex values, such as full Java objects, there are more advanced techniques, among which:
  • Run TestNG programmatically and set these values yourself in code before calling testng.run().
  • Create a synthetic testng.xml file.
--
Cedric
--
Cédric


AdrianCole

unread,
Jul 1, 2009, 1:32:18 PM7/1/09
to testng-users
Thanks for the attention, Cédric. The only thing that changes is the
implementation of the Guice Module, which is a no-arg constructor
object. I'm specifically hoping to find an integration pattern that
works within the maven lifecycle to replay all tests for each Module
in a list.

Thanks again,
-Adrian
jclouds

On Jun 30, 3:39 pm, Cédric Beust ♔ <cbe...@google.com> wrote:
> Can you give more details on what changes between configurations?
>
> If it's just simple values, you could just use variables defined inside
> testng.xml.  If you need more complex values, such as full Java objects,
> there are more advanced techniques, among which:
>
>    - Run TestNG programmatically and set these values yourself in code
>    before calling testng.run().
>    - Create a synthetic testng.xml file.
>
> --
> Cedric
>
>
>
> On Tue, Jun 30, 2009 at 1:46 AM, AdrianCole <fernc...@gmail.com> wrote:
>
> > Hello.
>
> > I'm working on a project called jclouds, which has pluggable
> > transports for cloud services.  I'd like to replay all of my testng
> > integration tests for each transport and without a lot of custom code
> > or configuration.
>
> > What's the easiest way to accomplish this using testng and maven?
> > These tests currently execute in the integration-test phase of maven
> > via pattern matching on test class name.
>
> > Regards,
> > -Adrian
> >http://code.google.com/p/jclouds
>
> --
> ***Cédric
> *
Reply all
Reply to author
Forward
0 new messages