Esempio n. 1
0
 public TestExecutionService(
     TestRunManager microsoftTestTestRunProvider,
     MsTestProcessManager processExecutionProvider,
     ConsoleArgumentsManager consoleArgumentsProvider)
 {
     this.testRunProvider          = microsoftTestTestRunProvider;
     this.testProcessManager       = processExecutionProvider;
     this.consoleArgumentsProvider = consoleArgumentsProvider;
 }
Esempio n. 2
0
        /// <summary>
        /// Generate MsTest arguments for repeat test run
        /// </summary>
        /// <param name="repeatTestNames">Names of tests to execute</param>
        /// <param name="resultsTrxPath">Where to save the trx file</param>
        /// <returns>MsTest arguments for performing the repeat test run</returns>
        private string GenerateArgumentsForRepeatTestRun(List <string> repeatTestNames, string newTestResultsFilePath, ConsoleArgumentsManager consoleArgumentsProvider)
        {
            StringBuilder argBuilder = new StringBuilder(consoleArgumentsProvider.BaseConsoleArguments);

            foreach (var testName in repeatTestNames)
            {
                argBuilder.AppendFormat("/test:{0} ", testName);
            }

            argBuilder.Replace(consoleArgumentsProvider.TestResultPath, newTestResultsFilePath);

            return(argBuilder.ToString().TrimEnd());
        }
Esempio n. 3
0
 /// <summary>
 /// Execute an test run of the specified tests
 /// </summary>
 /// <param name="repeatTestNames">The tests to execute</param>
 /// <param name="resultsTrxPath">Path to save the .trx results file</param>
 /// <param name="consoleArgumentsProvider"></param>
 public void ExecuteIterativeRun(List <string> repeatTestNames, string resultsTrxPath, ConsoleArgumentsManager consoleArgumentsProvider)
 {
     ExecuteWithArguments(GenerateArgumentsForRepeatTestRun(repeatTestNames, resultsTrxPath, consoleArgumentsProvider));
 }
Esempio n. 4
0
 public void ExecuteInitialRun(ConsoleArgumentsManager consoleArgumentProvider)
 {
     ExecuteWithArguments(consoleArgumentProvider.InitialConsoleArguments);
 }