Merge branch 'WES-57-test-framework' into 'development'

WES-57-test-framework

See merge request wesign/unity-application!5
This commit is contained in:
Victor Mylle 2023-03-08 14:15:01 +00:00
commit 7e98fea538
11 changed files with 118 additions and 0 deletions

View File

@ -23,3 +23,24 @@ trigger:
event:
- push
- 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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6d14129d5a7c94a6f9dd981688d05475
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View 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);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 74f8b297e568e071198f12d32c3f32c0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
{
"name": "EditModeTests",
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [
"Editor"
]
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b3d66002fb543bf3fa03c11006f8cb3a
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: de9830103274ebdf39c7197c8fbc9bf8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View 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);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 144f20408941dce97812560476275d78
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,6 @@
{
"name": "PlayModeTests",
"optionalUnityReferences": [
"TestAssemblies"
]
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 6d91b6749698c0ea6a1f03f8801e43a8
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: