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 RunnerCallback(IntegrationTestsRunnerWindow window) { m_Window = window; m_RunInBackground = PlayerSettings.runInBackground; PlayerSettings.runInBackground = true; }
public static void DoAnnotationGUI(int id, Rect rect) { var obj = EditorUtility.InstanceIDToObject(id) as GameObject; if (!obj) { return; } var tc = obj.GetComponent <TestComponent>(); if (!tc) { return; } if (!EditorApplication.isPlayingOrWillChangePlaymode && rect.Contains(Event.current.mousePosition) && Event.current.type == EventType.MouseDown && Event.current.button == 1) { IntegrationTestRendererBase.DrawContextMenu(tc); Event.current.Use(); } EditorGUIUtility.SetIconSize(new Vector2(15, 15)); var result = IntegrationTestsRunnerWindow.GetResultForTest(tc); if (result != null) { var icon = result.Executed ? IntegrationTestRendererBase.GetIconForResult(result.resultType) : Icons.UnknownImg; EditorGUI.LabelField(new Rect(rect.xMax - 18, rect.yMin - 2, rect.width, rect.height), new GUIContent(icon)); } EditorGUIUtility.SetIconSize(Vector2.zero); }
public RunnerCallback(IntegrationTestsRunnerWindow window) { m_Window = window; m_ConsoleErrorOnPauseValue = GuiHelper.GetConsoleErrorPause(); GuiHelper.SetConsoleErrorPause(false); m_RunInBackground = PlayerSettings.runInBackground; PlayerSettings.runInBackground = true; }
public void RunFinished(List <TestResult> testResults) { integrationTestRunnerWindow.isRunning = false; integrationTestRunnerWindow.renderer.OnTestRunFinished(); integrationTestRunnerWindow.Repaint(); EditorApplication.isPlaying = false; if (integrationTestRunnerWindow.renderer.blockUIWhenRunning) { EditorUtility.ClearProgressBar(); } IntegrationTestsRunnerWindow.SetConsoleErrorPause(integrationTestRunnerWindow.consoleErrorOnPauseValue); }
public void OnEnable() { title = "Integration Tests Runner"; Instance = this; settings = ProjectSettingsBase.Load <IntegrationTestsRunnerSettings> (); InitBackgroundRunners(); if (!EditorApplication.isPlayingOrWillChangePlaymode && !readyToRun) { RebuildTestList(); } }
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; }
public void OnEnable() { titleContent = new GUIContent("Integration Tests"); s_Instance = this; m_Settings = ProjectSettingsBase.Load <IntegrationTestsRunnerSettings>(); m_FilterSettings = new TestFilterSettings("UnityTest.IntegrationTestsRunnerWindow"); InitBackgroundRunners(); if (!EditorApplication.isPlayingOrWillChangePlaymode && !m_ReadyToRun) { RebuildTestList(); } }
public void OnEnable() { title = "Integration Tests Runner"; Instance = this; if (EditorPrefs.HasKey("ITR-addNewGameObjectUnderSelectedTest")) { addNewGameObjectUnderSelectedTest = EditorPrefs.GetBool("ITR-addNewGameObjectUnderSelectedTest"); blockUIWhenRunning = EditorPrefs.GetBool("ITR-blockUIWhenRunning"); showSucceededTest = EditorPrefs.GetBool("ITR-showSucceededTest"); showFailedTest = EditorPrefs.GetBool("ITR-showFailedTest"); showIgnoredTest = EditorPrefs.GetBool("ITR-showIgnoredTest"); showNotRunnedTest = EditorPrefs.GetBool("ITR-showNotRunnedTest"); } InitBackgroundRunners(); if (!EditorApplication.isPlayingOrWillChangePlaymode && !readyToRun) { RebuildTestList(); } }
public void OnEnable() { titleContent = new GUIContent("Integration Tests"); s_Instance = this; m_Settings = ProjectSettingsBase.Load<IntegrationTestsRunnerSettings>(); m_FilterSettings = new TestFilterSettings("UnityTest.IntegrationTestsRunnerWindow"); InitBackgroundRunners(); if (!EditorApplication.isPlayingOrWillChangePlaymode && !m_ReadyToRun) RebuildTestList(); }
public RunnerCallback(IntegrationTestsRunnerWindow window) { m_Window = window; m_ConsoleErrorOnPauseValue = GuiHelper.GetConsoleErrorPause(); GuiHelper.SetConsoleErrorPause(false); m_RunInBackground = PlayerSettings.runInBackground; PlayerSettings.runInBackground = true; }
public void OnEnable () { title = "Integration Tests Runner"; Instance = this; settings = ProjectSettingsBase.Load<IntegrationTestsRunnerSettings> (); InitBackgroundRunners (); if (!EditorApplication.isPlayingOrWillChangePlaymode && !readyToRun) RebuildTestList (); }
public RunnerCallback(IntegrationTestsRunnerWindow integrationTestRunnerWindow) { this.integrationTestRunnerWindow = integrationTestRunnerWindow; }
public void OnEnable() { title = "Integration Tests Runner"; Instance = this; if (EditorPrefs.HasKey ("ITR-addNewGameObjectUnderSelectedTest")) { addNewGameObjectUnderSelectedTest = EditorPrefs.GetBool ("ITR-addNewGameObjectUnderSelectedTest"); blockUIWhenRunning = EditorPrefs.GetBool ("ITR-blockUIWhenRunning"); showSucceededTest = EditorPrefs.GetBool ("ITR-showSucceededTest"); showFailedTest = EditorPrefs.GetBool ("ITR-showFailedTest"); showIgnoredTest = EditorPrefs.GetBool ("ITR-showIgnoredTest"); showNotRunnedTest = EditorPrefs.GetBool ("ITR-showNotRunnedTest"); } InitBackgroundRunners (); if (!EditorApplication.isPlayingOrWillChangePlaymode && !readyToRun) RebuildTestList (); }
public RunnerCallback(IntegrationTestsRunnerWindow integrationTestRunnerWindow) { this.integrationTestRunnerWindow = integrationTestRunnerWindow; }