/// <summary> /// Execute the tests in the assembly, passing in /// a list of arguments. /// </summary> /// <param name="args">arguments for NUnitLite to use</param> public void Execute() { #if TIZEN #region tronghieu.d - Create new thread to run test and mainthread waiting for invoke test method. TAsyncThreadMgr asyncThreadMgr = TAsyncThreadMgr.GetInstance(); ManualResetEvent methodExecutionResetEvent = asyncThreadMgr.GetMethodExecutionResetEvent(); methodExecutionResetEvent.Reset(); Task t = Task.Run(() => { _textRunner.Execute(args); asyncThreadMgr.SetData(null, null, null, null, false); methodExecutionResetEvent.Set(); }); t.GetAwaiter().OnCompleted(() => { OnSingleTestDone(TSettings.GetInstance().GetSingleTestDoneEventArgs()); }); methodExecutionResetEvent.WaitOne(); asyncThreadMgr.RunTestMethod(); #endregion #else new TextRunner(_testAssembly).Execute(args); #endif }
private void RunTests() { while (testAssemblyQueue.Count > 0) { Assembly testAssembly = testAssemblyQueue.Dequeue(); Log.Info($"Running tests for assembly {testAssembly.FullName}"); TextRunner testRunner = new TextRunner(testAssembly); testRunner.Execute(GetRunnerArguments(testAssembly)); } Shutdown(); }
private void ExecuteTests() { _textRunner.Execute(_callingAssembly); ResultSummary summary = _textRunner.Summary; this.Total.Text = summary.TestCount.ToString(); this.Failures.Text = summary.FailureCount.ToString(); this.Errors.Text = summary.ErrorCount.ToString(); var notRunTotal = summary.SkipCount + summary.InvalidCount + summary.IgnoreCount; this.NotRun.Text = notRunTotal.ToString(); this.Passed.Text = summary.PassCount.ToString(); this.Inconclusive.Text = summary.InconclusiveCount.ToString(); this.Notice.Visibility = Visibility.Collapsed; }
private void ExecuteTests() { // Clear original display so info won't appear twice this.ScratchArea.Inlines.Clear(); _textRunner.Execute(_textUI, new NUnitLiteOptions()); ResultSummary summary = _textRunner.Summary; this.Total.Text = summary.TestCount.ToString(); this.Failures.Text = summary.FailureCount.ToString(); this.Errors.Text = summary.ErrorCount.ToString(); var notRunTotal = summary.SkipCount + summary.InvalidCount + summary.IgnoreCount; this.NotRun.Text = notRunTotal.ToString(); this.Passed.Text = summary.PassCount.ToString(); this.Inconclusive.Text = summary.InconclusiveCount.ToString(); this.Notice.Visibility = Visibility.Collapsed; }
static int Main(string[] args) { AllUpTest.DirectoryOffset = Path.Combine("..", "..", "..", "..", "..", "doc", "handbook"); // if we enter Main, it seems we are executing the tutorial tests locally... // so delete any local tex files since we want to run the scripts from dolc/handbook var localTexFiles = (new DirectoryInfo(Directory.GetCurrentDirectory())).GetFiles("*.tex"); foreach (var f in localTexFiles) { f.Delete(); } BoSSS.Solution.Application.InitMPI(new string[0]); //var losScriptos = GetListOfScripts(); //int r = 0; //AllUpTest.RunWorksheet(losScriptos[int.Parse(args[0])]); //foreach(var s in losScriptos) { // AllUpTest.RunWorksheet(s); // break; //} var tr = new TextRunner(typeof(TutorialTestsMain).Assembly); int r = tr.Execute(new[] { "--result=result-TutorialTests.xml" //, "--test=BoSSS.Application.TutorialTests.AllUpTest.Run__CsharpAndBoSSSpad" }); csMPI.Raw.mpiFinalize(); return(r); }
/// <summary> /// Starts execution of test collection from calling assembly. /// </summary> /// <param name="args"> /// See argument options from https://github.com/nunit/docs/wiki/NUnitLite-Options /// </param> public void Start(string[] args) { var textRunner = new TextRunner(callingAssembly); int resultInt = textRunner.Execute(args); }