This repository shows a few C# tests that use the page object model and AltTester® to test the Unity Endless Runner sample: https://assetstore.unity.com/packages/essentials/tutorial-projects/endless-runner-sample-game-87901
This project already has the AltDriver inside, but otherwise would require adding the https://www.nuget.org/packages/AltTester-Driver package to work.
The tests are meant to be run on a Windows or MacOS device.
Create a folder App
under the project.
To start the tests, depending on your OS run:
❗ Starting with version 2.0.0, the AltTester® Desktop must be running on your PC while the tests are running.
-
Windows:
- Download and install the AltTester® Desktop for Windows from here, then open it.
- Install Allure on your Windows by following the steps from Scoop installation or Manual installation
- Instrument the TrashCat application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Create a folder
TrashCatWindows
underApp
and include the instrumented app under the App/TrashCatWindows/ folder. - Create an
allureConfig.json
file underbin/Debug/netcoreappX
. For the content of this file, please take a look at the following example - Run
./start_tests_Windows.sh
in your bash terminal.
-
MacOS:
- Download and install the AltTester® Desktop for MacOS from here, then open it.
- Install Allure on your MacOS by using the following command in your terminal
brew install allure
. - Instrument the TrashCat application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Create a folder
TrashCatMac
underApp
and include the instrumented app under the App/TrashCatMac/ folder. - Create an
allureConfig.json
file underbin/Debug/netcoreappX
. For the content of this file, please take a look at the following example - Run
./start_tests_Mac.sh
in your bash terminal.
❗ To manually open the Allure report, navigate to the allure-reports
folder and open the index.html
file with live server.
This script will:
- start the app on your device
- create an
allure-results
folder - run the tests
- generate and start the Allure report
- stop the app after the tests are done