Skip to content

C# tests created using AltTester SDK for a game developed w/ Unity

Notifications You must be signed in to change notification settings

ralupopa/Tests-NUnit-AltTesterDriver-For-iOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Prerequisite

  1. Download and install .NET SDK
  2. Have a game instrumented with AltTester Unity SDK
  3. Have AltTester Desktop app installed (to be able to inspect game)
  4. Download and install iProxy (for Windows there are binaries builded here, while for MacOS and Linux there are official install steps on libimobiledevice)
    • On Windows just add path of the exe files to environment system PATh variable in order to be available from everywhere (as AltDriver command implements that)

Tests created with NUnit & AltTester-Driver for a game developed w/ Unity (TrashCat)

This repository is a test project that uses NUnit as the test library. It was generated using following command (as suggested in documentation)

dotnet new nunit

AltTester Unity SDK framework contains AltDriver class used to connect to the instrumented game developed w/ Unity. AltTester-Driver for C# is available as a nuget package. Install AltTester-Driver nuget package

dotnet add package AltTester-Driver --version 1.8.2

Setup for running on mobile device

  1. Install the app on device

  2. Check device is connected via USB and can it be accessed, execute:

idevice_id

or

ideviceinfo

Run tests manually (with dotnet CLI)

  1. Launch game manually
  2. From TrashCatTests execute all tests:
dotnet test

! Make sure to have the AltTester Desktop App closed, otherwise the test won't be able to connect to proper port.

Run all tests from a specific class / file

dotnet test --filter <test_class_name>

Run only one test from a class

dotnet test --filter <test_class_name>.<test_name>

Workaround for being able to use SDK 1.8.2 installed as package in project:

  • get altwebsocket-sharp.dll from here and put in project's bin\Debug\net7.0

About

C# tests created using AltTester SDK for a game developed w/ Unity

Topics

Resources

Stars

Watchers

Forks

Languages