public void Update() { if (readyToRun && EditorApplication.isPlaying) { readyToRun = false; var testRunner = TestRunner.GetTestRunner(); testRunner.TestRunnerCallback.Add(new RunnerCallback(this)); testRunner.InitRunner(testsToRun.Cast <ITestComponent> ().ToList()); consoleErrorOnPauseValue = IntegrationTestsRunnerWindow.GetConsoleErrorPause(); IntegrationTestsRunnerWindow.SetConsoleErrorPause(false); isRunning = true; if (renderer.blockUIWhenRunning) { EditorUtility.DisplayProgressBar("Integration Test Runner", "Initializing", 0); } } if (EditorApplication.isCompiling) { isCompiling = true; } else if (isCompiling) { isCompiling = false; renderer.InvalidateTestList(); EditorApplication.RepaintHierarchyWindow(); } }
public void RunFinished(List <TestResult> testResults) { integrationTestRunnerWindow.isRunning = false; integrationTestRunnerWindow.renderer.OnTestRunFinished(); integrationTestRunnerWindow.Repaint(); EditorApplication.isPlaying = false; if (integrationTestRunnerWindow.renderer.blockUIWhenRunning) { EditorUtility.ClearProgressBar(); } integrationTestRunnerWindow.SetConsoleErrorPause(integrationTestRunnerWindow.consoleErrorOnPauseValue); }
private static void RunInEditor(List <string> sceneList) { if (sceneList == null || sceneList.Count == 0) { Debug.Log("No scenes on the list"); EditorApplication.Exit(0); return; } EditorBuildSettings.scenes = sceneList.Select(s => new EditorBuildSettingsScene(s, true)).ToArray(); EditorApplication.OpenScene(sceneList.First()); IntegrationTestsRunnerWindow.SetConsoleErrorPause(false); EditorApplication.isPlaying = true; }