public static void RunAsync (string[] args) { Paths.SetStandardWorkingDirectory (); File.WriteAllText ("status.txt", "running"); var runOptions = RunOptions.Parse (args); if (runOptions.ShouldShowHelp) { runOptions.ShowHelp (); return; } CoreExtensions.Host.InitializeService (); var assembly = Assembly.GetExecutingAssembly (); var runner = new ThreadedTestRunner(new SimpleTestRunner()); TestPackage package = new TestPackage (assembly.GetName ().Name); package.Assemblies.Add (assembly.Location); if (!runner.Load (package)) { Console.WriteLine ("Could not find the tests."); return; } var listener = new MobileListener (runOptions); var filter = new AggregateTestFilter (runOptions.Filters); runner.BeginRun (listener, filter, false, LoggingThreshold.Warn); }
public virtual void BeginRun(EventListener listener, ITestFilter filter) { // Save active listener for derived classes this.listener = listener; Log.Info("BeginRun"); // ThreadedTestRunner will call our Run method on a separate thread ThreadedTestRunner threadedRunner = new ThreadedTestRunner(this); threadedRunner.BeginRun(listener, filter); }
public virtual void BeginRun( EventListener listener, ITestFilter filter ) { // Save active listener for derived classes this.listener = listener; #if RUN_IN_PARALLEL this.listener.RunStarted( this.Test.Name, this.CountTestCases( filter ) ); foreach( TestRunner runner in runners ) if ( runner.Test != null ) runner.BeginRun( this, filter ); //this.listener.RunFinished( this.Results ); #else ThreadedTestRunner threadedRunner = new ThreadedTestRunner( this ); threadedRunner.BeginRun( listener, filter ); #endif }