maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1082986 - in /maven/surefire/trunk: ./ surefire-integration-tests/ surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ surefire-setup-integrat...
Date Fri, 18 Mar 2011 17:26:27 GMT
Author: krosenvold
Date: Fri Mar 18 17:26:25 2011
New Revision: 1082986

URL: http://svn.apache.org/viewvc?rev=1082986&view=rev
Log:
o  FIxed proper isolation for integration tests.

Made separate module for set-up, IT's themselves run with
stock version of 'previous' version of surefire.

Added:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/HelperAssertions.java   (contents, props changed)
      - copied, changed from r1082844, maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java   (with props)
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java   (with props)
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java   (with props)
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java   (with props)
    maven/surefire/trunk/surefire-setup-integration-tests/
    maven/surefire/trunk/surefire-setup-integration-tests/pom.xml
      - copied, changed from r1082844, maven/surefire/trunk/surefire-integration-tests/pom.xml
    maven/surefire/trunk/surefire-setup-integration-tests/src/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java   (contents, props changed)
      - copied, changed from r1082844, maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java
    maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java   (contents, props changed)
      - copied, changed from r1082844, maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java
Removed:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java
Modified:
    maven/surefire/trunk/pom.xml
    maven/surefire/trunk/surefire-integration-tests/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathFilteringIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathScopeFilteringIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4RunListenerIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SurefireVerifierTestClass.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java

Modified: maven/surefire/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/pom.xml?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/pom.xml (original)
+++ maven/surefire/trunk/pom.xml Fri Mar 18 17:26:25 2011
@@ -95,6 +95,7 @@
     <module>maven-surefire-plugin</module>
     <module>maven-failsafe-plugin</module>
     <module>maven-surefire-report-plugin</module>
+    <module>surefire-setup-integration-tests</module>
     <module>surefire-integration-tests</module>
   </modules>
 

Modified: maven/surefire/trunk/surefire-integration-tests/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/pom.xml?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-integration-tests/pom.xml Fri Mar 18 17:26:25 2011
@@ -35,46 +35,6 @@
   <name>Maven Surefire Integration Tests</name>
 
   <dependencies>
-    <!-- DGF Depend on the SurefireReportParser -->
-    <dependency>
-      <artifactId>maven-surefire-report-plugin</artifactId>
-      <groupId>org.apache.maven.plugins</groupId>
-      <version>${project.version}</version>
-      <type>maven-plugin</type>
-    </dependency>
-    <dependency>
-      <artifactId>maven-surefire-plugin</artifactId>
-      <groupId>org.apache.maven.plugins</groupId>
-      <version>${project.version}</version>
-      <type>maven-plugin</type>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.surefire</groupId>
-      <artifactId>surefire-testng</artifactId>
-      <version>${project.version}</version>
-      <exclusions>
-        <!-- SC don't want our surefire getting confulsed and trying to use the testng runner -->
-        <exclusion>
-          <groupId>org.testng</groupId>
-          <artifactId>testng</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.surefire</groupId>
-      <artifactId>surefire-junit3</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.surefire</groupId>
-      <artifactId>surefire-junit4</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven.surefire</groupId>
-      <artifactId>surefire-junit47</artifactId>
-      <version>${project.version}</version>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-verifier</artifactId>
@@ -86,11 +46,11 @@
       <version>2.0.6</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
+    <!-- dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <scope>test</scope>
-    </dependency>
+    </dependency -->
     <dependency>
       <groupId>net.sourceforge.htmlunit</groupId>
       <artifactId>htmlunit</artifactId>
@@ -102,6 +62,11 @@
       <artifactId>commons-io</artifactId>
       <version>2.0.1</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+    </dependency>
+
   </dependencies>
 
   <profiles>
@@ -119,7 +84,6 @@
                 <threadCount>${surefire.threadcount}</threadCount>
               </configuration>
             </plugin>
-
           </plugins>
         </pluginManagement>
 
@@ -142,23 +106,6 @@
   <build>
     <plugins>
       <plugin>
-        <artifactId>maven-help-plugin</artifactId>
-        <version>2.1</version>
-        <executions>
-          <execution>
-            <id>settings.xml</id>
-            <phase>generate-test-resources</phase>
-            <goals>
-              <goal>effective-settings</goal>
-            </goals>
-            <configuration>
-              <output>${project.build.directory}/private/settings.xml</output>
-              <showPasswords>${it.settings.showPasswords}</showPasswords>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <source>1.5</source>
@@ -166,53 +113,14 @@
         </configuration>
       </plugin>
       <plugin>
-        <artifactId>maven-invoker-plugin</artifactId>
-        <version>1.5</version>
-        <configuration>
-          <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>install</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <test>SetUpForIntegrationTest</test>
-          <!-- Pass current surefire version to the main suite so that it -->
-          <!-- can forward to all integration test projects. SUREFIRE-513 -->
-          <systemProperties>
-            <property>
-              <name>surefire.version</name>
-              <value>${project.version}</value>
-            </property>
-            <property>
-              <name>testng.version</name>
-              <value>${testng.version}</value>
-            </property>
-            <property>
-              <name>maven.home</name>
-              <value>${maven.home}</value>
-            </property>
-            <property>
-              <name>maven.settings.file</name>
-              <value>${project.build.directory}/private/settings.xml</value>
-            </property>
-            <property>
-              <name>maven.staged.local.repo</name>
-              <value>${project.build.directory}/it-repo</value>
-            </property>
-          </systemProperties>
-
+          <skip>true</skip>
         </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-failsafe-plugin</artifactId>
-        <version>${project.version}</version>
+        <version>${surefire.build.version}</version>
         <configuration>
           <!-- Pass current surefire version to the main suite so that it -->
           <!-- can forward to all integration test projects. SUREFIRE-513 -->
@@ -231,11 +139,11 @@
             </property>
             <property>
               <name>maven.settings.file</name>
-              <value>${project.build.directory}/private/it-settings.xml</value>
+              <value>${project.basedir}/../surefire-setup-integration-tests/target/private/it-settings.xml</value>
             </property>
             <property>
               <name>maven.repo.local</name>
-              <value>${project.build.directory}/it-repo</value>
+              <value>${project.basedir}/../surefire-setup-integration-tests/target/it-repo</value>
             </property>
             <property>
               <name>maven.test.tmpdir</name>

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractSurefireIntegrationTestClass.java Fri Mar 18 17:26:25 2011
@@ -26,7 +26,6 @@ import org.apache.maven.artifact.version
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
-import org.apache.maven.surefire.util.NestedRuntimeException;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -68,7 +67,7 @@ public abstract class AbstractSurefireIn
             }
             catch ( InvalidVersionSpecificationException e )
             {
-                throw new NestedRuntimeException( e.getMessage(), e );
+                throw new RuntimeException( e.getMessage(), e );
             }
         }
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestCaseIT.java Fri Mar 18 17:26:25 2011
@@ -20,6 +20,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AdditionalClasspathIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AggregateReportIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.util.List;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ArgLineIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java Fri Mar 18 17:26:25 2011
@@ -23,6 +23,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.util.List;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestFailIfNoTestsForkModeIT.java Fri Mar 18 17:26:25 2011
@@ -22,7 +22,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.io.IOException;
@@ -73,7 +73,7 @@ public class CheckTestFailIfNoTestsForkM
     }
 
     private void doTest( String forkMode, boolean failIfNoTests )
-        throws IOException, VerificationException, MavenReportException
+        throws IOException, VerificationException
     {
         File testDir =
             ResourceExtractor.simpleExtractResources( getClass(), "/default-configuration-classWithNoTests" );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodFailureIT.java Fri Mar 18 17:26:25 2011
@@ -22,6 +22,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgBeforeMethodIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgGroupThreadParallelIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgJdk14IT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgListenerReporterIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgPathWithSpacesIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgReportTestIT.java Fri Mar 18 17:26:25 2011
@@ -18,6 +18,8 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
+import org.apache.maven.surefire.its.misc.HelperAssertions;
+
 import java.io.File;
 
 import junit.framework.Assert;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.util.Arrays;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgSuiteXmlSingleIT.java Fri Mar 18 17:26:25 2011
@@ -19,11 +19,12 @@ package org.apache.maven.surefire.its;
  */
 
 
+import org.apache.maven.surefire.its.misc.HelperAssertions;
+import org.apache.maven.surefire.its.misc.ReportTestSuite;
+
 import java.io.File;
 import java.util.List;
 
-import org.apache.maven.plugins.surefire.report.ReportTestSuite;
-
 /**
  * Use -Dtest to run a single TestNG test, overriding the suite XML parameter.
  *

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckTestNgVersionsIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.util.List;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClassPathOrderIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathFilteringIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathFilteringIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathFilteringIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathFilteringIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathScopeFilteringIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathScopeFilteringIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathScopeFilteringIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ClasspathScopeFilteringIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/DefaultConfigurationIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/EnvironmentVariableIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ForkModeIT.java Fri Mar 18 17:26:25 2011
@@ -21,7 +21,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -105,7 +105,7 @@ public class ForkModeIT
     }
 
     private String[] doTest( String forkMode )
-        throws IOException, VerificationException, MavenReportException
+        throws IOException, VerificationException
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/fork-mode" );
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/IncludesExcludesIT.java Fri Mar 18 17:26:25 2011
@@ -20,6 +20,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4RunListenerIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4RunListenerIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4RunListenerIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/JUnit4RunListenerIT.java Fri Mar 18 17:26:25 2011
@@ -19,7 +19,6 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import org.apache.maven.reporting.MavenReportException;
 
 import java.io.File;
 
@@ -47,7 +46,6 @@ public class JUnit4RunListenerIT
     }
 
     private void assertResults()
-        throws MavenReportException
     {
         assertTestSuiteResults( 1, 0, 0, 0 );
         final File targetDir = getSubFile( "target" );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PlexusConflictIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.util.List;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/PojoSimpleIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/ResultCountingIT.java Fri Mar 18 17:26:25 2011
@@ -22,7 +22,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.io.IOException;
@@ -59,7 +59,7 @@ public class ResultCountingIT
     }
 
     private void assertForkMode( String forkMode )
-        throws IOException, VerificationException, MavenReportException
+        throws IOException, VerificationException
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/result-counting" );
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/RunOrderIT.java Fri Mar 18 17:26:25 2011
@@ -21,7 +21,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.VerificationException;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.io.IOException;
@@ -93,7 +93,7 @@ public class RunOrderIT
     }
 
     private void checkOrder( String alphabetical, List<String> expected )
-        throws VerificationException, MavenReportException, IOException
+        throws VerificationException, IOException
     {
         final List<String> list = executeWithRunOrder( alphabetical );
         if ( !contains( list, expected ) )
@@ -103,7 +103,7 @@ public class RunOrderIT
     }
 
     private List<String> executeWithRunOrder( String runOrder )
-        throws IOException, VerificationException, MavenReportException
+        throws IOException, VerificationException
     {
         File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/runOrder" );
         Verifier verifier = new Verifier( testDir.getAbsolutePath() );

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SiblingAggregatorIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire224WellFormedXmlFailuresIT.java Fri Mar 18 17:26:25 2011
@@ -19,12 +19,13 @@ package org.apache.maven.surefire.its;
  */
 
 
+import org.apache.maven.surefire.its.misc.HelperAssertions;
+import org.apache.maven.surefire.its.misc.ReportTestCase;
+import org.apache.maven.surefire.its.misc.ReportTestSuite;
+
 import java.io.File;
 import java.util.List;
 
-import org.apache.maven.plugins.surefire.report.ReportTestCase;
-import org.apache.maven.plugins.surefire.report.ReportTestSuite;
-
 /**
  * Test Surefire-224 (XML test reports are not well-formed when failure message contains quotes)
  *

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SurefireVerifierTestClass.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SurefireVerifierTestClass.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SurefireVerifierTestClass.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SurefireVerifierTestClass.java Fri Mar 18 17:26:25 2011
@@ -29,8 +29,7 @@ import org.apache.maven.it.VerificationE
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
-import org.apache.maven.reporting.MavenReportException;
-import org.apache.maven.surefire.util.NestedRuntimeException;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.io.IOException;
@@ -72,11 +71,11 @@ public abstract class SurefireVerifierTe
         }
         catch ( VerificationException e )
         {
-            throw new NestedRuntimeException( e );
+            throw new RuntimeException( e );
         }
         catch ( IOException e )
         {
-            throw new NestedRuntimeException( e );
+            throw new RuntimeException( e );
         }
     }
 
@@ -119,7 +118,7 @@ public abstract class SurefireVerifierTe
             }
             catch ( InvalidVersionSpecificationException e )
             {
-                throw new NestedRuntimeException( e.getMessage(), e );
+                throw new RuntimeException( e.getMessage(), e );
             }
         }
 
@@ -145,7 +144,7 @@ public abstract class SurefireVerifierTe
             }
             catch ( InvalidVersionSpecificationException e )
             {
-                throw new NestedRuntimeException( e.getMessage(), e );
+                throw new RuntimeException( e.getMessage(), e );
             }
         }
 
@@ -270,7 +269,6 @@ public abstract class SurefireVerifierTe
     }
 
     public void assertTestSuiteResults( int total, int errors, int failures, int skipped )
-        throws MavenReportException
     {
         HelperAssertions.assertTestSuiteResults( total, errors, failures, skipped, testDir );
     }
@@ -331,7 +329,7 @@ public abstract class SurefireVerifierTe
         }
         catch ( VerificationException e )
         {
-            throw new NestedRuntimeException( e );
+            throw new RuntimeException( e );
         }
 
         return null;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TwoTestCasesIT.java Fri Mar 18 17:26:25 2011
@@ -20,7 +20,8 @@ package org.apache.maven.surefire.its;
 
 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.surefire.its.misc.HelperAssertions;
+import org.apache.maven.surefire.its.misc.ReportTestSuite;
 
 import java.io.File;
 import java.util.HashSet;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java Fri Mar 18 17:26:25 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.its;
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.FileUtils;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 import java.io.File;
 import java.io.IOException;

Modified: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java?rev=1082986&r1=1082985&r2=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java (original)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/WorkingDirectoryIT.java Fri Mar 18 17:26:25 2011
@@ -26,6 +26,7 @@ import java.util.Properties;
 
 import org.apache.maven.it.Verifier;
 import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.surefire.its.misc.HelperAssertions;
 
 /**
  * Test working directory configuration, SUREFIRE-416

Copied: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/HelperAssertions.java (from r1082844, 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/misc/HelperAssertions.java?p2=maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/HelperAssertions.java&p1=maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/HelperAssertions.java&r1=1082844&r2=1082986&rev=1082986&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/misc/HelperAssertions.java Fri Mar 18 17:26:25 2011
@@ -1,4 +1,4 @@
-package org.apache.maven.surefire.its;
+package org.apache.maven.surefire.its.misc;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -18,9 +18,7 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import org.apache.maven.plugins.surefire.report.ReportTestSuite;
-import org.apache.maven.plugins.surefire.report.SurefireReportParser;
-import org.apache.maven.reporting.MavenReportException;
+import org.apache.maven.surefire.its.IntegrationTestSuiteResults;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -28,21 +26,20 @@ import java.util.List;
 import java.util.Locale;
 
 import junit.framework.Assert;
-import org.apache.maven.surefire.util.NestedRuntimeException;
 
+@SuppressWarnings( { "JavaDoc" } )
 public class HelperAssertions
 {
     /**
      * assert that the reports in the specified testDir have the right summary statistics
      */
     public static void assertTestSuiteResults( int total, int errors, int failures, int skipped, File testDir )
-        throws MavenReportException
     {
         IntegrationTestSuiteResults suite = parseTestResults( new File[]{ testDir } );
         assertTestSuiteResults( total, errors, failures, skipped, suite );
     }
 
-    protected static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
+    public static void assertTestSuiteResults( int total, int errors, int failures, int skipped,
                                                   IntegrationTestSuiteResults actualSuite )
     {
         Assert.assertEquals( "wrong number of tests", total, actualSuite.getTotal() );
@@ -51,24 +48,21 @@ public class HelperAssertions
         Assert.assertEquals( "wrong number of skipped", skipped, actualSuite.getSkipped() );
     }
 
-    protected static IntegrationTestSuiteResults parseTestResults( File testDir )
-        throws MavenReportException
+    public static IntegrationTestSuiteResults parseTestResults( File testDir )
     {
         return parseTestResults( new File[]{ testDir } );
     }
 
-    protected static IntegrationTestSuiteResults parseTestResults( File[] testDirs )
-        throws MavenReportException
+    public static IntegrationTestSuiteResults parseTestResults( File[] testDirs )
     {
         List<ReportTestSuite> reports = extractReports( testDirs );
-        IntegrationTestSuiteResults results = parseReportList( reports );
-        return results;
+        return parseReportList( reports );
     }
 
     /**
      * Converts a list of ReportTestSuites into an IntegrationTestSuiteResults object, suitable for summary assertions
      */
-    protected static IntegrationTestSuiteResults parseReportList( List<ReportTestSuite> reports )
+    public static IntegrationTestSuiteResults parseReportList( List<ReportTestSuite> reports )
     {
         Assert.assertTrue( "No reports!", reports.size() > 0 );
         int total = 0, errors = 0, failures = 0, skipped = 0;
@@ -80,19 +74,10 @@ public class HelperAssertions
             failures += suite.getNumberOfFailures();
             skipped += suite.getNumberOfSkipped();
         }
-        IntegrationTestSuiteResults results = new IntegrationTestSuiteResults( total, errors, failures, skipped );
-        return results;
+        return new IntegrationTestSuiteResults( total, errors, failures, skipped );
     }
 
-    protected static List<ReportTestSuite> extractReports( File testDir )
-    {
-        return extractReports( new File[]{ testDir } );
-    }
-
-    /**
-     * Extracts a list of ReportTestSuites from the specified testDirs
-     */
-    protected static List<ReportTestSuite> extractReports( File[] testDirs )
+    public static List<ReportTestSuite> extractReports( File[] testDirs )
     {
         List<File> reportsDirs = new ArrayList<File>();
         for ( int i = 0; i < testDirs.length; i++ )
@@ -110,7 +95,7 @@ public class HelperAssertions
         }
         catch ( Exception e )
         {
-            throw new NestedRuntimeException( "Couldn't parse XML reports", e );
+            throw new RuntimeException( "Couldn't parse XML reports", e );
         }
         return reports;
     }

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/HelperAssertions.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java?rev=1082986&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java Fri Mar 18 17:26:25 2011
@@ -0,0 +1,109 @@
+package org.apache.maven.surefire.its.misc;
+
+/*
+ * 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.
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @version $Id$
+ */
+public class ReportTestCase
+{
+    private String fullClassName;
+
+    private String className;
+
+    private String fullName;
+
+    private String name;
+
+    private float time;
+
+    private Map failure;
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getFullClassName()
+    {
+        return fullClassName;
+    }
+
+    public void setFullClassName( String name )
+    {
+        this.fullClassName = name;
+    }
+
+    public String getClassName()
+    {
+        return className;
+    }
+
+    public void setClassName( String name )
+    {
+        this.className = name;
+    }
+
+    public float getTime()
+    {
+        return time;
+    }
+
+    public void setTime( float time )
+    {
+        this.time = time;
+    }
+
+    public Map getFailure()
+    {
+        return failure;
+    }
+
+    public String getFullName()
+    {
+        return fullName;
+    }
+
+    public void setFullName( String fullName )
+    {
+        this.fullName = fullName;
+    }
+
+    public void addFailure( String message, String type )
+    {
+        failure = new HashMap();
+        failure.put( "message", message );
+        failure.put( "type", type );
+    }
+
+    /** {@inheritDoc} */
+    public String toString()
+    {
+        return fullName;
+    }
+}

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java?rev=1082986&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java Fri Mar 18 17:26:25 2011
@@ -0,0 +1,165 @@
+package org.apache.maven.surefire.its.misc;
+
+/*
+ * 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.
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @version $Id$
+ */
+public class ReportTestSuite
+{
+    private List testCases = new ArrayList();
+
+    private int numberOfErrors;
+
+    private int numberOfFailures;
+
+    private int numberOfSkipped;
+
+    private Integer numberOfTests;
+
+    private String name;
+
+    private String fullClassName;
+
+    private String packageName;
+
+    private float timeElapsed;
+
+    public List getTestCases()
+    {
+        return this.testCases;
+    }
+
+    public int getNumberOfErrors()
+    {
+        return numberOfErrors;
+    }
+
+    public void setNumberOfErrors( int numberOfErrors )
+    {
+        this.numberOfErrors = numberOfErrors;
+    }
+
+    public int getNumberOfFailures()
+    {
+        return numberOfFailures;
+    }
+
+    public void setNumberOfFailures( int numberOfFailures )
+    {
+        this.numberOfFailures = numberOfFailures;
+    }
+
+    public int getNumberOfSkipped()
+    {
+        return numberOfSkipped;
+    }
+
+    public void setNumberOfSkipped( int numberOfSkipped )
+    {
+        this.numberOfSkipped = numberOfSkipped;
+    }
+
+    public int getNumberOfTests()
+    {
+        if ( numberOfTests != null )
+        {
+            return numberOfTests.intValue();
+        }
+        if ( testCases != null )
+        {
+            return testCases.size();
+        }
+        return 0;
+    }
+
+    public void setNumberOfTests( int numberOfTests )
+    {
+        this.numberOfTests = new Integer( numberOfTests );
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+
+    public String getFullClassName()
+    {
+        return fullClassName;
+    }
+
+    public void setFullClassName( String fullClassName )
+    {
+        this.fullClassName = fullClassName;
+        int lastDotPosition = fullClassName.lastIndexOf( "." );
+
+        name = fullClassName.substring( lastDotPosition + 1, fullClassName.length() );
+
+        if ( lastDotPosition < 0 )
+        {
+            /* no package name */
+            packageName = "";
+        }
+        else
+        {
+            packageName = fullClassName.substring( 0, lastDotPosition );
+        }
+    }
+
+    public String getPackageName()
+    {
+        return packageName;
+    }
+
+    public void setPackageName( String packageName )
+    {
+        this.packageName = packageName;
+    }
+
+    public float getTimeElapsed()
+    {
+        return this.timeElapsed;
+    }
+
+    public void setTimeElapsed( float timeElapsed )
+    {
+        this.timeElapsed = timeElapsed;
+    }
+
+    public void setTestCases( List testCases )
+    {
+        this.testCases = testCases;
+    }
+
+    /** {@inheritDoc} */
+    public String toString()
+    {
+        return fullClassName + " [" + getNumberOfTests() + "/" + getNumberOfFailures() + "/" + getNumberOfErrors()
+            + "/" + getNumberOfSkipped() + "]";
+    }
+}

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/ReportTestSuite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java?rev=1082986&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java Fri Mar 18 17:26:25 2011
@@ -0,0 +1,123 @@
+package org.apache.maven.surefire.its.misc;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.its.misc.TestSuiteXmlParser;
+import org.codehaus.plexus.util.DirectoryScanner;
+import org.codehaus.plexus.util.StringUtils;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.IOException;
+import java.text.NumberFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+
+import org.xml.sax.SAXException;
+
+/**
+ * @version $Id$
+ */
+public class SurefireReportParser
+{
+    private NumberFormat numberFormat = NumberFormat.getInstance();
+
+    private List reportsDirectories;
+
+    private final List testSuites = new ArrayList();
+
+    public SurefireReportParser( List reportsDirectoriesFiles, Locale locale )
+    {
+        this.reportsDirectories = reportsDirectoriesFiles;
+
+        setLocale( locale );
+    }
+
+    public List parseXMLReportFiles()
+    {
+        List xmlReportFileList = new ArrayList();
+        for ( int i = 0; i < reportsDirectories.size(); i++ )
+        {
+            File reportsDirectory = (File) reportsDirectories.get( i );
+            if ( !reportsDirectory.exists() )
+            {
+                continue;
+            }
+            String[] xmlReportFiles =
+                getIncludedFiles( reportsDirectory, "*.xml",
+                                  "*.txt, testng-failed.xml, testng-failures.xml, testng-results.xml" );
+            for ( int j = 0; j < xmlReportFiles.length; j++ )
+            {
+                File xmlReport = new File( reportsDirectory, xmlReportFiles[j] );
+                xmlReportFileList.add( xmlReport );
+            }
+        }
+        TestSuiteXmlParser parser = new TestSuiteXmlParser();
+        for ( int index = 0; index < xmlReportFileList.size(); index++ )
+        {
+            Collection suites;
+
+            File currentReport = (File) xmlReportFileList.get( index );
+
+            try
+            {
+                suites = parser.parse( currentReport.getAbsolutePath() );
+            }
+            catch ( ParserConfigurationException e )
+            {
+                throw new RuntimeException( "Error setting up parser for JUnit XML report", e );
+            }
+            catch ( SAXException e )
+            {
+                throw new RuntimeException( "Error parsing JUnit XML report " + currentReport, e );
+            }
+            catch ( IOException e )
+            {
+                throw new RuntimeException( "Error reading JUnit XML report " + currentReport, e );
+            }
+
+            testSuites.addAll( suites );
+        }
+
+        return testSuites;
+    }
+
+    public final void setLocale( Locale locale )
+    {
+        numberFormat = NumberFormat.getInstance( locale );
+    }
+
+    private String[] getIncludedFiles( File directory, String includes, String excludes )
+    {
+        DirectoryScanner scanner = new DirectoryScanner();
+
+        scanner.setBasedir( directory );
+
+        scanner.setIncludes( StringUtils.split( includes, "," ) );
+
+        scanner.setExcludes( StringUtils.split( excludes, "," ) );
+
+        scanner.scan();
+
+        return scanner.getIncludedFiles();
+    }
+}

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/SurefireReportParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java?rev=1082986&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java (added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java Fri Mar 18 17:26:25 2011
@@ -0,0 +1,256 @@
+package org.apache.maven.surefire.its.misc;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.surefire.its.misc.ReportTestCase;
+import org.apache.maven.surefire.its.misc.ReportTestSuite;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.File;
+import java.io.IOException;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * @version $Id$
+ */
+public class TestSuiteXmlParser
+    extends DefaultHandler
+{
+    private ReportTestSuite defaultSuite;
+    private ReportTestSuite currentSuite;
+    private Map classesToSuites;
+    private final NumberFormat numberFormat = NumberFormat.getInstance();
+
+    /**
+     * @noinspection StringBufferField
+     */
+    private StringBuffer currentElement;
+
+    private ReportTestCase testCase;
+
+    public Collection parse( String xmlPath )
+        throws ParserConfigurationException, SAXException, IOException
+    {
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+
+        SAXParser saxParser = factory.newSAXParser();
+
+        classesToSuites = new HashMap();
+
+        saxParser.parse( new File( xmlPath ), this );
+
+        if ( currentSuite != defaultSuite )
+        { // omit the defaultSuite if it's empty and there are alternatives
+            if ( defaultSuite.getNumberOfTests() == 0 )
+            {
+                classesToSuites.remove( defaultSuite.getFullClassName() );
+            }
+        }
+
+        return classesToSuites.values();
+    }
+
+    /** {@inheritDoc} */
+    public void startElement( String uri, String localName, String qName, Attributes attributes )
+        throws SAXException
+    {
+        try
+        {
+            if ( "testsuite".equals( qName ) )
+            {
+                currentSuite = defaultSuite = new ReportTestSuite();
+
+                try
+                {
+                    Number time = numberFormat.parse( attributes.getValue( "time" ) );
+
+                    defaultSuite.setTimeElapsed( time.floatValue() );
+                }
+                catch ( NullPointerException npe )
+                {
+                    System.err.println( "WARNING: no time attribute found on testsuite element" );
+                }
+
+                //check if group attribute is existing
+                if ( attributes.getValue( "group" ) != null && !"".equals( attributes.getValue( "group" ) ) )
+                {
+                    String packageName = attributes.getValue( "group" );
+                    String name = attributes.getValue( "name" );
+
+                    defaultSuite.setFullClassName( packageName + "." + name );
+                }
+                else
+                {
+                    String fullClassName = attributes.getValue( "name" );
+                    defaultSuite.setFullClassName( fullClassName );
+                }
+
+                classesToSuites.put( defaultSuite.getFullClassName(), defaultSuite );
+            }
+            else if ( "testcase".equals( qName ) )
+            {
+                currentElement = new StringBuffer();
+
+                testCase = new ReportTestCase();
+
+                testCase.setName( attributes.getValue( "name" ) );
+
+                String fullClassName = attributes.getValue( "classname" );
+
+                // if the testcase declares its own classname, it may need to belong to its own suite
+                if ( fullClassName != null )
+                {
+                    currentSuite = (ReportTestSuite) classesToSuites.get( fullClassName );
+                    if ( currentSuite == null )
+                    {
+                        currentSuite = new ReportTestSuite();
+                        currentSuite.setFullClassName( fullClassName );
+                        classesToSuites.put( fullClassName, currentSuite );
+                    }
+                }
+
+                testCase.setFullClassName( currentSuite.getFullClassName() );
+                testCase.setClassName( currentSuite.getName() );
+                testCase.setFullName( currentSuite.getFullClassName() + "." + testCase.getName() );
+
+                String timeAsString = attributes.getValue( "time" );
+
+                Number time = new Integer( 0 );
+
+                if ( timeAsString != null )
+                {
+                    time = numberFormat.parse( timeAsString );
+                }
+
+                testCase.setTime( time.floatValue() );
+
+                if ( currentSuite != defaultSuite )
+                {
+                    currentSuite.setTimeElapsed( time.floatValue() + currentSuite.getTimeElapsed() );
+                }
+            }
+            else if ( "failure".equals( qName ) )
+            {
+                testCase.addFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) );
+                currentSuite.setNumberOfFailures( 1 + currentSuite.getNumberOfFailures() );
+            }
+            else if ( "error".equals( qName ) )
+            {
+                testCase.addFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) );
+                currentSuite.setNumberOfErrors( 1 + currentSuite.getNumberOfErrors() );
+            }
+            else if ( "skipped".equals( qName ) )
+            {
+                testCase.addFailure( "skipped", "skipped" ); // TODO extract real reasons
+                currentSuite.setNumberOfSkipped( 1 + currentSuite.getNumberOfSkipped() );
+            }
+        }
+        catch ( ParseException e )
+        {
+            throw new SAXException( e.getMessage(), e );
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void endElement( String uri, String localName, String qName )
+        throws SAXException
+    {
+        if ( "testcase".equals( qName ) )
+        {
+            currentSuite.getTestCases().add( testCase );
+        }
+        else if ( "failure".equals( qName ) )
+        {
+            Map failure = testCase.getFailure();
+
+            failure.put( "detail", parseCause( currentElement.toString() ) );
+        }
+        else if ( "error".equals( qName ) )
+        {
+            Map error = testCase.getFailure();
+
+            error.put( "detail", parseCause( currentElement.toString() ) );
+        }
+        else if ( "time".equals( qName ) )
+        {
+            try
+            {
+                Number time = numberFormat.parse( currentElement.toString() );
+                defaultSuite.setTimeElapsed( time.floatValue() );
+            }
+            catch ( ParseException e )
+            {
+                throw new SAXException( e.getMessage(), e );
+            }
+        }
+        // TODO extract real skipped reasons
+    }
+
+    /** {@inheritDoc} */
+    public void characters( char[] ch, int start, int length )
+        throws SAXException
+    {
+        String s = new String( ch, start, length );
+
+        if ( !"".equals( s.trim() ) )
+        {
+            currentElement.append( s );
+        }
+    }
+
+    private List parseCause( String detail )
+    {
+        String fullName = testCase.getFullName();
+        String name = fullName.substring( fullName.lastIndexOf( "." ) + 1 );
+        return parseCause( detail, name );
+    }
+
+    private List parseCause( String detail, String compareTo )
+    {
+        StringTokenizer stringTokenizer = new StringTokenizer( detail, "\n" );
+        List parsedDetail = new ArrayList( stringTokenizer.countTokens() );
+
+        while ( stringTokenizer.hasMoreTokens() )
+        {
+            String lineString = stringTokenizer.nextToken().trim();
+            parsedDetail.add( lineString );
+            if ( lineString.indexOf( compareTo ) >= 0 )
+            {
+                break;
+            }
+        }
+
+        return parsedDetail;
+    }
+
+}

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/misc/TestSuiteXmlParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: maven/surefire/trunk/surefire-setup-integration-tests/pom.xml (from r1082844, maven/surefire/trunk/surefire-integration-tests/pom.xml)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-setup-integration-tests/pom.xml?p2=maven/surefire/trunk/surefire-setup-integration-tests/pom.xml&p1=maven/surefire/trunk/surefire-integration-tests/pom.xml&r1=1082844&r2=1082986&rev=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/pom.xml (original)
+++ maven/surefire/trunk/surefire-setup-integration-tests/pom.xml Fri Mar 18 17:26:25 2011
@@ -30,12 +30,11 @@
   </parent>
 
   <groupId>org.apache.maven.surefire</groupId>
-  <artifactId>surefire-integration-tests</artifactId>
+  <artifactId>surefire-setup-integration-tests</artifactId>
 
-  <name>Maven Surefire Integration Tests</name>
+  <name>Maven Surefire Integration Test Setup</name>
 
   <dependencies>
-    <!-- DGF Depend on the SurefireReportParser -->
     <dependency>
       <artifactId>maven-surefire-report-plugin</artifactId>
       <groupId>org.apache.maven.plugins</groupId>
@@ -104,42 +103,7 @@
     </dependency>
   </dependencies>
 
-  <profiles>
-    <profile>
-      <id>parallel</id>
-      <!-- Experimental profile to try out parallel building of surefire itself -->
-      <build>
-        <pluginManagement>
-          <plugins>
-            <plugin>
-              <artifactId>maven-failsafe-plugin</artifactId>
-              <version>${surefire.build.version}</version>
-              <configuration>
-                <parallel>classes</parallel>
-                <threadCount>${surefire.threadcount}</threadCount>
-              </configuration>
-            </plugin>
-
-          </plugins>
-        </pluginManagement>
-
-      </build>
-      <dependencies>
-        <dependency>
-          <groupId>junit</groupId>
-          <artifactId>junit</artifactId>
-          <version>4.8.2</version>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-      <properties>
-        <surefire.build.version>${project.version}</surefire.build.version>
-        <!-- Until we release 2.7.3 -->
-      </properties>
-    </profile>
-
-  </profiles>
-  <build>
+ <build>
     <plugins>
       <plugin>
         <artifactId>maven-help-plugin</artifactId>
@@ -169,7 +133,7 @@
         <artifactId>maven-invoker-plugin</artifactId>
         <version>1.5</version>
         <configuration>
-          <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
+          <localRepositoryPath>$${project.build.directory}/it-repo</localRepositoryPath>
         </configuration>
         <executions>
           <execution>
@@ -211,49 +175,6 @@
         </configuration>
       </plugin>
       <plugin>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <version>${project.version}</version>
-        <configuration>
-          <!-- Pass current surefire version to the main suite so that it -->
-          <!-- can forward to all integration test projects. SUREFIRE-513 -->
-          <systemProperties>
-            <property>
-              <name>surefire.version</name>
-              <value>${project.version}</value>
-            </property>
-            <property>
-              <name>testng.version</name>
-              <value>${testng.version}</value>
-            </property>
-            <property>
-              <name>maven.home</name>
-              <value>${maven.home}</value>
-            </property>
-            <property>
-              <name>maven.settings.file</name>
-              <value>${project.build.directory}/private/it-settings.xml</value>
-            </property>
-            <property>
-              <name>maven.repo.local</name>
-              <value>${project.build.directory}/it-repo</value>
-            </property>
-            <property>
-              <name>maven.test.tmpdir</name>
-              <value>${project.build.directory}</value>
-            </property>
-          </systemProperties>
-
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>

Copied: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java (from r1082844, maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java?p2=maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java&p1=maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java&r1=1082844&r2=1082986&rev=1082986&view=diff
==============================================================================
    (empty)

Propchange: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/SetUpForIntegrationTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Copied: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java (from r1082844, maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java?p2=maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java&p1=maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java&r1=1082844&r2=1082986&rev=1082986&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java (original)
+++ maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java Fri Mar 18 17:26:25 2011
@@ -19,12 +19,6 @@ package org.apache.maven.surefire.its;
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Random;
-
 import org.apache.maven.settings.Profile;
 import org.apache.maven.settings.Repository;
 import org.apache.maven.settings.RepositoryPolicy;
@@ -35,6 +29,12 @@ import org.codehaus.plexus.util.ReaderFa
 import org.codehaus.plexus.util.WriterFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
 /**
  * Helper class to assist in using verifier with a staged local repository.
  *

Propchange: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/surefire/trunk/surefire-setup-integration-tests/src/test/java/org/apache/maven/surefire/its/StagedLocalRepoHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message