This project does not contain a build. In order to run tests need to:
- instrument app (load AltTester Unity SDK as package in Unity Editor)
- build application with desired target platform (e.g.: Standalone Windows)
- Install the required .NET Framework Developer Pack, version 4.7.1 installer link
- Install Unity Hub
- Install Unity Editor version 2021.3.20f1
- Import AltTester Unity SDK in Unity Editor
- Assets > Import Package > Custom Package > use the SDK version suggested below in Before running the tests
- Edit in
RollABall\Packages\manifest.json
version compatible for packagecom.unity.render-pipelines.universal: 12.1.10
- Package
com.unity.render-pipelines.universal: 12.1.7
can not be found using Unity Editor 2021.3.19f1
This is why detailed in pre-requisites other versions which seemed compatible.
To run the tests, you must include the AltTester Unity SDK in the project. To do that, you can choose between the following ways:
-
Add the AltTester Unity SDK submodule to the project
- use
git submodule update --init
command to pull the git submodule; - make sure that the submodule added is on the master branch (you can use the following command
git checkout master
in the Assets/AltTester-Unity-SDK folder); - also, if you already have the project, you should make a
git pull
on the master branch, in order to ensure that you are using the latest version of AltTester.
- use
-
Download AltTester Unity SDK and import it into Unity
- download the AltTester Unity SDK from the Altom website: Alttester or using this link for unitypackage;
- import the package into the project (drag-n-drop the package in the Assets folder);
- a pop-up will appear, select All and click on Import.
- Open the project in Unity Editor (see pre-requisites for which version proved to work).
- Platform > Standalone > Build Target: StandaloneWindows
- Build Only
- Open AltTester Editor from Unity Editor menu (displayed only after imported package as mentioned above) and see tests under
Assembly-CSharp-Editor.dll
- If build completed successfully, should see in folder RollABall build folder.
- Launch Game from executable inside build folder
- Select tests under Tests_AltTester
- Run Selected Tests
The tests can be found in RollABall > Assets > Editor > Tests_AltTester folder in the Tests_AltTester.cs class.
This project contains C# AltTester tests for a project using the New Input System. The tested actions are:
- MoveMouse
- Click
- BeginTouch, MoveTouch, EndTouch
- Swipe
- KeyDown, KeyUp
- PressKey
- Tilt
- Scroll
- HoldButton
- PressKeys
- MultipointSwipe
- Tap
- ResetInput