in GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs [115:154]
private void RunTestsFromExecutable(string executable, string workingDir, IDictionary<string, string> envVars,
IEnumerable<TestCase> testCasesToRun, string userParameters,
bool isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, IProcessExecutor executor)
{
string resultXmlFile = Path.GetTempFileName();
var serializer = new TestDurationSerializer();
var generator = new CommandLineGenerator(testCasesToRun, executable.Length, userParameters, resultXmlFile, _settings);
foreach (CommandLineGenerator.Args arguments in generator.GetCommandLines())
{
if (_canceled)
{
break;
}
var streamingParser = new StreamingStandardOutputTestResultParser(arguments.TestCases, _logger, _frameworkReporter);
var results = RunTests(executable, workingDir, envVars, isBeingDebugged, debuggedLauncher, arguments, resultXmlFile, executor, streamingParser).ToArray();
try
{
Stopwatch stopwatch = Stopwatch.StartNew();
_frameworkReporter.ReportTestsStarted(results.Select(tr => tr.TestCase));
_frameworkReporter.ReportTestResults(results);
stopwatch.Stop();
if (results.Length > 0)
_logger.DebugInfo(String.Format(Resources.ReportedTestResults, _threadName, results.Length, executable, stopwatch.Elapsed));
}
catch (TestRunCanceledException e)
{
_logger.DebugInfo(String.Format(Resources.ExecutionCancelled, _threadName, e.InnerException?.Message ?? e.Message));
Cancel();
}
serializer.UpdateTestDurations(results);
foreach (TestResult result in results)
{
if (!_schedulingAnalyzer.AddActualDuration(result.TestCase, (int)result.Duration.TotalMilliseconds))
_logger.DebugWarning(String.Format(Resources.TestCaseInAnalyzer, result.TestCase.FullyQualifiedName));
}
}
}