maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Beust ♔ <cbe...@google.com>
Subject Re: [testng-users] TestNG from a custom Maven2 MOJO/plugin
Date Tue, 17 Jan 2006 02:55:39 GMT
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