Esempio n. 1
0
        private static void RunInEditor(List <string> sceneList)
        {
            CheckActiveBuildTarget();

            NetworkResultsReceiver.StopReceiver();
            if (sceneList == null || sceneList.Count == 0)
            {
                Debug.Log("No scenes on the list");
                EditorApplication.Exit(returnCodeRunError);
                return;
            }
            EditorBuildSettings.scenes = sceneList.Select(s => new EditorBuildSettingsScene(s, true)).ToArray();
            EditorApplication.OpenScene(sceneList.First());
            GuiHelper.SetConsoleErrorPause(false);

            var config = new PlatformRunnerConfiguration
            {
                resultsDir  = GetParameterArgument(k_ResultFileDirParam),
                ipList      = TestRunnerConfigurator.GetAvailableNetworkIPs(),
                port        = PlatformRunnerConfiguration.TryToGetFreePort(),
                runInEditor = true,
            };

            var settings = new PlayerSettingConfigurator(true);

            settings.AddConfigurationFile(TestRunnerConfigurator.integrationTestsNetwork, string.Join("\n", config.GetConnectionIPs()));

            NetworkResultsReceiver.StartReceiver(config);

            EditorApplication.isPlaying = true;
        }
 public void OnDisable()
 {
     Instance = null;
     if (m_Listener != null)
     {
         m_Listener.Stop();
     }
 }
 public void OnEnable()
 {
     minSize = new Vector2(300, 100);
     titleContent = new GUIContent("Test run monitor");
     Instance = this;
     m_StatusLabel = "Initializing...";
     if (EditorApplication.isCompiling) return;
     EnableServer();
 }
 public void OnEnable()
 {
     minSize = new Vector2(300, 100);
     position = new Rect(position.xMin, position.yMin, 300, 100);
     title = "Test run monitor";
     Instance = this;
     m_StatusLabel = "Initializing...";
     if (EditorApplication.isCompiling) return;
     EnableServer();
 }
 public void OnEnable()
 {
     minSize       = new Vector2(300, 100);
     titleContent  = new GUIContent("Test run monitor");
     Instance      = this;
     m_StatusLabel = "Initializing...";
     if (EditorApplication.isCompiling)
     {
         return;
     }
     EnableServer();
 }
        public void OnEnable()
        {
            minSize = new Vector2(300, 100);

            //Unity 5.0.0 quirk throws an exception on setting the postion when in batch mode
            if( !UnityEditorInternal.InternalEditorUtility.inBatchMode )
                position = new Rect(position.xMin, position.yMin, 300, 100);
            title = "Test run monitor";
            Instance = this;
            m_StatusLabel = "Initializing...";
            if (EditorApplication.isCompiling) return;
            EnableServer();
        }
 public void OnEnable()
 {
     minSize       = new Vector2(300, 100);
     position      = new Rect(position.xMin, position.yMin, 300, 100);
     title         = "Test run monitor";
     Instance      = this;
     m_StatusLabel = "Initializing...";
     if (EditorApplication.isCompiling)
     {
         return;
     }
     EnableServer();
 }
        public void OnEnable()
        {
            minSize = new Vector2(300, 100);
#if UNITY_5_3_OR_NEWER
            titleContent = new GUIContent("Test run monitor");
#else
            title = "Test run monitor";
#endif
            Instance      = this;
            m_StatusLabel = "Initializing...";
            if (EditorApplication.isCompiling)
            {
                return;
            }
            EnableServer();
        }
Esempio n. 9
0
        private static void RunInEditor(List <string> testScenes, List <string> otherBuildScenes)
        {
            CheckActiveBuildTarget();

            NetworkResultsReceiver.StopReceiver();
            if (testScenes == null || testScenes.Count == 0)
            {
                Debug.Log("No test scenes on the list");
                EditorApplication.Exit(returnCodeRunError);
                return;
            }

            string previousScenesXml = "";
            var    serializer        = new System.Xml.Serialization.XmlSerializer(typeof(EditorBuildSettingsScene[]));

            using (StringWriter textWriter = new StringWriter())
            {
                serializer.Serialize(textWriter, EditorBuildSettings.scenes);
                previousScenesXml = textWriter.ToString();
            }

            EditorBuildSettings.scenes = (testScenes.Concat(otherBuildScenes).ToList()).Select(s => new EditorBuildSettingsScene(s, true)).ToArray();

#if UNITY_5_3_OR_NEWER
            EditorSceneManager.OpenScene(testScenes.First());
#else
            EditorApplication.LoadLevelInPlayMode(testScenes.First());
#endif
            GuiHelper.SetConsoleErrorPause(false);

            var config = new PlatformRunnerConfiguration
            {
                resultsDir  = GetParameterArgument(k_ResultFileDirParam),
                ipList      = TestRunnerConfigurator.GetAvailableNetworkIPs(),
                port        = PlatformRunnerConfiguration.TryToGetFreePort(),
                runInEditor = true
            };

            var settings = new PlayerSettingConfigurator(true);
            settings.AddConfigurationFile(TestRunnerConfigurator.integrationTestsNetwork, string.Join("\n", config.GetConnectionIPs()));
            settings.AddConfigurationFile(TestRunnerConfigurator.testScenesToRun, string.Join("\n", testScenes.ToArray()));
            settings.AddConfigurationFile(TestRunnerConfigurator.previousScenes, previousScenesXml);

            NetworkResultsReceiver.StartReceiver(config);

            EditorApplication.isPlaying = true;
        }
        public void OnEnable()
        {
            minSize = new Vector2(300, 100);

            //Unity 5.0.0 quirk throws an exception on setting the postion when in batch mode
            if (!UnityEditorInternal.InternalEditorUtility.inBatchMode)
            {
                position = new Rect(position.xMin, position.yMin, 300, 100);
            }
            title         = "Test run monitor";
            Instance      = this;
            m_StatusLabel = "Initializing...";
            if (EditorApplication.isCompiling)
            {
                return;
            }
            EnableServer();
        }
 public void OnDisable()
 {
     Instance = null;
     if (m_Listener != null)
         m_Listener.Stop();
 }
Esempio n. 12
0
        public void OnEnable()
        {
            minSize = new Vector2(300, 100);
#if UNITY_5_3_OR_NEWER
            titleContent = new GUIContent("Test run monitor");
#else
			title = "Test run monitor";
#endif
            Instance = this;
            m_StatusLabel = "Initializing...";
            if (EditorApplication.isCompiling) return;
            EnableServer();
        }