Example #1
0
 public VSTestExecutionDriver(VisualStudioFinder visualStudioFinder, AppConfigDriver appConfigDriver, TestProjectFolders testProjectFolders, IOutputWriter outputWriter, TestRunConfiguration testRunConfiguration)
 {
     _visualStudioFinder   = visualStudioFinder;
     _appConfigDriver      = appConfigDriver;
     _testProjectFolders   = testProjectFolders;
     _outputWriter         = outputWriter;
     _testRunConfiguration = testRunConfiguration;
     _uriCleaner           = new UriCleaner();
 }
Example #2
0
 public TRXParser(TestRunConfiguration testRunConfiguration)
 {
     _testRunConfiguration            = testRunConfiguration;
     _unitTestResultElementName       = _xmlns + "UnitTestResult";
     _unitTestResultOutputElementName = _xmlns + "Output";
     _unitTestResultStdOutElementName = _xmlns + "StdOut";
     _testRunElementName = _xmlns + "TestRun";
     _resultsElementName = _xmlns + "Results";
 }
Example #3
0
 public VSTestExecutionDriver(
     TestProjectFolders testProjectFolders,
     IOutputWriter outputWriter,
     TestRunConfiguration testRunConfiguration,
     TRXParser trxParser,
     TestSuiteEnvironmentVariableGenerator testSuiteEnvironmentVariableGenerator)
 {
     _testProjectFolders   = testProjectFolders;
     _outputWriter         = outputWriter;
     _testRunConfiguration = testRunConfiguration;
     _uriCleaner           = new UriCleaner();
     _trxParser            = trxParser;
     _testSuiteEnvironmentVariableGenerator = testSuiteEnvironmentVariableGenerator;
 }
Example #4
0
        private TestExecutionResult CalculateUnitTestProviderSpecificTestExecutionResult(TestExecutionResult testExecutionResult, TestRunConfiguration testRunConfiguration)
        {
            switch (testRunConfiguration.UnitTestProvider)
            {
            case UnitTestProvider.xUnit: return(CalculateXUnitTestExecutionResult(testExecutionResult));

            case UnitTestProvider.MSTest: return(CalculateMsTestTestExecutionResult(testExecutionResult));

            case UnitTestProvider.NUnit3: return(CalculateNUnitTestExecutionResult(testExecutionResult));

            case UnitTestProvider.SpecRun: return(CalculateSpecRunTestExecutionResult(testExecutionResult));

            default: throw new NotSupportedException($"The specified unit test provider is not supported: {testRunConfiguration.UnitTestProvider}");
            }
        }
Example #5
0
        private TestExecutionResult CalculateTestExecutionResultFromTrx(XDocument trx, TestRunConfiguration testRunConfiguration, string output, IEnumerable <string> reportFiles, string logFileContent)
        {
            var testExecutionResult = GetCommonTestExecutionResult(trx, output, reportFiles, logFileContent);

            return(CalculateUnitTestProviderSpecificTestExecutionResult(testExecutionResult, testRunConfiguration));
        }