Browse Source

Updated Unity Test Tools

master
Christopher 8 years ago
parent
commit
ced4d79cff
  1. 2
      Assets/UnityTestTools.meta
  2. 2
      Assets/UnityTestTools/Common/Settings.meta
  3. 2
      Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta
  4. 4
      Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta
  5. 4
      Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta
  6. 7
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs
  7. 1
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs
  8. 1
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs
  9. 2
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs
  10. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs
  11. 4
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs
  12. 18
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs
  13. 3
      Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs
  14. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab
  15. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab
  16. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab
  17. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab
  18. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat
  19. 8
      Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat
  20. 17
      Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll.meta
  21. 5
      Assets/UnityTestTools/changelog.txt

2
Assets/UnityTestTools.meta

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 5c8e5d66ff19140a1bf3cfdc3955859c
folderAsset: yes
timeCreated: 1458650910
timeCreated: 1474291595
licenseType: Free
DefaultImporter:
userData:

2
Assets/UnityTestTools/Common/Settings.meta

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 4f7795beea73b4d50bd536d0012e8e85
folderAsset: yes
timeCreated: 1458650919
timeCreated: 1474291611
licenseType: Free
DefaultImporter:
userData:

2
Assets/UnityTestTools/Common/Settings/IntegrationTestsRunnerSettings.asset.meta

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: ec24e4a07acd24ffaa1cd1df7fa11d54
timeCreated: 1458650919
timeCreated: 1474291611
licenseType: Free
NativeFormatImporter:
userData:

4
Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.Mdb.dll.meta

@ -15,10 +15,6 @@ PluginImporter:
enabled: 1
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

4
Assets/UnityTestTools/IntegrationTestsFramework/Libs/Mono.Cecil.dll.meta

@ -15,10 +15,6 @@ PluginImporter:
enabled: 1
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

7
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/DTOFormatter.cs

@ -84,7 +84,9 @@ namespace UnityTest
remain -= bytesRead;
index += bytesRead;
} while (remain > 0);
#if !UNITY_WSA
val = Encoding.BigEndianUnicode.GetString(bytes);
#endif
}
}
@ -131,9 +133,14 @@ namespace UnityTest
public object Deserialize (Stream stream)
{
#if !UNITY_WSA
var result = (ResultDTO)FormatterServices.GetSafeUninitializedObject(typeof(ResultDTO));
Transfer (result, new Reader(stream));
return result;
#else
return null;
#endif
}
}
}

1
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/Batch.cs

@ -6,7 +6,6 @@ using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using UnityTest.IntegrationTests;
#if UNITY_5_3_OR_NEWER
using UnityEditor.SceneManagement;
#endif

1
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/IntegrationTestsHierarchyAnnotation.cs

@ -40,4 +40,5 @@ namespace UnityTest
EditorGUIUtility.SetIconSize(Vector2.zero);
}
}
}

2
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/NetworkResultsReceiver.cs

@ -167,9 +167,9 @@ namespace UnityTest
}
if (m_RunFinished)
{
Close();
if (InternalEditorUtility.inBatchMode)
EditorApplication.Exit(m_TestFailed ? Batch.returnCodeTestsFailed : Batch.returnCodeTestsOk);
Close();
}
if (m_Repaint) Repaint();
}

8
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunner.cs

@ -109,10 +109,6 @@ namespace UnityTest.IntegrationTests
{
case BuildTargetGroup.Android:
return BuildTarget.Android;
#if !UNITY_5_4_OR_NEWER
case BuildTargetGroup.WebPlayer:
return BuildTarget.WebPlayer;
#endif
default:
{
switch (Application.platform)
@ -124,11 +120,7 @@ namespace UnityTest.IntegrationTests
case RuntimePlatform.LinuxPlayer:
return BuildTarget.StandaloneLinux;
}
#if UNITY_5_4_OR_NEWER
return BuildTarget.WebGL;
#else
return BuildTarget.WebPlayer;
#endif
}
}
}

4
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerConfiguration.cs

@ -56,12 +56,12 @@ public class PlatformRunnerConfiguration
case BuildTarget.StandaloneWindows64:
return path + ".exe";
case BuildTarget.StandaloneOSXIntel:
case BuildTarget.StandaloneOSXIntel64:
case BuildTarget.StandaloneLinuxUniversal:
return path + ".app";
case BuildTarget.Android:
return path + ".apk";
default:
if (buildTarget.ToString() == "BlackBerry" || buildTarget.ToString() == "BB10")
return path + ".bar";
return path;
}
}

18
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/Editor/PlatformRunner/PlatformRunnerSettingsWindow.cs

@ -21,7 +21,9 @@ namespace UnityTest.IntegrationTests
private List<string> m_OtherScenesToBuild;
private List<string> m_AllScenesInProject;
private Vector2 m_ScrollPosition;
private Vector2 m_ScrollPositionIntegrationTests;
private Vector2 m_ScrollPositionOtherScenes;
private Vector2 m_ScrollPositionAllScenes;
private readonly List<string> m_Interfaces = new List<string>();
private readonly List<string> m_SelectedScenes = new List<string>();
@ -37,7 +39,7 @@ namespace UnityTest.IntegrationTests
readonly GUIContent m_Label = new GUIContent("Results target directory", "Directory where the results will be saved. If no value is specified, the results will be generated in project's data folder.");
public PlatformRunnerSettingsWindow()
void Awake()
{
if (m_OtherScenesToBuild == null)
m_OtherScenesToBuild = new List<string> ();
@ -103,7 +105,7 @@ namespace UnityTest.IntegrationTests
}
EditorGUI.EndDisabledGroup();
DrawVerticalSceneList (ref m_IntegrationTestScenes, ref m_SelectedSceneInTest);
DrawVerticalSceneList (ref m_IntegrationTestScenes, ref m_SelectedSceneInTest, ref m_ScrollPositionIntegrationTests);
EditorGUILayout.EndVertical ();
// Extra scenes to include in build
@ -119,14 +121,14 @@ namespace UnityTest.IntegrationTests
}
EditorGUI.EndDisabledGroup();
DrawVerticalSceneList (ref m_OtherScenesToBuild, ref m_SelectedSceneInBuild);
DrawVerticalSceneList (ref m_OtherScenesToBuild, ref m_SelectedSceneInBuild, ref m_ScrollPositionOtherScenes);
EditorGUILayout.EndVertical ();
EditorGUILayout.Separator ();
// All Scenes
EditorGUILayout.BeginVertical ();
label = new GUIContent("Availble Scenes", "These are all the scenes within your project, please select some to run tests");
label = new GUIContent("Available Scenes", "These are all the scenes within your project, please select some to run tests");
EditorGUILayout.LabelField(label, EditorStyles.boldLabel, GUILayout.Height(20f));
@ -147,7 +149,7 @@ namespace UnityTest.IntegrationTests
EditorGUILayout.EndHorizontal ();
DrawVerticalSceneList (ref m_AllScenesInProject, ref m_SelectedSceneInAll);
DrawVerticalSceneList (ref m_AllScenesInProject, ref m_SelectedSceneInAll, ref m_ScrollPositionAllScenes);
EditorGUILayout.EndVertical ();
// ButtoNetworkResultsReceiverns to edit scenes in lists
@ -180,9 +182,9 @@ namespace UnityTest.IntegrationTests
}
}
private void DrawVerticalSceneList(ref List<string> sourceList, ref string selectString)
private void DrawVerticalSceneList(ref List<string> sourceList, ref string selectString, ref Vector2 scrollPosition)
{
m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition, Styles.testList);
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition, Styles.testList);
EditorGUI.indentLevel++;
foreach (var scenePath in sourceList)
{

3
Assets/UnityTestTools/IntegrationTestsFramework/TestRunner/TestRunnerConfigurator.cs

@ -59,9 +59,8 @@ namespace UnityTest
{
return (UnityEditor.EditorBuildSettingsScene[] )serializer.Deserialize(textReader);
}
catch (System.Xml.XmlException e)
catch (System.Xml.XmlException)
{
Debug.Log(e);
return null;
}
}

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionFailure.prefab

@ -28,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.1736994, y: 3.9978147, z: -16.24892}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -40,17 +41,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 03f3b4747259a364b800508ac27e1c17, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeCollisionSuccess.prefab

@ -28,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.1736994, y: 3.9978147, z: -16.24892}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -40,17 +41,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 43da3275cd08d41429f56675d70c58df, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerFailure.prefab

@ -28,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -40,17 +41,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 03f3b4747259a364b800508ac27e1c17, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/CubeTriggerSuccess.prefab

@ -28,6 +28,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -40,17 +41,20 @@ MeshRenderer:
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 43da3275cd08d41429f56675d70c58df, type: 2}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_UseLightProbes: 0
m_ReflectionProbeUsage: 1
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedWireframeHidden: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/green.mat

@ -15,16 +15,14 @@ Material:
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
- first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: 928be703400f4eb48af2f94d55bf3f74, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Floats: []
m_Colors:
data:
first:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

8
Assets/UnityTestTools/IntegrationTestsFramework/TestingAssets/Materials/red.mat

@ -15,16 +15,14 @@ Material:
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
- first:
name: _MainTex
second:
m_Texture: {fileID: 2800000, guid: 591632297e74ba34fa4c65d1265d370a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: {}
m_Floats: []
m_Colors:
data:
first:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

17
Assets/UnityTestTools/UnitTesting/Editor/NSubstitute/NSubstitute.dll.meta

@ -1,22 +1,7 @@
fileFormatVersion: 2
guid: 3c5e1afc6e0d68849ae6639aff58cfc7
PluginImporter:
MonoAssemblyImporter:
serializedVersion: 1
iconMap: {}
executionOrder: {}
isPreloaded: 0
platformData:
Any:
enabled: 0
settings: {}
Editor:
enabled: 1
settings:
DefaultValueInitialized: true
WindowsStoreApps:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

5
Assets/UnityTestTools/changelog.txt

@ -1,3 +1,8 @@
Version 1.5.9
- Updated tools for Unity 5.4
- Bugfixes
Version 1.5.8
- Bugfixes

Loading…
Cancel
Save