Пример #1
0
        private void RunTests(IList <ITestComponent> tests)
        {
            if (!tests.Any() || EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode)
            {
                return;
            }
            FocusWindowIfItsOpen(GetType());

            var testComponents = tests.Where(t => t is TestComponent).Cast <TestComponent>().ToList();
            var dynaminTests   = testComponents.Where(t => t.dynamic).ToList();

            m_DynamicTestsToRun = dynaminTests.Select(c => c.dynamicTypeName).ToList();
            testComponents.RemoveAll(dynaminTests.Contains);

            m_TestsToRun = testComponents.Select(tc => tc.gameObject).ToList();

            m_ReadyToRun = true;
            TestComponent.DisableAllTests();
            EditorApplication.isPlaying = true;

            if (m_Settings.blockUIWhenRunning)
            {
                EditorUtility.DisplayProgressBar("Integration Test Runner", "Initializing", 0);
            }
        }
Пример #2
0
 public void Awake()
 {
     this.m_Configurator = new TestRunnerConfigurator();
     if (!this.isInitializedByRunner)
     {
         TestComponent.DisableAllTests();
     }
 }
Пример #3
0
 public void Awake()
 {
     m_Configurator = new TestRunnerConfigurator();
     if (isInitializedByRunner)
     {
         return;
     }
     TestComponent.DisableAllTests();
 }
Пример #4
0
        public void Awake()
        {
#if UNITY_EDITOR && !IMITATE_BATCH_MODE
            if (!UnityEditorInternal.InternalEditorUtility.inBatchMode)
            {
                return;
            }
#endif
            TestComponent.DisableAllTests();
        }
        private void RunTests(IList <ITestComponent> tests)
        {
            if (!tests.Any() || EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode)
            {
                return;
            }
            FocusWindowIfItsOpen(GetType());

            var testComponents = tests.Where(t => t is TestComponent).Cast <TestComponent>().ToList();
            var dynaminTests   = testComponents.Where(t => t.dynamic).ToList();

            m_DynamicTestsToRun = dynaminTests.Select(c => c.dynamicTypeName).ToList();
            testComponents.RemoveAll(dynaminTests.Contains);

            m_TestsToRun = testComponents.Select(tc => tc.gameObject).ToList();

            m_ReadyToRun = true;
            TestComponent.DisableAllTests();

            EditorApplication.isPlaying = true;
        }