This repository shows a few Java 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
The tests are meant to be run on a Windows or MacOS device.
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.
MacOS/Linux:
- Download and install the AltTester® Desktop for MacOS from here, then open it.
- Instrument the TrashCat application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Create a folder
macunder the project and include the instrumented app under it. - Run
./start_tests_mac.shin your terminal.
Windows:
- Download and install the AltTester® Desktop for Windows from here, then open it.
- Instrument the TrashCat application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Create a folder
windowsunder the project and include the instrumented app under it. - Run
./start_tests_windows.shin your terminal.
Please make sure your Android device is connected via USB before running the .sh script.
To start the tests, run:
❗ Starting with version 2.0.0, the AltTester® Desktop must be running on your PC while the tests are running.
- Download and install the AltTester® Desktop for Windows from here, then open it.
- Instrument the TrashCat application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Create a folder
androidunder the project and include the instrumented app under it. - Run
./start_tests_android.shon Windows.
The ./start_tests_mac.sh / ./start_tests_windows.sh / ./start_tests_android.sh script will:
- start the app on your device
- create an
allure-resultsfolder - run the tests
- start the Allure report
- stop the app after the tests are done
To run and process the test report you will need to install Allure beforehand. You can do that by using npm and the following command npm install -g allure-commandline --save-dev or check the Allure official page for more installation options.