public void RunNUnitConsole() { var ctx = ScenarioContext.Current.GetTestContext(); var configuration = ctx.GetOrCreateNUnitConfiguration(); var runner = new NUnitRunner(); ICommandLineSetupFactory setupFactory; switch (configuration.ConfigurationType) { case ConfigurationType.CmdArguments: setupFactory = new ArgumentsCommandLineSetupFactory(); break; case ConfigurationType.ProjectFile: setupFactory = new ProjectCommandLineSetupFactory(); break; default: throw new ArgumentOutOfRangeException(); } var testSession = runner.Run(ctx, setupFactory.Create(ctx)); ctx.TestSession = testSession; }
private void NUnit2Test(List <FilePath> assemblies, FilePath outputFile, string excludeFilter) { var settings = new NUnitSettings { NoLogo = true, NoResults = IsInteractiveBuild, ResultsFile = outputFile, Exclude = excludeFilter }; var runner = new NUnitRunner(_fileSystem, _environment, _processRunner, _tools); runner.Run(assemblies, settings); }
protected override void RunTool() { var tool = new NUnitRunner(FileSystem, Environment, ProcessRunner, Tools); tool.Run(Assemblies, Settings); }