You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erik Drolshammer <dr...@idi.ntnu.no> on 2007/11/14 00:11:24 UTC

Testng with testng.xml config file

Hi!
(This is a repost of a previous response to an old thread.)
I can't get the suiteXmlFile configuration option to work properly.

Can anyone point me to a testng.xml file that runs the same set of tests
as are run without any config? (Or any working testng.xml file that is 
not completely trivial?)


(I have searched the src for the surefire-plugin, but I couldn't find
the default testng.xml file.)


Context:
We have a lot of junit3 tests that we want to reuse. We want to follow 
maven's recommended directory structure as much as possible. And we want 
the grouping that testng provides to make it easier to run different 
sets of tests in different environments.

I have looked at the following resources:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html
http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html

I got maven to run with testng 5.5 by using
<plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-surefire-plugin</artifactId>
             <version>2.4-collab-SNAPSHOT</version>
             </plugin>

and

<dependency>
             <groupId>org.testng</groupId>
             <artifactId>testng</artifactId>
             <version>5.5</version>
             <scope>test</scope>
             <classifier>jdk15</classifier>
         </dependency>


-- 
Regards
Erik Drolshammer

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


Re: Testng with testng.xml config file

Posted by Erik Drolshammer <dr...@idi.ntnu.no>.
On Wed, 2007-11-14 at 00:11 +0100, Erik Drolshammer wrote:
> I can't get the suiteXmlFile configuration option to work properly.
> 
> Can anyone point me to a testng.xml file that runs the same set of tests
> as are run without any config? (Or any working testng.xml file that is 
> not completely trivial?)

Anyone got a testng.xml file that works from maven? 
(Preferable one that at least runs all junit tests in src/test/java.) 

-- 
Regards
Erik Drolshammer 


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


Re: Testng with testng.xml config file

Posted by Erik Drolshammer <dr...@idi.ntnu.no>.
On Tue, 2007-11-13 at 22:41 -0600, Wayne Fay wrote:
> I would assume the code/config would be somewhere under:
> http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/
> 
> Or possibly:
> http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/
> 
> I would assume the default configuration is not stored in an actual
> testng.xml file but instead coded in the plugin code, and then the
> configuration is passed into the TestNG runner when it is executed.

I couldn't find any testng.xml file, so I'm afraid you're right. 

-- 
Regards 
Erik Drolshammer 


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


Re: Testng with testng.xml config file

Posted by Wayne Fay <wa...@gmail.com>.
I would assume the code/config would be somewhere under:
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/

Or possibly:
http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-plugin/

I would assume the default configuration is not stored in an actual
testng.xml file but instead coded in the plugin code, and then the
configuration is passed into the TestNG runner when it is executed.

Wayne

On 11/13/07, Erik Drolshammer <dr...@idi.ntnu.no> wrote:
> Hi!
> (This is a repost of a previous response to an old thread.)
> I can't get the suiteXmlFile configuration option to work properly.
>
> Can anyone point me to a testng.xml file that runs the same set of tests
> as are run without any config? (Or any working testng.xml file that is
> not completely trivial?)
>
>
> (I have searched the src for the surefire-plugin, but I couldn't find
> the default testng.xml file.)
>
>
> Context:
> We have a lot of junit3 tests that we want to reuse. We want to follow
> maven's recommended directory structure as much as possible. And we want
> the grouping that testng provides to make it easier to run different
> sets of tests in different environments.
>
> I have looked at the following resources:
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html
>
> I got maven to run with testng 5.5 by using
> <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-surefire-plugin</artifactId>
>             <version>2.4-collab-SNAPSHOT</version>
>             </plugin>
>
> and
>
> <dependency>
>             <groupId>org.testng</groupId>
>             <artifactId>testng</artifactId>
>             <version>5.5</version>
>             <scope>test</scope>
>             <classifier>jdk15</classifier>
>         </dependency>
>
>
> --
> Regards
> Erik Drolshammer
>
> ---------------------------------------------------------------------
> 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