You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2012/12/06 19:02:21 UTC

git commit: o Made failsafe use same runresult handling as surefire

Updated Branches:
  refs/heads/master d342273c3 -> d39c290e7


o Made failsafe use same runresult handling as surefire


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/d39c290e
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/d39c290e
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/d39c290e

Branch: refs/heads/master
Commit: d39c290e74c6cae75e3893f29db26808eb80c877
Parents: d342273
Author: Kristian Rosenvold <kr...@apache.org>
Authored: Tue Nov 20 08:19:55 2012 +0100
Committer: Kristian Rosenvold <kr...@apache.org>
Committed: Thu Dec 6 11:47:06 2012 +0100

----------------------------------------------------------------------
 maven-failsafe-plugin/pom.xml                      |   22 --
 .../maven/plugin/failsafe/IntegrationTestMojo.java |   76 ++------
 .../apache/maven/plugin/failsafe/VerifyMojo.java   |   30 +--
 .../src/main/mdo/failsafe-summary.mdo              |  143 -------------
 .../plugin/surefire/AbstractSurefireMojo.java      |    4 +
 .../maven/plugin/surefire/SurefireHelper.java      |   41 ----
 .../plugin/surefire/booterclient/ForkStarter.java  |    6 +-
 .../plugin/surefire/report/TestSetRunListener.java |    3 +
 .../maven/plugin/surefire/SurefirePlugin.java      |    1 -
 .../org/apache/maven/surefire/suite/RunResult.java |  150 +++++++++++++-
 .../apache/maven/surefire/suite/RunResultTest.java |   73 ++++++-
 .../maven/surefire/its/CheckSingleTestIT.java.orig |   71 -------
 .../surefire/its/fixture/SurefireReportParser.java |    2 +-
 .../its/fixture/TestSuiteXmlParserTest.java        |   35 ++++
 ...-org.apache.maven.surefire.test.FailingTest.xml |  154 +++++++++++++++
 ...g.apache.maven.surefire.test.SucceedingTest.xml |   68 +++++++
 .../testsuitexmlparser/failsafe-summary-old.xml    |    8 +
 .../testsuitexmlparser/failsafe-summary.xml        |    8 +
 .../org.apache.maven.surefire.test.FailingTest.txt |   84 ++++++++
 ...g.apache.maven.surefire.test.SucceedingTest.txt |    4 +
 20 files changed, 599 insertions(+), 384 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-failsafe-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml
index 83b36ea..6634cf8 100644
--- a/maven-failsafe-plugin/pom.xml
+++ b/maven-failsafe-plugin/pom.xml
@@ -204,28 +204,6 @@
         </dependencies>
       </plugin>
       <plugin>
-        <groupId>org.codehaus.modello</groupId>
-        <artifactId>modello-maven-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <!-- Generate the xpp3 reader code -->
-              <goal>xpp3-reader</goal>
-              <!-- Generate the xpp3 writer code -->
-              <goal>xpp3-writer</goal>
-              <!-- Generate the Java sources for the model itself -->
-              <goal>java</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <models>
-            <model>src/main/mdo/failsafe-summary.mdo</model>
-          </models>
-          <version>2.12</version>
-        </configuration>
-      </plugin>
-      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-invoker-plugin</artifactId>
         <configuration>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
----------------------------------------------------------------------
diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
index 730e145..32b95a3 100644
--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
+++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/IntegrationTestMojo.java
@@ -19,16 +19,6 @@ package org.apache.maven.plugin.failsafe;
  * under the License.
  */
 
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.List;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.surefire.AbstractSurefireMojo;
@@ -37,16 +27,16 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.shared.utils.StringUtils;
-import org.apache.maven.surefire.booter.ProviderConfiguration;
-import org.apache.maven.surefire.failsafe.model.FailsafeSummary;
-import org.apache.maven.surefire.failsafe.model.io.xpp3.FailsafeSummaryXpp3Reader;
-import org.apache.maven.surefire.failsafe.model.io.xpp3.FailsafeSummaryXpp3Writer;
 import org.apache.maven.shared.utils.ReaderFactory;
-
+import org.apache.maven.shared.utils.StringUtils;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.util.NestedCheckedException;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
 
 import static org.apache.maven.shared.utils.io.IOUtil.close;
 
@@ -55,7 +45,7 @@ import static org.apache.maven.shared.utils.io.IOUtil.close;
  *
  * @author Jason van Zyl
  * @author Stephen Connolly
- * @noinspection JavaDoc, UnusedDeclaration
+ * @noinspection JavaDoc,
  */
 @Mojo( name = "integration-test", requiresProject = true, requiresDependencyResolution = ResolutionScope.TEST,
        defaultPhase = LifecyclePhase.INTEGRATION_TEST, threadSafe = true )
@@ -181,31 +171,11 @@ public class IntegrationTestMojo
     protected void handleSummary(RunResult summary, NestedCheckedException firstForkException)
         throws MojoExecutionException, MojoFailureException
     {
-        FailsafeSummary failsafeSummary = createFailsafeSummaryFromSummary( summary, firstForkException );
-        writeSummary( failsafeSummary );
-    }
-
-    private FailsafeSummary createFailsafeSummaryFromSummary(RunResult summary, NestedCheckedException firstForkException)
-    {
-        FailsafeSummary failsafeSummary = new FailsafeSummary();
-        if ( firstForkException == null )
-        {
-            if ( summary != null )
-            {
-                failsafeSummary.setResult( summary.getForkedProcessCode() );
-            }
-        }
-        else
-        {
-            failsafeSummary.setResult( ProviderConfiguration.TESTS_FAILED_EXIT_CODE );
-            //noinspection ThrowableResultOfMethodCallIgnored
-            failsafeSummary.setException( firstForkException.getMessage() );
-        }
-        return failsafeSummary;
+        writeSummary( summary, firstForkException );
     }
 
     @SuppressWarnings( "unchecked" )
-    private void writeSummary( FailsafeSummary summary )
+    private void writeSummary( RunResult summary, NestedCheckedException firstForkException )
         throws MojoExecutionException
     {
         File summaryFile = getSummaryFile();
@@ -219,34 +189,13 @@ public class IntegrationTestMojo
         FileInputStream fin = null;
         try
         {
-            FailsafeSummary mergedSummary = summary;
             Object token = getPluginContext().get( FAILSAFE_IN_PROGRESS_CONTEXT_KEY );
-            if ( summaryFile.exists() && token != null )
-            {
-                fin = new FileInputStream( summaryFile );
-
-                mergedSummary = new FailsafeSummaryXpp3Reader().read(
-                    new InputStreamReader( new BufferedInputStream( fin ), getEncodingOrDefault() ) );
-
-                mergedSummary.merge( summary );
-            }
-
-            fout = new FileOutputStream( summaryFile );
-            BufferedOutputStream bufferedOutputStream = new BufferedOutputStream( fout );
-            Writer writer = new OutputStreamWriter( bufferedOutputStream, getEncodingOrDefault() );
-            FailsafeSummaryXpp3Writer xpp3Writer = new FailsafeSummaryXpp3Writer();
-            xpp3Writer.write( writer, mergedSummary );
-            writer.close();
-            bufferedOutputStream.close();
+            summary.writeSummary(summaryFile, token != null, getEncodingOrDefault());
         }
         catch ( IOException e )
         {
             throw new MojoExecutionException( e.getMessage(), e );
         }
-        catch ( XmlPullParserException e )
-        {
-            throw new MojoExecutionException( e.getMessage(), e );
-        }
         finally
         {
             close( fin );
@@ -270,6 +219,7 @@ public class IntegrationTestMojo
         }
     }
 
+    @SuppressWarnings("deprecation")
     protected boolean isSkipExecution()
     {
         return isSkip() || isSkipTests() || isSkipITs() || isSkipExec();
@@ -305,12 +255,14 @@ public class IntegrationTestMojo
         this.skipITs = skipITs;
     }
 
+    @SuppressWarnings("deprecation")
     @Deprecated
     public boolean isSkipExec()
     {
         return skipExec;
     }
 
+    @SuppressWarnings("deprecation")
     @Deprecated
     public void setSkipExec( boolean skipExec )
     {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
----------------------------------------------------------------------
diff --git a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
index 52a4d52..c20752c 100644
--- a/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
+++ b/maven-failsafe-plugin/src/main/java/org/apache/maven/plugin/failsafe/VerifyMojo.java
@@ -19,12 +19,6 @@ package org.apache.maven.plugin.failsafe;
  * under the License.
  */
 
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
@@ -33,13 +27,14 @@ import org.apache.maven.plugin.surefire.SurefireReportParameters;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.shared.utils.ReaderFactory;
 import org.apache.maven.shared.utils.StringUtils;
-import org.apache.maven.surefire.failsafe.model.FailsafeSummary;
-import org.apache.maven.surefire.failsafe.model.io.xpp3.FailsafeSummaryXpp3Reader;
 import org.apache.maven.shared.utils.io.IOUtil;
-import org.apache.maven.shared.utils.ReaderFactory;
+import org.apache.maven.surefire.suite.RunResult;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
+import java.io.*;
+
 /**
  * Verify integration tests ran using Surefire.
  *
@@ -156,7 +151,7 @@ public class VerifyMojo
             getLog().info(
                 StringUtils.capitalizeFirstLetter( getPluginName() ) + " report directory: " + getReportsDirectory() );
 
-            int result;
+            RunResult summary;
             try
             {
                 String encoding;
@@ -172,10 +167,9 @@ public class VerifyMojo
                     encoding = this.encoding;
                 }
 
-                final FailsafeSummary summary;
                 if ( !summaryFile.isFile() && summaryFiles != null )
                 {
-                    summary = new FailsafeSummary();
+                    summary = RunResult.noTestsRun();
                 }
                 else
                 {
@@ -185,10 +179,9 @@ public class VerifyMojo
                 {
                     for ( File file : summaryFiles )
                     {
-                        summary.merge( readSummary( encoding, file ) );
+                        summary = summary.aggregate( readSummary( encoding, file ) );
                     }
                 }
-                result = summary.getResult();
             }
             catch ( IOException e )
             {
@@ -199,11 +192,11 @@ public class VerifyMojo
                 throw new MojoExecutionException( e.getMessage(), e );
             }
 
-            SurefireHelper.reportExecution( this, result, getLog() );
+            SurefireHelper.reportExecution( this, summary, getLog() );
         }
     }
 
-    private FailsafeSummary readSummary( String encoding, File summaryFile )
+    private RunResult readSummary( String encoding, File summaryFile )
         throws IOException, XmlPullParserException
     {
         FileInputStream fileInputStream = null;
@@ -214,8 +207,7 @@ public class VerifyMojo
             fileInputStream = new FileInputStream( summaryFile );
             bufferedInputStream = new BufferedInputStream( fileInputStream );
             reader = new InputStreamReader( bufferedInputStream, encoding );
-            FailsafeSummaryXpp3Reader xpp3Reader = new FailsafeSummaryXpp3Reader();
-            return xpp3Reader.read( reader );
+            return RunResult.fromInputStream(bufferedInputStream, encoding);
         }
         finally
         {
@@ -236,7 +228,7 @@ public class VerifyMojo
 
         if ( !getTestClassesDirectory().exists() )
         {
-            if ( getFailIfNoTests() != null && getFailIfNoTests().booleanValue() )
+            if ( getFailIfNoTests() != null && getFailIfNoTests())
             {
                 throw new MojoFailureException( "No tests to run!" );
             }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-failsafe-plugin/src/main/mdo/failsafe-summary.mdo
----------------------------------------------------------------------
diff --git a/maven-failsafe-plugin/src/main/mdo/failsafe-summary.mdo b/maven-failsafe-plugin/src/main/mdo/failsafe-summary.mdo
deleted file mode 100644
index dfa436b..0000000
--- a/maven-failsafe-plugin/src/main/mdo/failsafe-summary.mdo
+++ /dev/null
@@ -1,143 +0,0 @@
-<?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.
--->
-
-<model xsd.namespace="http://mojo.codehaus.org/plugins/failsafe-maven-plugin/failsafe-summary/2.4.3"
-       xsd.targetNamespace="http://mojo.codehaus.org/plugins/failsafe-maven-plugin/failsafe-summary/2.4.3">
-  <id>failsafe-summary</id>
-  <name>FailsafeSummary</name>
-  <description>
-    A summary of tests executed by the Maven Failsafe Plugin.
-  </description>
-  <defaults>
-    <default>
-      <key>package</key>
-      <value>org.apache.maven.surefire.failsafe.model</value>
-    </default>
-  </defaults>
-  <versionDefinition>
-    <type>namespace</type>
-  </versionDefinition>
-  <classes>
-    <class rootElement="true" xml.tagName="failsafe-summary">
-      <name>FailsafeSummary</name>
-      <description>
-        Describes the results of executing tests
-      </description>
-      <version>2.4.3+</version>
-      <fields>
-        <field xml.attribute="true">
-          <name>result</name>
-          <version>2.4.3+</version>
-          <required>true</required>
-          <type>int</type>
-          <description>The surefire result code</description>
-        </field>
-        <field>
-          <name>exception</name>
-          <version>2.4.3+</version>
-          <required>false</required>
-          <type>String</type>
-          <description>[DEPRECATED] The (original) exception that caused surefire to bomb out</description>
-        </field>
-        <field>
-          <name>exceptions</name>
-          <version>2.12+</version>
-          <required>false</required>
-          <association>
-            <type>String</type>
-            <multiplicity>*</multiplicity>
-          </association>
-          <description>The exception(s) that caused surefire to bomb out</description>
-        </field>
-      </fields>
-      <codeSegments>
-        <codeSegment>
-          <version>2.6.0+</version>
-          <code><![CDATA[
-    /**
-     * Merges the summary result with this summary result.
-     *
-     * @param summary The summary to merge.
-     * @since 2.6
-     */
-    public void merge( FailsafeSummary summary )
-    {
-        switch ( this.result )
-        {
-            case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
-                this.result = summary.result;
-                break;
-            case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
-                switch ( summary.result )
-                {
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
-                        break;
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
-                        break;
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
-                        this.result = summary.result;
-                        break;
-                    default:
-                        this.result = summary.result;
-                        break;
-                }
-                break;
-            case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
-                switch ( summary.result )
-                {
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_SUCCEEDED_EXIT_CODE:
-                        break;
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.NO_TESTS_EXIT_CODE:
-                        break;
-                    case org.apache.maven.surefire.booter.ProviderConfiguration.TESTS_FAILED_EXIT_CODE:
-                        break;
-                    default:
-                        this.result = summary.result;
-                        break;
-                }
-                break;
-            default:
-                break;
-        }
-        
-        if ( this.exception == null )
-        {
-            this.exception = summary.exception;
-        }
-        
-        if ( summary.exceptions != null )
-        {
-            if ( this.exceptions == null )
-            {
-                this.exceptions = summary.exceptions;
-            }
-            else
-            {
-                this.exceptions.addAll( summary.exceptions );
-            }
-        }
-    }
-          ]]></code>
-        </codeSegment>
-      </codeSegments>
-    </class>
-  </classes>
-</model>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 3b46c3a..7c0b906 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -694,8 +694,12 @@ public abstract class AbstractSurefireMojo
                     firstForkException = e;
                 }
             }
+        }
 
+        if (firstForkException != null){
+            current = RunResult.failure(current, firstForkException);
         }
+
         handleSummary( current, firstForkException );
     }
 

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
index 4b2b853..1c285e2 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java
@@ -22,7 +22,6 @@ package org.apache.maven.plugin.surefire;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.surefire.booter.ProviderConfiguration;
 import org.apache.maven.surefire.suite.RunResult;
 
 /**
@@ -39,8 +38,6 @@ public final class SurefireHelper
         throw new IllegalAccessError( "Utility class" );
     }
 
-    // Todo: Fix the duplication, probably by making failsafe relate to a "RunResult" too.
-
     public static void reportExecution( SurefireReportParameters reportParameters, RunResult result, Log log )
         throws MojoFailureException, MojoExecutionException
     {
@@ -84,42 +81,4 @@ public final class SurefireHelper
         }
     }
 
-    public static void reportExecution( SurefireReportParameters reportParameters, int result, Log log )
-        throws MojoFailureException
-    {
-        if ( result == 0 )
-        {
-            return;
-        }
-
-        String msg;
-
-        if ( result == ProviderConfiguration.NO_TESTS_EXIT_CODE )
-        {
-            if ( ( reportParameters.getFailIfNoTests() == null ) || !reportParameters.getFailIfNoTests() )
-            {
-                return;
-            }
-            // TODO: i18n
-            throw new MojoFailureException(
-                "No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.)" );
-        }
-        else
-        {
-            // TODO: i18n
-            msg = "There are test failures.\n\nPlease refer to " + reportParameters.getReportsDirectory()
-                + " for the individual test results.";
-
-        }
-
-        if ( reportParameters.isTestFailureIgnore() )
-        {
-            log.error( msg );
-        }
-        else
-        {
-            throw new MojoFailureException( msg );
-        }
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
index 19bfff3..a1ecc9b 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/ForkStarter.java
@@ -406,21 +406,21 @@ public class ForkStarter
         }
         catch ( CommandLineTimeOutException e )
         {
-            runResult = RunResult.Timeout;
+            runResult = RunResult.timeout(fileReporterFactory.getGlobalRunStatistics().getRunResult());
         }
         catch ( CommandLineException e )
         {
-            runResult = RunResult.Failure;
+            runResult = RunResult.failure(fileReporterFactory.getGlobalRunStatistics().getRunResult(), e);
             throw new SurefireBooterForkException( "Error while executing forked tests.", e.getCause() );
         }
         finally
         {
             threadedStreamConsumer.close();
-            forkClient.close( runResult == RunResult.Timeout );
             if ( runResult == null )
             {
                 runResult = fileReporterFactory.getGlobalRunStatistics().getRunResult();
             }
+            forkClient.close( runResult.isTimeout());
         }
 
         return runResult;

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetRunListener.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetRunListener.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetRunListener.java
index f01ab96..33ca938 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetRunListener.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetRunListener.java
@@ -44,6 +44,9 @@ public class TestSetRunListener
 
     private final TestSetStats detailsForThis;
 
+    static {
+        System.out.println("static = " + true);
+    }
 
     private final List<ByteBuffer> testStdOut = Collections.synchronizedList( new ArrayList<ByteBuffer>() );
 

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
----------------------------------------------------------------------
diff --git a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
index 5adcdcf..0126f27 100644
--- a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
+++ b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
@@ -148,7 +148,6 @@ public class SurefirePlugin
         throws MojoExecutionException, MojoFailureException
     {
         assertNoException( firstForkException );
-        assertNoFailureOrTimeout( firstForkException );  // todo: These seem identical ??
 
         SurefireHelper.reportExecution(this, summary, getLog() );
     }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java b/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
index d6291d8..f710225 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/suite/RunResult.java
@@ -19,9 +19,21 @@ package org.apache.maven.surefire.suite;
  * under the License.
  */
 
+import org.apache.maven.shared.utils.StringUtils;
+import org.apache.maven.shared.utils.io.IOUtil;
+import org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter;
+import org.apache.maven.shared.utils.xml.Xpp3Dom;
+import org.apache.maven.shared.utils.xml.Xpp3DomBuilder;
+import org.apache.maven.shared.utils.xml.Xpp3DomWriter;
+
+import java.io.*;
+
 /**
  * Represents a test-run-result; this may be from a single test run or an aggregated result.
  *
+ * In the case of timeout==true, the run-counts reflect the state of the test-run at the time
+ * of the timeout.
+ *
  * @author Kristian Rosenvold
  */
 public class RunResult
@@ -34,7 +46,7 @@ public class RunResult
 
     private final int skipped;
 
-    private final boolean failure;
+    private final String failure;
 
     private final boolean timeout;
 
@@ -44,16 +56,26 @@ public class RunResult
 
     private static final int NO_TESTS = 254;
 
-    public static final RunResult Timeout = new RunResult( 0, 0, 0, 0, false, true );
+    public static RunResult timeout(RunResult accumulatedAtTimeout){
+        return errorCode( accumulatedAtTimeout, accumulatedAtTimeout.getFailure(), true);
+    }
+
+    public static RunResult failure(RunResult accumulatedAtTimeout, Exception cause){
+        return errorCode( accumulatedAtTimeout, getStackTrace(cause), accumulatedAtTimeout.isTimeout());
+    }
+
+    private static RunResult errorCode( RunResult other, String failure, boolean  timeout){
+        return new RunResult(other.getCompletedCount(), other.getErrors(),
+                other.getFailures(), other.getSkipped(), failure, timeout);
 
-    public static final RunResult Failure = new RunResult( 0, 0, 0, 0, true, false);
+    }
 
     public RunResult( int completedCount, int errors, int failures, int skipped )
     {
-        this( completedCount, errors, failures, skipped, false, false );
+        this( completedCount, errors, failures, skipped, null, false );
     }
 
-    public RunResult( int completedCount, int errors, int failures, int skipped, boolean failure, boolean timeout )
+    public RunResult( int completedCount, int errors, int failures, int skipped, String failure, boolean timeout )
     {
         this.completedCount = completedCount;
         this.errors = errors;
@@ -63,6 +85,14 @@ public class RunResult
         this.timeout = timeout;
     }
 
+    private static String getStackTrace(Exception e){
+        if (e== null)  return null;
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        PrintWriter pw = new PrintWriter(out);
+        e.printStackTrace(pw);
+        return new String(out.toByteArray());
+    }
+
     public int getCompletedCount()
     {
         return completedCount;
@@ -83,9 +113,11 @@ public class RunResult
         return skipped;
     }
 
-    public int getForkedProcessCode()
+    public Integer getFailsafeCode()  // Only used for compatibility reasons.
     {
-        return completedCount == 0 ? NO_TESTS : isErrorFree() ? SUCCESS : FAILURE;
+        if (completedCount == 0) return Integer.valueOf(NO_TESTS);
+        if (!isErrorFree()) return Integer.valueOf( FAILURE );
+        return null;
     }
 
     /* Indicates if the tests are error free */
@@ -97,11 +129,15 @@ public class RunResult
     /* Indicates test timeout or technical failure */
     public boolean isFailureOrTimeout()
     {
-        return this.timeout || this.failure;
+        return this.timeout || isFailure();
     }
 
     public boolean isFailure()
     {
+        return failure != null;
+    }
+
+    public String getFailure() {
         return failure;
     }
 
@@ -113,17 +149,111 @@ public class RunResult
 
     public RunResult aggregate( RunResult other )
     {
-        boolean failure = isFailure() || other.isFailure();
+        String failureMessage = getFailure() != null ? getFailure() : other.getFailure();
         boolean timeout = isTimeout() || other.isTimeout();
         int completed = getCompletedCount() + other.getCompletedCount();
         int fail = getFailures() + other.getFailures();
         int ign = getSkipped() + other.getSkipped();
         int err = getErrors() + other.getErrors();
-        return new RunResult( completed, err, fail, ign, failure, timeout );
+        return new RunResult( completed, err, fail, ign, failureMessage, timeout );
     }
 
     public static RunResult noTestsRun()
     {
         return new RunResult( 0, 0, 0, 0 );
     }
+
+    private Xpp3Dom create(String node, String value){
+        Xpp3Dom dom = new Xpp3Dom(node);
+        dom.setValue( value);
+        return dom;
+    }
+    private Xpp3Dom create(String node, int value){
+        return create(node, Integer.toString(value));
+    }
+
+    Xpp3Dom asXpp3Dom(){
+        Xpp3Dom dom = new Xpp3Dom("failsafe-summary");
+        Integer failsafeCode = getFailsafeCode();
+        if ( failsafeCode != null ){
+            dom.setAttribute( "result", Integer.toString( failsafeCode.intValue()) );
+        }
+        dom.setAttribute("timeout", Boolean.toString(this.timeout));
+        dom.addChild(create("completed", this.completedCount));
+        dom.addChild(create("errors", this.errors));
+        dom.addChild(create("failures", this.failures));
+        dom.addChild(create("skipped", this.skipped));
+        dom.addChild(create("failureMessage", this.failure));
+        return dom;
+    }
+
+    public static RunResult fromInputStream(InputStream inputStream, String encoding) throws FileNotFoundException {
+        Xpp3Dom dom = Xpp3DomBuilder.build(inputStream, encoding);
+        boolean timeout = Boolean.parseBoolean(dom.getAttribute("timeout"));
+        int completed = Integer.parseInt(dom.getChild("completed").getValue());
+        int errors = Integer.parseInt(dom.getChild("errors").getValue());
+        int failures = Integer.parseInt(dom.getChild("failures").getValue());
+        int skipped = Integer.parseInt( dom.getChild("skipped").getValue());
+        String failureMessage1 = dom.getChild("failureMessage").getValue();
+        String failureMessage = StringUtils.isEmpty(failureMessage1) ? null : failureMessage1;
+        return new RunResult(completed, errors, failures, skipped, failureMessage, timeout);
+    }
+
+    public void writeSummary( File summaryFile, boolean inProgress, String encoding) throws IOException {
+        if ( !summaryFile.getParentFile().isDirectory() )
+        {
+            //noinspection ResultOfMethodCallIgnored
+            summaryFile.getParentFile().mkdirs();
+        }
+
+        FileInputStream fin = null;
+        FileWriter writer = null;
+        try
+        {
+            RunResult mergedSummary = this;
+            if ( summaryFile.exists() && inProgress )
+            {
+                fin = new FileInputStream( summaryFile );
+
+                RunResult runResult = RunResult.fromInputStream(new BufferedInputStream(fin), encoding);
+                mergedSummary = mergedSummary.aggregate( runResult);
+            }
+
+            writer = new FileWriter(summaryFile);
+            writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+            PrettyPrintXMLWriter prettyPrintXMLWriter = new PrettyPrintXMLWriter(writer);
+            Xpp3DomWriter.write(prettyPrintXMLWriter, mergedSummary.asXpp3Dom());
+        }
+        finally
+        {
+            IOUtil.close(fin);
+            IOUtil.close(writer);
+        }
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        RunResult runResult = (RunResult) o;
+
+        if (completedCount != runResult.completedCount) return false;
+        if (errors != runResult.errors) return false;
+        if (failures != runResult.failures) return false;
+        if (skipped != runResult.skipped) return false;
+        if (timeout != runResult.timeout) return false;
+        if (failure != null ? !failure.equals(runResult.failure) : runResult.failure != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result = completedCount;
+        result = 31 * result + errors;
+        result = 31 * result + failures;
+        result = 31 * result + skipped;
+        result = 31 * result + (failure != null ? failure.hashCode() : 0);
+        result = 31 * result + (timeout ? 1 : 0);
+        return result;
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-api/src/test/java/org/apache/maven/surefire/suite/RunResultTest.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/test/java/org/apache/maven/surefire/suite/RunResultTest.java b/surefire-api/src/test/java/org/apache/maven/surefire/suite/RunResultTest.java
index 32fe232..67d57e9 100644
--- a/surefire-api/src/test/java/org/apache/maven/surefire/suite/RunResultTest.java
+++ b/surefire-api/src/test/java/org/apache/maven/surefire/suite/RunResultTest.java
@@ -20,6 +20,11 @@ package org.apache.maven.surefire.suite;
  */
 
 import junit.framework.TestCase;
+import org.apache.maven.shared.utils.StringUtils;
+import org.apache.maven.shared.utils.xml.PrettyPrintXMLWriter;
+import org.apache.maven.shared.utils.xml.Xpp3DomWriter;
+
+import java.io.*;
 
 /**
  * @author Kristian Rosenvold
@@ -52,21 +57,67 @@ public class RunResultTest
 
     }
 
+    public void testSerialization() throws FileNotFoundException {
+        writeReadCheck(getSimpleAggregate());
+    }
+
+    public void testFailures() throws FileNotFoundException {
+        writeReadCheck(new RunResult(0,1,2,3,"stacktraceHere",false));
+    }
+
+    public void testSkipped() throws FileNotFoundException {
+        writeReadCheck(new RunResult(3,2,1,0,null,true));
+    }
+
+    public void testAppendSerialization() throws IOException {
+        RunResult simpleAggregate = getSimpleAggregate();
+        RunResult additional = new RunResult(2,1,2,2, null, true);
+        File summary = File.createTempFile("failsafe", "test");
+        simpleAggregate.writeSummary(summary, false, "utf-8");
+        additional.writeSummary(summary, true, "utf-8");
+
+        RunResult actual = RunResult.fromInputStream(new FileInputStream(summary), "utf-8");
+        RunResult expected = simpleAggregate.aggregate(additional);
+        assertEquals(expected, actual);
+        //noinspection ResultOfMethodCallIgnored
+        summary.delete();
+
+    }
+
+    public void testStringValue() throws FileNotFoundException {
+        RunResult simpleAggregate = new RunResult(3, 2, 1, 0, null, true);
+        StringWriter stringWriter = getStringWriter(simpleAggregate);
+        String actual = stringWriter.toString();
+
+        String expected = StringUtils.unifyLineSeparators("<failsafe-summary result=\"255\" timeout=\"true\">\n" +
+                "  <completed>3</completed>\n" +
+                "  <errors>2</errors>\n" +
+                "  <failures>1</failures>\n" +
+                "  <skipped>0</skipped>\n" +
+                "  <failureMessage/>\n" +
+                "</failsafe-summary>");
+        assertEquals( expected, actual);
+    }
+
+
+    private void writeReadCheck(RunResult simpleAggregate) throws FileNotFoundException {
+        StringWriter writer = getStringWriter(simpleAggregate);
+
+        RunResult actual = RunResult.fromInputStream(new ByteArrayInputStream(writer.getBuffer().toString().getBytes()), "UTF-8");
+        assertEquals(simpleAggregate, actual);
+    }
+
+    private StringWriter getStringWriter(RunResult simpleAggregate) {
+        StringWriter writer = new StringWriter();
+        PrettyPrintXMLWriter wr = new PrettyPrintXMLWriter(writer);
+        Xpp3DomWriter.write(wr, simpleAggregate.asXpp3Dom());
+        return writer;
+    }
+
     private RunResult getSimpleAggregate()
     {
         RunResult resultOne = new RunResult( 10, 1, 3, 2 );
         RunResult resultTwo = new RunResult( 10, 2, 4, 2 );
         return resultOne.aggregate( resultTwo );
     }
-
-
-    private void verifySame( RunResult original, RunResult runResult )
-    {
-        assertEquals( original.getCompletedCount(), runResult.getCompletedCount() );
-        assertEquals( original.getErrors(), runResult.getErrors() );
-        assertEquals( original.getFailures(), runResult.getFailures() );
-        assertEquals( original.getSkipped(), runResult.getSkipped() );
-        assertEquals( original.isFailure(), runResult.isFailure() );
-        assertEquals( original.isTimeout(), runResult.isTimeout() );
-    }
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java.orig
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java.orig b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java.orig
deleted file mode 100644
index 45e9a64..0000000
--- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/CheckSingleTestIT.java.orig
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.maven.surefire.its;
-
-/*
- * 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.fixture.OutputValidator;
-import org.apache.maven.surefire.its.fixture.SurefireLauncher;
-import org.apache.maven.surefire.its.fixture.SurefireIntegrationTestCase;
-import org.apache.maven.surefire.its.fixture.TestFile;
-
-/**
- * Test running a single test with -Dtest=BasicTest
- *
- * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
- * @author <a href="mailto:krosenvold@apache.org">Kristian Rosenvold</a>
- */
-public class CheckSingleTestIT
-    extends SurefireIntegrationTestCase
-{
-    public void testSingleTest()
-    {
-        unpack().setTestToRun( "BasicTest" ).executeTest().verifyErrorFree( 1 );
-    }
-
-    public void testSingleTestDotJava()
-    {
-        unpack().setTestToRun( "BasicTest.java" ).executeTest().verifyErrorFree( 1 );
-    }
-
-    public void testSingleTestNonExistent()
-    {
-        final OutputValidator output = unpack().setTestToRun( "DoesNotExist" ).executeTestWithFailure();
-        TestFile reportsDir = output.getTargetFile( "surefire-reports" );
-        assertFalse( "Unexpected reports directory", reportsDir.exists() );
-    }
-
-    public void testSingleTestNonExistentOverride()
-    {
-        final OutputValidator output =
-            unpack().setTestToRun( "DoesNotExist" ).failIfNoTests( false ).executeTest().verifyErrorFreeLog();
-        TestFile reportsDir = output.getTargetFile( "surefire-reports" );
-        assertFalse( "Unexpected reports directory", reportsDir.exists() );
-    }
-
-    public void testSingleTestInOneExecutionOfMultiExecutionProject()
-    {
-        unpack( "/default-configuration-multi-exec" ).setTestToRun( "FirstTest" ).addGoal( "-X" ).failIfNoSpecifiedTests( false ).executeTest().verifyErrorFree( 1 );
-    }
-
-    private SurefireLauncher unpack()
-    {
-        return unpack( "/default-configuration" );
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireReportParser.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireReportParser.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireReportParser.java
index d841b46..9b3e7dd 100644
--- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireReportParser.java
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/SurefireReportParser.java
@@ -57,7 +57,7 @@ public class SurefireReportParser
                 continue;
             }
             String[] xmlReportFiles = getIncludedFiles( reportsDirectory, "*.xml",
-                                                        "*.txt, testng-failed.xml, testng-failures.xml, testng-results.xml" );
+                             "*.txt, testng-failed.xml, testng-failures.xml, testng-results.xml, failsafe-summary.xml");
             for ( String xmlReportFile : xmlReportFiles )
             {
                 File xmlReport = new File( reportsDirectory, xmlReportFile );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/TestSuiteXmlParserTest.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/TestSuiteXmlParserTest.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/TestSuiteXmlParserTest.java
new file mode 100644
index 0000000..64ec7f5
--- /dev/null
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/fixture/TestSuiteXmlParserTest.java
@@ -0,0 +1,35 @@
+package org.apache.maven.surefire.its.fixture;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.util.Collection;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * @author Kristian Rosenvold
+ */
+public class TestSuiteXmlParserTest
+{
+    @Test
+    public void testParser()
+        throws IOException, SAXException, ParserConfigurationException
+    {
+        TestSuiteXmlParser parser = new TestSuiteXmlParser();
+
+        Collection<ReportTestSuite> oldResult =
+            parser.parse( "src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml" );
+
+        assertNotNull( oldResult);
+
+        assertEquals( 1, oldResult.size() );
+        ReportTestSuite next = oldResult.iterator().next();
+        assertEquals( 2, next.getNumberOfTests() );
+
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml
new file mode 100644
index 0000000..09c9c6d
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.FailingTest.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite failures="2" time="0.014" errors="0" skipped="0" tests="2" name="org.apache.maven.surefire.test.FailingTest">
+  <properties>
+    <property name="surefire.version" value="2.13-SNAPSHOT"/>
+    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
+    <property name="sun.boot.library.path" value="c:\java\jdk1.7.0_09\jre\bin"/>
+    <property name="java.vm.version" value="23.5-b02"/>
+    <property name="user.country.format" value="NO"/>
+    <property name="java.vm.vendor" value="Oracle Corporation"/>
+    <property name="java.vendor.url" value="http://java.oracle.com/"/>
+    <property name="path.separator" value=";"/>
+    <property name="guice.disable.misplaced.annotation.check" value="true"/>
+    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
+    <property name="file.encoding.pkg" value="sun.io"/>
+    <property name="user.script" value=""/>
+    <property name="user.country" value="US"/>
+    <property name="sun.java.launcher" value="SUN_STANDARD"/>
+    <property name="sun.os.patch.level" value="Service Pack 1"/>
+    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
+    <property name="user.dir" value="c:\workspace\maven-surefire\surefire-integration-tests\src\test\resources\surefire-803-multiFailsafeExec-failureInFirst"/>
+    <property name="java.runtime.version" value="1.7.0_09-b05"/>
+    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
+    <property name="java.endorsed.dirs" value="c:\java\jdk1.7.0_09\jre\lib\endorsed"/>
+    <property name="os.arch" value="amd64"/>
+    <property name="java.io.tmpdir" value="C:\Users\krose\AppData\Local\Temp\"/>
+    <property name="line.separator" value="
+"/>
+    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
+    <property name="user.variant" value=""/>
+    <property name="os.name" value="Windows 7"/>
+    <property name="classworlds.conf" value="c:/java/apache-maven-3.0.4/bin/m2.conf"/>
+    <property name="sun.jnu.encoding" value="Cp1252"/>
+    <property name="java.library.path" value="c:\java\jdk1.7.0_09\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;x:\bin;.;C:\java\Git\local\bin;C:\java\Git\mingw\bin;C:\java\Git\bin;c:\java\jdk1.7.0_09\bin;c:\java\Subversion;c:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;c:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\java\jdk1.7.0_09\bin;c:\java\Subversion;c:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;c:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\java\bin;."/>
+    <property name="java.specification.name" value="Java Platform API Specification"/>
+    <property name="java.class.version" value="51.0"/>
+    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
+    <property name="os.version" value="6.1"/>
+    <property name="user.home" value="C:\Users\krose"/>
+    <property name="user.timezone" value="Europe/Paris"/>
+    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
+    <property name="java.specification.version" value="1.7"/>
+    <property name="file.encoding" value="Cp1252"/>
+    <property name="user.name" value="krose"/>
+    <property name="java.class.path" value="c:/java/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar"/>
+    <property name="java.vm.specification.version" value="1.7"/>
+    <property name="sun.arch.data.model" value="64"/>
+    <property name="java.home" value="c:\java\jdk1.7.0_09\jre"/>
+    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -Dsurefire.version=2.13-SNAPSHOT clean verify"/>
+    <property name="java.specification.vendor" value="Oracle Corporation"/>
+    <property name="user.language" value="en"/>
+    <property name="user.language.format" value="no"/>
+    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
+    <property name="java.vm.info" value="mixed mode"/>
+    <property name="java.version" value="1.7.0_09"/>
+    <property name="java.ext.dirs" value="c:\java\jdk1.7.0_09\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
+    <property name="sun.boot.class.path" value="c:\java\jdk1.7.0_09\jre\lib\resources.jar;c:\java\jdk1.7.0_09\jre\lib\rt.jar;c:\java\jdk1.7.0_09\jre\lib\sunrsasign.jar;c:\java\jdk1.7.0_09\jre\lib\jsse.jar;c:\java\jdk1.7.0_09\jre\lib\jce.jar;c:\java\jdk1.7.0_09\jre\lib\charsets.jar;c:\java\jdk1.7.0_09\jre\lib\jfr.jar;c:\java\jdk1.7.0_09\jre\classes"/>
+    <property name="java.vendor" value="Oracle Corporation"/>
+    <property name="maven.home" value="c:\java\apache-maven-3.0.4"/>
+    <property name="file.separator" value="\"/>
+    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
+    <property name="sun.cpu.endian" value="little"/>
+    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
+    <property name="sun.desktop" value="windows"/>
+    <property name="sun.cpu.isalist" value="amd64"/>
+  </properties>
+  <testcase time="0.013" classname="org.apache.maven.surefire.test.FailingTest" name="defaultTestValueIs_Value">
+    <failure message="
+Expected: &quot;wrong&quot;
+     got: &quot;value&quot;
+" type="java.lang.AssertionError">java.lang.AssertionError: 
+Expected: &quot;wrong&quot;
+     got: &quot;value&quot;
+
+	at org.junit.Assert.assertThat(Assert.java:778)
+	at org.junit.Assert.assertThat(Assert.java:736)
+	at org.apache.maven.surefire.test.FailingTest.defaultTestValueIs_Value(FailingTest.java:23)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
+	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
+	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
+	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:151)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:122)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:128)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:88)
+</failure>
+  </testcase>
+  <testcase time="0.001" classname="org.apache.maven.surefire.test.FailingTest" name="setTestAndRetrieveValue">
+    <failure message="
+Expected: &quot;bar&quot;
+     got: &quot;foo&quot;
+" type="java.lang.AssertionError">java.lang.AssertionError: 
+Expected: &quot;bar&quot;
+     got: &quot;foo&quot;
+
+	at org.junit.Assert.assertThat(Assert.java:778)
+	at org.junit.Assert.assertThat(Assert.java:736)
+	at org.apache.maven.surefire.test.FailingTest.setTestAndRetrieveValue(FailingTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
+	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
+	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
+	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:151)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:122)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:128)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:88)
+</failure>
+  </testcase>
+</testsuite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.SucceedingTest.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.SucceedingTest.xml b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.SucceedingTest.xml
new file mode 100644
index 0000000..2801bf6
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/TEST-org.apache.maven.surefire.test.SucceedingTest.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite failures="0" time="0.008" errors="0" skipped="0" tests="2" name="org.apache.maven.surefire.test.SucceedingTest">
+  <properties>
+    <property name="surefire.version" value="2.13-SNAPSHOT"/>
+    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
+    <property name="sun.boot.library.path" value="c:\java\jdk1.7.0_09\jre\bin"/>
+    <property name="java.vm.version" value="23.5-b02"/>
+    <property name="user.country.format" value="NO"/>
+    <property name="java.vm.vendor" value="Oracle Corporation"/>
+    <property name="java.vendor.url" value="http://java.oracle.com/"/>
+    <property name="path.separator" value=";"/>
+    <property name="guice.disable.misplaced.annotation.check" value="true"/>
+    <property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
+    <property name="file.encoding.pkg" value="sun.io"/>
+    <property name="user.script" value=""/>
+    <property name="user.country" value="US"/>
+    <property name="sun.java.launcher" value="SUN_STANDARD"/>
+    <property name="sun.os.patch.level" value="Service Pack 1"/>
+    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
+    <property name="user.dir" value="c:\workspace\maven-surefire\surefire-integration-tests\src\test\resources\surefire-803-multiFailsafeExec-failureInFirst"/>
+    <property name="java.runtime.version" value="1.7.0_09-b05"/>
+    <property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
+    <property name="java.endorsed.dirs" value="c:\java\jdk1.7.0_09\jre\lib\endorsed"/>
+    <property name="os.arch" value="amd64"/>
+    <property name="java.io.tmpdir" value="C:\Users\krose\AppData\Local\Temp\"/>
+    <property name="line.separator" value="
+"/>
+    <property name="java.vm.specification.vendor" value="Oracle Corporation"/>
+    <property name="user.variant" value=""/>
+    <property name="os.name" value="Windows 7"/>
+    <property name="classworlds.conf" value="c:/java/apache-maven-3.0.4/bin/m2.conf"/>
+    <property name="sun.jnu.encoding" value="Cp1252"/>
+    <property name="java.library.path" value="c:\java\jdk1.7.0_09\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;x:\bin;.;C:\java\Git\local\bin;C:\java\Git\mingw\bin;C:\java\Git\bin;c:\java\jdk1.7.0_09\bin;c:\java\Subversion;c:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;c:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\java\jdk1.7.0_09\bin;c:\java\Subversion;c:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;c:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\java\bin;."/>
+    <property name="java.specification.name" value="Java Platform API Specification"/>
+    <property name="java.class.version" value="51.0"/>
+    <property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
+    <property name="os.version" value="6.1"/>
+    <property name="user.home" value="C:\Users\krose"/>
+    <property name="user.timezone" value="Europe/Paris"/>
+    <property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
+    <property name="java.specification.version" value="1.7"/>
+    <property name="file.encoding" value="Cp1252"/>
+    <property name="user.name" value="krose"/>
+    <property name="java.class.path" value="c:/java/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar"/>
+    <property name="java.vm.specification.version" value="1.7"/>
+    <property name="sun.arch.data.model" value="64"/>
+    <property name="java.home" value="c:\java\jdk1.7.0_09\jre"/>
+    <property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher -Dsurefire.version=2.13-SNAPSHOT clean verify"/>
+    <property name="java.specification.vendor" value="Oracle Corporation"/>
+    <property name="user.language" value="en"/>
+    <property name="user.language.format" value="no"/>
+    <property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
+    <property name="java.vm.info" value="mixed mode"/>
+    <property name="java.version" value="1.7.0_09"/>
+    <property name="java.ext.dirs" value="c:\java\jdk1.7.0_09\jre\lib\ext;C:\Windows\Sun\Java\lib\ext"/>
+    <property name="sun.boot.class.path" value="c:\java\jdk1.7.0_09\jre\lib\resources.jar;c:\java\jdk1.7.0_09\jre\lib\rt.jar;c:\java\jdk1.7.0_09\jre\lib\sunrsasign.jar;c:\java\jdk1.7.0_09\jre\lib\jsse.jar;c:\java\jdk1.7.0_09\jre\lib\jce.jar;c:\java\jdk1.7.0_09\jre\lib\charsets.jar;c:\java\jdk1.7.0_09\jre\lib\jfr.jar;c:\java\jdk1.7.0_09\jre\classes"/>
+    <property name="java.vendor" value="Oracle Corporation"/>
+    <property name="maven.home" value="c:\java\apache-maven-3.0.4"/>
+    <property name="file.separator" value="\"/>
+    <property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
+    <property name="sun.cpu.endian" value="little"/>
+    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
+    <property name="sun.desktop" value="windows"/>
+    <property name="sun.cpu.isalist" value="amd64"/>
+  </properties>
+  <testcase time="0.007" classname="org.apache.maven.surefire.test.SucceedingTest" name="defaultTestValueIs_Value"/>
+  <testcase time="0.001" classname="org.apache.maven.surefire.test.SucceedingTest" name="setTestAndRetrieveValue"/>
+</testsuite>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary-old.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary-old.xml b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary-old.xml
new file mode 100644
index 0000000..6839aa9
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary-old.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<failsafe-summary timeout="false">
+  <completed>1</completed>
+  <errors>0</errors>
+  <failures>1</failures>
+  <skipped>0</skipped>
+  <failureMessage/>
+</failsafe-summary>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary.xml b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary.xml
new file mode 100644
index 0000000..1bc82d9
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/failsafe-summary.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<failsafe-summary timeout="false">
+  <completed>4</completed>
+  <errors>0</errors>
+  <failures>2</failures>
+  <skipped>0</skipped>
+  <failureMessage/>
+</failsafe-summary>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.FailingTest.txt
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.FailingTest.txt b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.FailingTest.txt
new file mode 100644
index 0000000..38abc1f
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.FailingTest.txt
@@ -0,0 +1,84 @@
+-------------------------------------------------------------------------------
+Test set: org.apache.maven.surefire.test.FailingTest
+-------------------------------------------------------------------------------
+Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.046 sec <<< FAILURE!
+defaultTestValueIs_Value(org.apache.maven.surefire.test.FailingTest)  Time elapsed: 0.013 sec  <<< FAILURE!
+java.lang.AssertionError: 
+Expected: "wrong"
+     got: "value"
+
+	at org.junit.Assert.assertThat(Assert.java:778)
+	at org.junit.Assert.assertThat(Assert.java:736)
+	at org.apache.maven.surefire.test.FailingTest.defaultTestValueIs_Value(FailingTest.java:23)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
+	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
+	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
+	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:151)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:122)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:128)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:88)
+
+setTestAndRetrieveValue(org.apache.maven.surefire.test.FailingTest)  Time elapsed: 0.001 sec  <<< FAILURE!
+java.lang.AssertionError: 
+Expected: "bar"
+     got: "foo"
+
+	at org.junit.Assert.assertThat(Assert.java:778)
+	at org.junit.Assert.assertThat(Assert.java:736)
+	at org.apache.maven.surefire.test.FailingTest.setTestAndRetrieveValue(FailingTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
+	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
+	at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)
+	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
+	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:262)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:151)
+	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:122)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:601)
+	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
+	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
+	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
+	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:128)
+	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:88)
+

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/d39c290e/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.SucceedingTest.txt
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.SucceedingTest.txt b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.SucceedingTest.txt
new file mode 100644
index 0000000..9433827
--- /dev/null
+++ b/surefire-integration-tests/src/test/resources/fixture/testsuitexmlparser/org.apache.maven.surefire.test.SucceedingTest.txt
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: org.apache.maven.surefire.test.SucceedingTest
+-------------------------------------------------------------------------------
+Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.044 sec