The TestsFor2.2.5
branch includes test cases and setup procedures for executing tests using AltTester® Unity SDK 2.2.5
. These tests are designed specifically for the TrashCat build mentioned in the following lines.
- Download and install .NET SDK
- Have a Standalone build instrumented with AltTester® Unity SDK 2.2.5 - for additional information you can follow this tutorial
- Have AltTester® Desktop app, 2.2.4 installed (to be able to inspect game).
- For SDK v2.2.5 => need to use AltTester® Desktop 2.2.4
- Add AltTester® package:
dotnet add package AltTester-Driver --version 2.2.5
- Download and install ADB for Windows
- Enable Developers Options on mobile device more instructions here
Instrument the Android TrashCat
application using the latest version of AltTester® Unity SDK - for additional information you can follow this tutorial
- Make sure mobile device is connected via USB, execute:
adb devices
-
On mobile device: allow USB Debugging access (RSA key fingerprint from computer)
-
Uninstall the app from the device
adb uninstall com.Altom.TrashCat
- Install the app on the device
adb install TrashCat.apk
Run tests manually (with dotnet CLI)
! Make sure to have the AltTester® Desktop App running
- [Optional to do manually] Setup ADB reverse port forwarding (this can also be done in code in Setup and Teardown)
adb reverse remove tcp:13000
adb reverse tcp:13000 tcp:13000
- Launch game
adb shell am start -n com.Altom.TrashCat/com.unity3d.player.UnityPlayerActivity
- Execute all tests:
dotnet test
- Kill app
adb shell am force-stop com.Altom.TrashCat
dotnet test --filter <test_class_name>
dotnet test --filter <test_class_name>.<test_name>