maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r596825 - in /maven/surefire/trunk/surefire-integration-tests: ./ src/test/java/org/apache/maven/surefire/its/ src/test/resources/argLine-parameter/ src/test/resources/argLine-parameter/src/ src/test/resources/argLine-parameter/src/test/ sr...
Date Tue, 20 Nov 2007 21:00:59 GMT
Author: dfabulich
Date: Tue Nov 20 13:00:55 2007
New Revision: 596825

URL: http://svn.apache.org/viewvc?rev=596825&view=rev
Log:
More integration tests

Added:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/TestSurefireArgLine.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/TestSurefire2.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/TestSurefire3.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/TestNGSuiteTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/TestNGTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/TestNGJavadocTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/JunitTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/TestNGJunitTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/TestNGSuiteTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/TestNGSuiteTest.java
Modified:
    maven/surefire/trunk/surefire-integration-tests/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java

Modified: maven/surefire/trunk/surefire-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/pom.xml?rev=596825&r1=596824&r2=596825&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/pom.xml Tue Nov 20 13:00:55 2007
@@ -41,6 +41,7 @@
             <include>org/**/*Test.java</include>
             <include>org/**/*TestCase.java</include>
           </includes>
+          <testFailureIgnore>true</testFailureIgnore>
         </configuration>
       </plugin>
     </plugins>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,30 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test passing an argLine parameter
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class ArgLineTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testDefaultConfiguration ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/argLine-parameter" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );        
+    }
+}

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java?rev=596825&r1=596824&r2=596825&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationTest.java Tue Nov 20 13:00:55 2007
@@ -1,13 +1,10 @@
 package org.apache.maven.surefire.its;
 
 import java.io.File;
-import java.util.List;
 
 import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.plugins.surefire.report.ReportTestSuite;
-import org.apache.maven.plugins.surefire.report.SurefireReportParser;
 
 /**
  * Test basic default configuration, runs the JUnit 3 test in the src/test directory.
@@ -23,25 +20,11 @@
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration" );
 
-        Verifier verifier;
-
-        verifier = new Verifier( testDir.getAbsolutePath() );
-        verifier.deleteArtifact( "org.apache.maven.surefire.its", "default-configuration", "1.0-SNAPSHOT", "jar" );
-
-//        verifier.executeGoal( "clean" );
-//        verifier.verifyErrorFreeLog();
-//        verifier.resetStreams();
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
         verifier.executeGoal( "test" );
         verifier.verifyErrorFreeLog();
         verifier.resetStreams();
-        SurefireReportParser parser = new SurefireReportParser();
-        File reportsDir = new File( testDir, "target/surefire-reports" );
-        assertTrue( "Reports directory is missing: " + reportsDir.getAbsolutePath(), reportsDir.exists() );
-        parser.setReportsDirectory( reportsDir );
-        List reports = parser.parseXMLReportFiles();
-        assertTrue( "No reports!", reports.size() > 0 );
-        ReportTestSuite suite = (ReportTestSuite) reports.get( 0 );
-        HelperAssertions.assertTestSuite( 1, 0, 0, 0, suite );
         
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );        
     }
 }

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java?rev=596825&r1=596824&r2=596825&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java Tue Nov 20 13:00:55 2007
@@ -1,15 +1,41 @@
 package org.apache.maven.surefire.its;
 
+import java.io.File;
+import java.util.List;
+
 import junit.framework.Assert;
 
 import org.apache.maven.plugins.surefire.report.ReportTestSuite;
+import org.apache.maven.plugins.surefire.report.SurefireReportParser;
+import org.apache.maven.reporting.MavenReportException;
 
 public class HelperAssertions
 {
-    public static void assertTestSuite(int total, int errors, int failures, int skipped, ReportTestSuite actualSuite) {
+    public static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
+                                               ReportTestSuite actualSuite )
+    {
         Assert.assertEquals( "wrong number of tests", total, actualSuite.getNumberOfTests() );
         Assert.assertEquals( "wrong number of errors", errors, actualSuite.getNumberOfErrors() );
         Assert.assertEquals( "wrong number of failures", failures, actualSuite.getNumberOfFailures() );
         Assert.assertEquals( "wrong number of skipped", skipped, actualSuite.getNumberOfSkipped() );
+    }
+    
+    public static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
+                                               File testDir ) throws MavenReportException {
+        ReportTestSuite suite = parseTestResults( testDir );
+        assertTestSuiteResults( total, errors, failures, skipped, suite );
+    }
+
+    public static ReportTestSuite parseTestResults( File testDir )
+        throws MavenReportException
+    {
+        SurefireReportParser parser = new SurefireReportParser();
+        File reportsDir = new File( testDir, "target/surefire-reports" );
+        Assert.assertTrue( "Reports directory is missing: " + reportsDir.getAbsolutePath(), reportsDir.exists() );
+        parser.setReportsDirectory( reportsDir );
+        List reports = parser.parseXMLReportFiles();
+        Assert.assertTrue( "No reports!", reports.size() > 0 );
+        ReportTestSuite suite = (ReportTestSuite) reports.get( 0 );
+        return suite;
     }
 }

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire146ForkPerTestNoSetupTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,31 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test Surefire-146 (forkMode=pertest fails to call setUp)
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class Surefire146ForkPerTestNoSetupTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testForkPerTestNoSetup ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/surefire-146-forkPerTestNoSetup" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+        
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,32 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test Surefire-224 (XML test reports are not well-formed when failure message contains quotes)
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class Surefire224WellFormedXmlFailuresTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testWellFormedXmlFailures ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/surefire-224-wellFormedXmlFailures" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        // DGF Don't verify error free log; we expect failures
+        // verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 3, 0, 3, 0, testDir );
+        
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire376TestNgAfterSuiteFailure.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,32 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test Surefire-376 (TestNG @AfterSuite failures are ignored)
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class Surefire376TestNgAfterSuiteFailure
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testAfterSuiteFailure ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-afterSuiteFailure" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        // DGF Don't verify error free log; we expect failures
+        // verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 1, 0, testDir );
+        
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire377TestNgAndJUnitTogetherTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,30 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * SUREFIRE-377 (When JUnit and TestNG tests are in same project, only one set gets run).
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class Surefire377TestNgAndJUnitTogetherTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testTestNgAndJUnitTogether ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-junit-together" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 2, 0, 0, 0, testDir );
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgGroupThreadParallel.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,31 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test TestNG groups, together with TestNG parallelism
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class TestNgGroupThreadParallel
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testTestNgGroupThreadParallel ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-group-thread-parallel" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 3, 0, 0, 0, testDir );
+        
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgJdk14Test.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,31 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test TestNG running in the JDK 1.4 JavaDoc style
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class TestNgJdk14Test
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testTestNgJdk14 ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-jdk14" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+        
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgSuiteXmlTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,30 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test simple TestNG suite XML file
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class TestNgSuiteXmlTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testTestNgSuiteXml ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-suite-xml" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgVersionsTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,80 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.plugins.surefire.report.ReportTestSuite;
+
+/**
+ * Basic suite test using all known versions of TestNG
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class TestNgVersionsTest
+    extends AbstractMavenIntegrationTestCase
+{
+    
+    public void test47 () throws Exception
+    {
+        runTestNgTest( "4.7" );
+    }
+    
+    public void test50 () throws Exception
+    {
+        runTestNgTest( "5.0" );
+    }
+    
+    public void test501 () throws Exception
+    {
+        runTestNgTest( "5.0.1" );
+    }
+    
+    public void test502 () throws Exception
+    {
+        runTestNgTest( "5.0.2" );
+    }
+    
+    public void test51 () throws Exception
+    {
+        runTestNgTest( "5.1" );
+    }
+    
+    public void test55 () throws Exception
+    {
+        runTestNgTest( "5.5" );
+    }
+    
+    public void test56 () throws Exception
+    {
+        runTestNgTest( "5.6" );
+    }
+    
+    public void test57 () throws Exception
+    {
+        runTestNgTest( "5.7" );
+    }
+    
+    public void runTestNgTest (String version)
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        List arguments = new ArrayList();
+        arguments.add( "test" );
+        // DGF we have to pass in the version as a command line argument
+        // and NOT as a system property; otherwise our setting will be ignored
+        arguments.add( "-DtestNgVersion=" + version );
+        verifier.executeGoals( arguments );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        ReportTestSuite suite = HelperAssertions.parseTestResults( testDir );
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, suite );
+    }
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testArgLine</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for argLine configuration</name>
+  <description>Test for argLine configuration parameter</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>"-Djava.library.path=foo foo/foo/bar/1.0"</argLine>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/TestSurefireArgLine.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/TestSurefireArgLine.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/TestSurefireArgLine.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/argLine-parameter/src/test/java/TestSurefireArgLine.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,15 @@
+import junit.framework.TestCase;
+
+public class TestSurefireArgLine
+    extends TestCase
+{
+
+    public void testArgLine()
+    {
+        String javaLibraryPath = System.getProperty( "java.library.path" );
+        assertEquals( "incorrect java.library.path; " +
+        		"Surefire should have passed this in correctly",
+        		"foo foo/foo/bar/1.0", javaLibraryPath );
+    }
+
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>forkPerTestNoSetup</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for SUREFIRE-146</name>
+  <description>forkMode=pertest fails to call setUp</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkMode>pertest</forkMode>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/TestSurefire2.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/TestSurefire2.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/TestSurefire2.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-146-forkPerTestNoSetup/src/test/java/TestSurefire2.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,66 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class TestSurefire2
+    extends TestCase
+{
+
+    private boolean setUpCalled = false;
+
+    private static boolean tearDownCalled = false;
+
+    public TestSurefire2( String name, String extraName )
+    {
+        super( name );
+    }
+
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        Test test = new TestSurefire2( "testSetUp", "dummy" );
+        suite.addTest( test );
+        TestSetup setup = new TestSetup( suite )
+        {
+
+            protected void setUp()
+            {
+                //oneTimeSetUp();
+            }
+
+            protected void tearDown()
+            {
+                oneTimeTearDown();
+            }
+
+        };
+
+        return setup;
+    }
+
+    protected void setUp()
+    {
+        setUpCalled = true;
+        tearDownCalled = false;
+        System.out.println( "Called setUp" );
+    }
+
+    protected void tearDown()
+    {
+        setUpCalled = false;
+        tearDownCalled = true;
+        System.out.println( "Called tearDown" );
+    }
+
+    public void testSetUp()
+    {
+        assertTrue( "setUp was not called", setUpCalled );
+    }
+
+    public static void oneTimeTearDown()
+    {
+        assertTrue( "tearDown was not called", tearDownCalled );
+    }
+
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>wellFormedXmlFailures</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for MSUREFIRE-54</name>
+  <description>XML test reports are not well-formed when failure message contains quotes.</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.1</version>
+        <configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/TestSurefire3.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/TestSurefire3.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/TestSurefire3.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-224-wellFormedXmlFailures/src/test/java/TestSurefire3.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,36 @@
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class TestSurefire3
+    extends TestCase
+{
+
+    public TestSurefire3( )
+    {
+        super( );
+    }
+
+    public TestSurefire3( String name )
+    {
+        super( name );
+    }
+
+
+    public void testQuote()
+    {
+        fail( "\"" );
+    }
+
+    public void testLower()
+    {
+        fail( "<" );
+    }
+
+    public void testGreater()
+    {
+        fail( ">" );
+    }
+
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-afterSuiteFailure</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Suites</name>
+  <description>Uses suite xml file definitions to invoke testng tests</description>
+
+  <properties>
+     <testNgVersion>5.7</testNgVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>${testNgVersion}</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/TestNGSuiteTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/TestNGSuiteTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/TestNGSuiteTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-afterSuiteFailure/src/test/java/TestNGSuiteTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,19 @@
+import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.Test;
+
+
+public class TestNGSuiteTest {
+
+	@Test
+	public void doNothing()
+	{
+		
+	}
+	
+	@AfterSuite
+	public void failAfterSuite()
+	{
+	    Assert.fail();
+	}
+}
\ No newline at end of file

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-group-thread-parallel</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG group/parallel thread tests</name>
+  <description>Tests group/thread/parallel functionality of TestNG</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.7</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <groups>functional</groups>
+          <threadCount>3</threadCount>
+          <parallel>methods</parallel>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/TestNGTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/TestNGTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/TestNGTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-group-thread-parallel/src/test/java/TestNGTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,75 @@
+import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Tests grouping/threading/parallel functionality of TestNG.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGTest {
+
+	static int m_testCount = 0;
+	
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass(groups = "functional")
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	@AfterSuite(alwaysRun = true, groups = "functional")
+	public void check_Test_Count()
+	{
+		System.out.println("check_Test_Count(): " + m_testCount);
+		Assert.assertTrue( m_testCount == 3,  "Expected 3 tests to be run but local count was " + m_testCount );
+	}
+	
+	Object testObject;
+	
+	@Test(groups = {"functional", "notincluded"})
+	public void test1() throws InterruptedException
+	{
+		m_testCount++;
+		System.out.println("running test");
+		Assert.assertTrue( testObject != null , "testObject is null" );
+		waitForTestCountToBeThree();
+	}
+	
+	@Test(groups = {"functional", "notincluded"})
+    public void test2() throws InterruptedException {
+	    test1();
+	}
+	
+	@Test(groups = {"functional", "notincluded"})
+    public void test3() throws InterruptedException {
+        test1();
+    }
+	
+	private void waitForTestCountToBeThree()
+        throws InterruptedException
+    {
+        if ( m_testCount == 3 ) return;
+        long now = System.currentTimeMillis();
+        long timeout = 1 * 1000;
+        long finish = now + timeout;
+        while ( m_testCount < 3 && System.currentTimeMillis() < finish )
+        {
+            Thread.sleep( 10 );
+        }
+        Assert.assertTrue(m_testCount >= 3);
+    }
+	
+	/**
+	 * Sample method that shouldn't be run by test suite.
+	 */
+	@Test(groups = "notincluded")
+	public void shouldNotRun()
+	{
+		Assert.fail( "Group specified by test shouldnt be run." );
+	}
+}
\ No newline at end of file

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-jdk14</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Test for testng jdk14 integration</name>
+  <description>calls testng jdk14 javadoc based tests</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.7</version>
+      <classifier>jdk14</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <testSourceDirectory>src/test/java</testSourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <groups>functional</groups>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/TestNGJavadocTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/TestNGJavadocTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/TestNGJavadocTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-jdk14/src/test/java/TestNGJavadocTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,42 @@
+import org.testng.Assert;
+
+
+/**
+ * Tests that forcing testng to run tests via the 
+ * <code>"${maven.test.forcetestng}"</code> configuration option
+ * works.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGJavadocTest {
+
+	/**
+	 * Sets up testObject
+	 * @testng.configuration beforeTestClass = "true"
+	 * 						 groups = "functional"
+	 */
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 * @testng.test groups = "functional, notincluded"
+	 */
+	public void isTestObjectNull()
+	{
+		Assert.assertNotNull(testObject, "testObject is null");
+	}
+	
+	/**
+	 * Sample method that shouldn't be run by test suite.
+	 * @testng.test groups = "notincluded"
+	 */
+	public void shouldNotRun()
+	{
+		Assert.assertTrue(false, "Group specified by test shouldnt be run.");
+	}
+}
\ No newline at end of file

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-junit-together</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Junit Compatible</name>
+  <description>Tests that junit tests can be executed alongside TestNG tests</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>5.7</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4-SNAPSHOT</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/JunitTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/JunitTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/JunitTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/JunitTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,28 @@
+import junit.framework.TestCase;
+
+/**
+ * Provided to ensure both junit and testng tests can run together.
+ * 
+ * @author jkuhnert
+ */
+public class JunitTest extends TestCase {
+
+	Object testObject;
+	
+	/**
+	 * Creats an object instance
+	 */
+	public void setUp()
+	{
+		testObject = new Object();
+	}
+	
+	/**
+	 * Tests that object created in setup 
+	 * isn't null.
+	 */
+	public void testJunitObject()
+	{
+		assertNotNull(testObject);
+	}
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/TestNGJunitTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/TestNGJunitTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/TestNGJunitTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-junit-together/src/test/java/TestNGJunitTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,31 @@
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Simple test
+ * 
+ * @author jkuhnert
+ */
+public class TestNGJunitTest {
+
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test
+	public void testNGTest()
+	{
+		assert testObject != null : "testObject is null";
+	}
+}

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-simple</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Suites</name>
+  <description>Uses suite xml file definitions to invoke testng tests</description>
+
+  <properties>
+     <testNgVersion>5.7</testNgVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>${testNgVersion}</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/TestNGSuiteTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/TestNGSuiteTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/TestNGSuiteTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-simple/src/test/java/TestNGSuiteTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,11 @@
+import org.testng.annotations.Test;
+
+
+public class TestNGSuiteTest {
+
+	@Test
+	public void doNothing()
+	{
+		
+	}
+}
\ No newline at end of file

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/pom.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>suiteXml</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Suites</name>
+  <description>Uses suite xml file definitions to invoke testng tests</description>
+
+  <properties>
+     <testNgVersion>5.5</testNgVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>${testNgVersion}</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <suiteXmlFiles>
+            <file>src/test-data/testng.xml</file>
+          </suiteXmlFiles>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng.xml?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng.xml (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test-data/testng.xml Tue Nov 20 13:00:55 2007
@@ -0,0 +1,30 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="Suite 1 Test" verbose="4">
+
+  <test name="Sample Test">
+    <classes>
+      <class name="TestNGSuiteTest"/>
+    </classes>
+  </test>
+
+</suite>
\ No newline at end of file

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/TestNGSuiteTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/TestNGSuiteTest.java?rev=596825&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/TestNGSuiteTest.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-suite-xml/src/test/java/TestNGSuiteTest.java Tue Nov 20 13:00:55 2007
@@ -0,0 +1,33 @@
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * Tests that forcing testng to run tests via the 
+ * <code>"${maven.test.forcetestng}"</code> configuration option
+ * works.
+ * 
+ * @author jkuhnert
+ */
+public class TestNGSuiteTest {
+
+	/**
+	 * Sets up testObject
+	 */
+	@BeforeClass
+	public void configureTest()
+	{
+		testObject = new Object();
+	}
+	
+	Object testObject;
+	
+	/**
+	 * Tests reporting an error
+	 */
+	@Test
+	public void isTestObjectNull()
+	{
+		assert testObject != null : "testObject is null";
+	}
+}
\ No newline at end of file



Mime
View raw message