diff --git a/src/vstest.console/Internal/ConsoleLogger.cs b/src/vstest.console/Internal/ConsoleLogger.cs
index 9a2c8367d0..e046e46ecc 100644
--- a/src/vstest.console/Internal/ConsoleLogger.cs
+++ b/src/vstest.console/Internal/ConsoleLogger.cs
@@ -4,6 +4,7 @@
namespace Microsoft.VisualStudio.TestPlatform.CommandLine.Internal
{
using System;
+ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
@@ -85,6 +86,16 @@ internal class ConsoleLogger : ITestLoggerWithParameters
///
public const string NoProgressParam = "noprogress";
+ ///
+ /// Property Id storing the ParentExecutionId.
+ ///
+ public const string ParentExecutionIdPropertyIdentifier = "ParentExecId";
+
+ ///
+ /// Property Id storing the ExecutionId.
+ ///
+ public const string ExecutionIdPropertyIdentifier = "ExecutionId";
+
#endregion
internal enum Verbosity
@@ -107,11 +118,8 @@ internal enum Verbosity
private Verbosity verbosityLevel = Verbosity.Minimal;
#endif
- private int testsTotal = 0;
- private int testsPassed = 0;
- private int testsFailed = 0;
- private int testsSkipped = 0;
private bool testRunHasErrorMessages = false;
+ private ConcurrentDictionary leafExecutionIdAndTestOutcomePairDictionary = new ConcurrentDictionary();
#endregion
@@ -371,6 +379,39 @@ private static void DisplayFullInformation(TestResult result)
}
}
+ ///
+ /// Returns the parent Execution id of given test result.
+ ///
+ ///
+ ///
+ private Guid GetParentExecutionId(TestResult testResult)
+ {
+ var parentExecutionIdProperty = testResult.Properties.FirstOrDefault(property =>
+ property.Id.Equals(ParentExecutionIdPropertyIdentifier));
+ return parentExecutionIdProperty == null
+ ? Guid.Empty
+ : testResult.GetPropertyValue(parentExecutionIdProperty, Guid.Empty);
+ }
+
+ ///
+ /// Returns execution id of given test result
+ ///
+ ///
+ ///
+ private Guid GetExecutionId(TestResult testResult)
+ {
+ var executionIdProperty = testResult.Properties.FirstOrDefault(property =>
+ property.Id.Equals(ExecutionIdPropertyIdentifier));
+ var executionId = Guid.Empty;
+
+ if (executionIdProperty != null)
+ {
+ executionId = testResult.GetPropertyValue(executionIdProperty, Guid.Empty);
+ }
+
+ return executionId.Equals(Guid.Empty) ? Guid.NewGuid() : executionId;
+ }
+
#endregion
#region Event Handlers
@@ -468,9 +509,6 @@ private void TestResultHandler(object sender, TestResultEventArgs e)
ValidateArg.NotNull