Merge branch 'WES-57-test-framework' into 'development'
WES-57-test-framework See merge request wesign/unity-application!5
This commit was merged in pull request #5.
This commit is contained in:
21
.drone.yml
21
.drone.yml
@@ -23,3 +23,24 @@ trigger:
|
|||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: tests
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: unity-build-tests
|
||||||
|
image: docker.io/library/unity-test-runner:0.1
|
||||||
|
commands:
|
||||||
|
- /opt/unity/editors/2021.3.19f1/Editor/Unity -runTests -batchmode -nographics -projectPath . -testResults results_editmode.xml -testPlatform EditMode || true
|
||||||
|
- /opt/unity/editors/2021.3.19f1/Editor/Unity -runTests -batchmode -nographics -projectPath . -testResults results_playmode.xml -testPlatform PlayMode || true
|
||||||
|
|
||||||
|
- name: tests-parser
|
||||||
|
image: docker.io/library/unity-test-parser:0.1
|
||||||
|
commands:
|
||||||
|
- python /app/unity_test_parser.py results_editmode.xml results_playmode.xml
|
||||||
|
|||||||
8
Assets/EditModeTests.meta
Normal file
8
Assets/EditModeTests.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d14129d5a7c94a6f9dd981688d05475
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
15
Assets/EditModeTests/BasicTest.cs
Normal file
15
Assets/EditModeTests/BasicTest.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.TestTools;
|
||||||
|
|
||||||
|
public class BasicTest
|
||||||
|
{
|
||||||
|
// check if edit mode tests works
|
||||||
|
[Test]
|
||||||
|
public void AlwaysTrueTest()
|
||||||
|
{
|
||||||
|
Assert.True(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/EditModeTests/BasicTest.cs.meta
Normal file
11
Assets/EditModeTests/BasicTest.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 74f8b297e568e071198f12d32c3f32c0
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
9
Assets/EditModeTests/EditModeTests.asmdef
Normal file
9
Assets/EditModeTests/EditModeTests.asmdef
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "EditModeTests",
|
||||||
|
"optionalUnityReferences": [
|
||||||
|
"TestAssemblies"
|
||||||
|
],
|
||||||
|
"includePlatforms": [
|
||||||
|
"Editor"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
Assets/EditModeTests/EditModeTests.asmdef.meta
Normal file
7
Assets/EditModeTests/EditModeTests.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b3d66002fb543bf3fa03c11006f8cb3a
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/PlayModeTests.meta
Normal file
8
Assets/PlayModeTests.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: de9830103274ebdf39c7197c8fbc9bf8
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
15
Assets/PlayModeTests/BasicTest.cs
Normal file
15
Assets/PlayModeTests/BasicTest.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.TestTools;
|
||||||
|
|
||||||
|
public class BasicTest
|
||||||
|
{
|
||||||
|
// check if play mode tests works
|
||||||
|
[Test]
|
||||||
|
public void AlwaysTrueTest()
|
||||||
|
{
|
||||||
|
Assert.True(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/PlayModeTests/BasicTest.cs.meta
Normal file
11
Assets/PlayModeTests/BasicTest.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 144f20408941dce97812560476275d78
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
6
Assets/PlayModeTests/PlayModeTests.asmdef
Normal file
6
Assets/PlayModeTests/PlayModeTests.asmdef
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "PlayModeTests",
|
||||||
|
"optionalUnityReferences": [
|
||||||
|
"TestAssemblies"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
Assets/PlayModeTests/PlayModeTests.asmdef.meta
Normal file
7
Assets/PlayModeTests/PlayModeTests.asmdef.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d91b6749698c0ea6a1f03f8801e43a8
|
||||||
|
AssemblyDefinitionImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user