Перейти к файлу
Taylor Philpott 85cc1d7f45 Merge pull request #28 from unity/add-metaopenxr-exclude
Exclude functional test running on MetaOpenXR test project
2024-02-28 12:31:16 -08:00
Tests Added and removed using 2024-02-28 11:25:08 -08:00
.gitignore Checkin git ignore files 2020-05-31 19:26:28 -07:00
.npmignore Checkin git ignore files 2020-05-31 19:26:28 -07:00
CHANGELOG.md Create new functional test package 2020-05-31 19:20:23 -07:00
CHANGELOG.md.meta Create new functional test package 2020-05-31 19:20:23 -07:00
CONTRIBUTING.md Add license file 2020-06-15 15:42:33 -07:00
CONTRIBUTING.md.meta add URP to test asmdef, create a define for it to use in test that behaves differently with URP (VerifyAdjustEyeTextureResolutionScale). 2020-08-26 15:43:47 -07:00
LICENSE.md Updating License file 2020-06-15 15:44:49 -07:00
LICENSE.md.meta Create new functional test package 2020-05-31 19:20:23 -07:00
README.md Removing XR test interface from tests repo (#26) 2024-02-06 21:18:08 -08:00
README.md.meta Create new functional test package 2020-05-31 19:20:23 -07:00
Tests.meta Create new functional test package 2020-05-31 19:20:23 -07:00
package.json Check in changes to init Github mirror 2020-07-07 14:32:14 -07:00
package.json.meta Create new functional test package 2020-05-31 19:20:23 -07:00

README.md

XR Automated Tests - Functional Tests

Here we provide XR automated test projects for both AR and VR functional testing.

  • AR -- Including test projects for ARCore, ARFoundation, ARMock
  • VR -- Including test projects for CrossPlatform and Windows Mixed Reality

Target XR Displays or XR Assemblies

Test Interface for fitlering XRDisplay & Assemblies The attributes to target either XR Displays or Assemblies can be used to both support or exclude certain targets in order for tests, class, methods, or assemblies. This can be used to have only certain tests run on certain platforms while allowing a simple cross platform test matrix to exist.

Target a XR Display

Tag the Class or Method with the attribute TargetXrDisplays -The attribute takes a string to include or exclude target SDK's -- Example on a Unity Test: [TargetXrDisplays(exclude = new[] { "MagicLeap-Display" })]

Target Certain XR Assemblies

Tag the Class, Assembly, or Method with the attribute ConditionalAssembly -The attribute takes a string to include or exclude target assemblies --Example on a Unity Test: [ConditionalAssembly(exclude = new[] { "Unity.XR.MockHMD", "Microsoft.MixedReality.OpenXR" })]

All of these tests use the Unity Test Framework to excercise their functionality. You can choose to open project in Unity to explore and run from the Test Runner tab, or launch tests from Unity command line using the runTests Unity.exe command line option.

Unity command line are full defined here: Unity Command Line Arguments

Running these tests from Unity command line provides flexibility for automation by allow you to specify how the test app (player) will be built prior to execution. If you choose to run the tests from the command line, you'll also want to use the -testResults option in order to save the test results to the .xml formatted-file, and the -logfile option to save the Unity editor log to a specified location.

Once you've generated a test results file after running your tests, we encourage you to use the Unity Test Runner Results Reporter. This test results reporter will generate an HTML report from your results, making it easy to read and understand test results and even can be used in a continuous integration system

For usage and details please check each individual test projects.