diff --git a/Assets/UnityTestTools.meta b/Assets/UnityTestTools.meta index 1db021ff..8710489a 100644 --- a/Assets/UnityTestTools.meta +++ b/Assets/UnityTestTools.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 5c8e5d66ff19140a1bf3cfdc3955859c folderAsset: yes -timeCreated: 1450715827 +timeCreated: 1458650910 licenseType: Free DefaultImporter: userData: diff --git a/Assets/UnityTestTools/Common/Settings.meta b/Assets/UnityTestTools/Common/Settings.meta index ce35e28a..2d93ae55 100644 --- a/Assets/UnityTestTools/Common/Settings.meta +++ b/Assets/UnityTestTools/Common/Settings.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 4f7795beea73b4d50bd536d0012e8e85 folderAsset: yes -timeCreated: 1450715835 +timeCreated: 1458650919 licenseType: Free DefaultImporter: userData: diff --git a/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta index 6919ec46..12f73ac0 100644 --- a/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta +++ b/Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: ec24e4a07acd24ffaa1cd1df7fa11d54 -timeCreated: 1455275624 +timeCreated: 1458650919 licenseType: Free NativeFormatImporter: userData: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/Libs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/Libs.meta index 5b8287ab..1b749751 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/Libs.meta +++ b/Assets/UnityTestTools/IntegrationTestsFramework/Libs.meta @@ -2,7 +2,7 @@ fileFormatVersion: 2 guid: e22ba039de7077c4aa95758ef723b803 folderAsset: yes timeCreated: 1445282049 -licenseType: Pro +licenseType: Store DefaultImporter: userData: assetBundleName: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta b/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta index 4ee72945..4be4950f 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta +++ b/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 713231d47408a06408a45470c967bae8 timeCreated: 1441797177 -licenseType: Pro +licenseType: Store PluginImporter: serializedVersion: 1 iconMap: {} @@ -15,10 +15,6 @@ PluginImporter: enabled: 1 settings: DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU userData: assetBundleName: assetBundleVariant: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta b/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta index 16dbe19f..1123a8ae 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta +++ b/Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 28fc22990733f8f4ea1137f15e363609 timeCreated: 1441797177 -licenseType: Pro +licenseType: Store PluginImporter: serializedVersion: 1 iconMap: {} @@ -15,10 +15,6 @@ PluginImporter: enabled: 1 settings: DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU userData: assetBundleName: assetBundleVariant: diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs index b4490bf7..27a9418f 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs @@ -89,6 +89,15 @@ namespace UnityTest 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(); EditorSceneManager.OpenScene(testScenes.First()); GuiHelper.SetConsoleErrorPause(false); @@ -100,10 +109,12 @@ namespace UnityTest 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; diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta index abad897d..78bcfabf 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/EditorReferencesUtil.cs.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: aad501c968b324cf3a8d1c52eb09ca04 timeCreated: 1437322927 -licenseType: Pro +licenseType: Store MonoImporter: serializedVersion: 2 defaultReferences: [] diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs index bc83ef37..5ae9d077 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs @@ -248,8 +248,10 @@ namespace UnityTest.IntegrationTests else if (m_Settings.port < IPEndPoint.MinPort) m_Settings.port = IPEndPoint.MinPort; } - EditorGUI.EndDisabledGroup(); } + + EditorGUI.EndDisabledGroup(); + if (EditorGUI.EndChangeCheck()) { m_Settings.Save(); diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs index 4af9fc74..9c64a2f8 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunner.cs @@ -307,7 +307,7 @@ namespace UnityTest TestSceneNumber += 1; - string testScene = m_Configurator.GetIntegrationTestScenes (TestSceneNumber); + string testScene = m_Configurator.GetIntegrationTestScenes(TestSceneNumber); if (testScene != null) SceneManager.LoadScene(Path.GetFileNameWithoutExtension(testScene)); @@ -315,6 +315,15 @@ namespace UnityTest { TestRunnerCallback.AllScenesFinished(); k_ResultRenderer.ShowResults(); + +#if UNITY_EDITOR + var prevScenes = m_Configurator.GetPreviousScenesToRestore(); + if(prevScenes!=null) + { + UnityEditor.EditorBuildSettings.scenes = prevScenes; + } +#endif + if (m_Configurator.isBatchRun && m_Configurator.sendResultsOverNetwork) Application.Quit(); } diff --git a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs index 51462fa5..b1b8153a 100644 --- a/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs +++ b/Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs @@ -25,6 +25,7 @@ namespace UnityTest public static string integrationTestsNetwork = "networkconfig.txt"; public static string batchRunFileMarker = "batchrun.txt"; public static string testScenesToRun = "testscenes.txt"; + public static string previousScenes = "previousScenes.txt"; public bool isBatchRun { get; private set; } @@ -40,6 +41,36 @@ namespace UnityTest CheckForSendingResultsOverNetwork(); } +#if UNITY_EDITOR + public UnityEditor.EditorBuildSettingsScene[] GetPreviousScenesToRestore() + { + string text = null; + if (Application.isEditor) + { + text = GetTextFromTempFile(previousScenes); + } + + if(text != null) + { + var serializer = new System.Xml.Serialization.XmlSerializer(typeof(UnityEditor.EditorBuildSettingsScene[])); + using(var textReader = new StringReader(text)) + { + try + { + return (UnityEditor.EditorBuildSettingsScene[] )serializer.Deserialize(textReader); + } + catch (System.Xml.XmlException e) + { + Debug.Log(e); + return null; + } + } + } + + return null; + } +#endif + public string GetIntegrationTestScenes(int testSceneNum) { string text; diff --git a/Assets/UnityTestTools/changelog.txt b/Assets/UnityTestTools/changelog.txt index e80d3d61..8c190f27 100644 --- a/Assets/UnityTestTools/changelog.txt +++ b/Assets/UnityTestTools/changelog.txt @@ -1,7 +1,11 @@ +Version 1.5.8 + +- Bugfixes + Version 1.5.7 - -- Updated tools for Unity 5.3 - + +- Updated tools for Unity 5.3 + Version 1.5.6 - Updated Mono.Cecil.dll and Mono.Cecil.Mdb.dll libraries @@ -14,12 +18,12 @@ Version 1.5.5 Version 1.5.4 -- APIs updates - +- APIs updates + Version 1.5.3 - Bug fixes - + Version 1.5.2 - Bug fixes