public void RunTests(IEnumerable <string> sources, IRunContext runContext, IFrameworkHandle testExecutionRecorder) { launcher = new TestLauncher(); foreach (var source in sources) { launcher.AddFilePattern(source); } RunTests(runContext, testExecutionRecorder); }
public void RunTests(IEnumerable <string> sources, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder) { _launcher = new TestLauncher(); foreach (string source in sources) { _launcher.AddFilePattern(source); } RunTests(testExecutionRecorder); }
public void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrameworkHandle testExecutionRecorder) { launcher = new TestLauncher(); foreach (var source in sources) { launcher.AddFilePattern(source); } RunTests(runContext, testExecutionRecorder); }
public static void Main() { using (TextWriter tw = new StreamWriter("RunTests.log")) { var logger = new TextLogger(tw); RuntimeBootstrap.Initialize(new RuntimeSetup(), logger); TestLauncher launcher = new TestLauncher(); launcher.AddFilePattern("RunTests.exe"); TestLauncherResult result = launcher.Run(); Console.WriteLine(result.ResultSummary); } }
public void RunTests(IEnumerable <TestCase> tests, IRunContext runContext, IFrameworkHandle testExecutionRecorder) { launcher = new TestLauncher(); foreach (var test in tests) { launcher.AddFilePattern(test.Source); } SetTestFilter(tests); RunTests(runContext, testExecutionRecorder); }
private void AddAssemblies(TestLauncher launcher) { if (Files != null) { foreach (FileSet fs in Files) { foreach (string f in fs.FileNames) { launcher.AddFilePattern(f); } } } }
public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle testExecutionRecorder) { launcher = new TestLauncher(); foreach (var test in tests) { launcher.AddFilePattern(test.Source); } SetTestFilter(tests); RunTests(runContext, testExecutionRecorder); }
//not picking up public void RunTests(IEnumerable <TestCase> tests, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder) { _launcher = new TestLauncher(); _launcher.RuntimeSetup = new RuntimeSetup(); //_launcher.TestProject. foreach (var test in tests) { _launcher.AddFilePattern(test.Source); _launcher.TestExecutionOptions.FilterSet = FilterUtils.ParseTestFilterSet("ExactType:" + test.DisplayName); } RunTests(testExecutionRecorder); }
public static int Main() { NativeConsole console = NativeConsole.Instance; var launcher = new TestLauncher { EchoResults = true, Logger = new FilteredLogger(new RichConsoleLogger(console), Verbosity.Normal), ProgressMonitorProvider = new RichConsoleProgressMonitorProvider(console), RuntimeSetup = new RuntimeSetup(), TestProject = { TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local } }; string gallioBin = Environment.GetEnvironmentVariable(GallioBinEnvironmentVariable) ?? InstallationConfiguration.LoadFromRegistry().InstallationFolder; if(string.IsNullOrEmpty(gallioBin)) { Console.Error.WriteLine("Cannot find Gallio installation directory."); Console.Error.WriteLine("Specify it with \"{0}\" environment variable.", GallioBinEnvironmentVariable); return 1; } launcher.AddFilePattern(typeof(Driver).Assembly.Location); launcher.RuntimeSetup.AddPluginDirectory(gallioBin); TestLauncherResult result = launcher.Run(); ConsoleColor originalConsoleColor = console.ForegroundColor; console.ForegroundColor = result.ResultCode == ResultCode.Success ? ConsoleColor.DarkGreen : ConsoleColor.Red; console.WriteLine(); console.WriteLine(result.ResultSummary); console.WriteLine(); console.ForegroundColor = originalConsoleColor; if (result.ResultCode != ResultCode.Success && Debugger.IsAttached) { Debugger.Break(); } return result.ResultCode; }
public static int Main() { NativeConsole console = NativeConsole.Instance; var launcher = new TestLauncher { EchoResults = true, Logger = new FilteredLogger(new RichConsoleLogger(console), Verbosity.Normal), ProgressMonitorProvider = new RichConsoleProgressMonitorProvider(console), RuntimeSetup = new RuntimeSetup(), TestProject = { TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local } }; string gallioBin = Environment.GetEnvironmentVariable(GallioBinEnvironmentVariable) ?? InstallationConfiguration.LoadFromRegistry().InstallationFolder; if (string.IsNullOrEmpty(gallioBin)) { Console.Error.WriteLine("Cannot find Gallio installation directory."); Console.Error.WriteLine("Specify it with \"{0}\" environment variable.", GallioBinEnvironmentVariable); return(1); } launcher.AddFilePattern(typeof(Driver).Assembly.Location); launcher.RuntimeSetup.AddPluginDirectory(gallioBin); TestLauncherResult result = launcher.Run(); ConsoleColor originalConsoleColor = console.ForegroundColor; console.ForegroundColor = result.ResultCode == ResultCode.Success ? ConsoleColor.DarkGreen : ConsoleColor.Red; console.WriteLine(); console.WriteLine(result.ResultSummary); console.WriteLine(); console.ForegroundColor = originalConsoleColor; if (result.ResultCode != ResultCode.Success && Debugger.IsAttached) { Debugger.Break(); } return(result.ResultCode); }
private void AddAssemblies(TestLauncher launcher) { if (Files != null) { foreach (FileSet fs in Files) { foreach (string f in fs.FileNames) { launcher.AddFilePattern(f); } } } }