maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Fiedler" <mfied...@wernervas.com>
Subject RE: [testng-users] TestNG from a custom Maven2 MOJO/plugin
Date Tue, 17 Jan 2006 04:40:49 GMT
... always a good idea!

 

test the class loading of 'org.testng.annotations.Test'

Class path:...blah...;D:\data\maven_repos\testNG\testng\4.0-jdk15\testng-4.0-jdk15.jar;...blah...

sun.misc.Launcher$AppClassLoader

java.lang.Class

org.testng.annotations.Test

null

null

null

org.testng.annotations.Test

java.lang.Class

org.testng.annotations.Test

class loaded com.werner.util.UtilTest

Running test.

1234567890

1234567890

1234567890

1234567890

1234567890

 

===============================================

Suite of Tests

Total tests run: 6, Failures: 0, Skips: 0

===============================================

 

Running test.

1234567890

1234567890

1234567890

1234567890

1234567890

 

===============================================

Suite of Tests

Total tests run: 6, Failures: 0, Skips: 0

===============================================

 

 

 

 

-----Original Message-----
From: cbeust@google.com [mailto:cbeust@google.com] 
Sent: Monday, January 16, 2006 8:56 PM
To: testng-users@googlegroups.com
Cc: Maven Users List; Michael Fiedler
Subject: Re: [testng-users] TestNG from a custom Maven2 MOJO/plugin

 

Another suggestion/question, Michael:

Are you running this code just straight out of javac or through Maven?  If the latter, can
you just try to run it as a main() class?

                        TestNG testng = new TestNG(xmlSuite);
                        testng.setTestJar(jarFilename);
                        testng.setSourcePath(srcPath.getAbsolutePath() + ";" + testPath.getAbsolutePath());
                        testng.setOutputDirectory(metadataDir.getAbsolutePath() + "/testNG");
                        testng.setVerbose(1);
                        testng.setGroups("Preferred");
                        testng.run();
                        if(testng.hasFailure () && !testng.hasFailureWithinSuccessPercentage())
{
                                    throw new MojoFailureException("Testing failure occurance
is too high!");
                        }

I'd like to eliminate as many factors from the equation as possible... 

-- 
C├ędric


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message