private void doTestRun(TestNode node) { if (!data.DontRerun) { clearNodeStatusRecursive(node); } data.RunningTestsNodePath = node.GetPath(); data.LastTestRunPath = null; data.Rootnode = rootNode; data.Save(getSaveFilePath()); resumeTestRun(); }
private void runTestsInNode(TestNode node, ref bool resuming) { if (data.DontRerun) { resuming = false; } if (data.LastTestRunPath == null) { resuming = false; } if (node == null) { return; } if (node.IsTestMethod) { if (data.DontRerun && node.State != TestState.None) { return; } if (resuming) { if (node.GetPath() == data.LastTestRunPath) { resuming = false; } return; } //TODO: mainForm.treeView.SelectedNode = node.TreeNode; SetScopedVariablesRunning(); data.LastTestRunPath = node.GetPath(); //Console.WriteLine("Running Test: " + node.TestMethod.DeclaringType.FullName + "." + node.TestMethod.Name); node.State = TestState.Failed; TestRunner.Run(node.Test); //var testResult = runTestMethod(node.TestMethod); ClearScopedVariables(); node.State = TestState.Success; //if (!testResult.Success) //if (testResult.ErrorType == typeof(NotImplementedException).FullName) //node.State = TestState.NotImplemented; //else //node.State = TestState.Failed; updateNodeInTreeView(node); } for (int i = 0; i < node.Children.Count; i++) { var c = node.Children[i]; runTestsInNode(c, ref resuming); } }