FAQ
On what platforms can I run tests with AltTester® Unity SDK?
PC, Mac, Android, iOS, WebGL, Console and Unity Editor.
What programming language can I use to write tests?
C#, Python, Java or Robot Framework.
Can AltTester® Unity SDK be integrated with Appium?
Yes, AltTester® Unity SDK can be used alongside Appium. Appium allows you to access the native objects and AltTester® Unity SDK can be used to access the Unity objects. For more info regarding how to run tests together with appium check Running tests together with Appium.
What versions of Unity does AltTester® Unity SDK work with?
AltTester® Unity SDK works with Unity 2021.3 LTS or higher. We no longer support Unity 2020.3 LTS as it has reached its End-of-Support from Unity and there was also a limitation for the IL2CPP builds. If you encounter any issues we'd like to hear about them. You can raise an issue or join our community on Discord.
Can I use AltTester® Unity SDK to run tests using device cloud services?
It works with some of the cloud services. We tried it with Bitbar, AWS Device Farm, BrowserStack and SauceLabs. These give you access to a virtual machine or a Docker container that has a cloud device attached, where you upload your tests, configure your environment and run your tests. Some of these cloud services allow running Appium automated tests by giving you access to an Appium server running in the cloud that has access to all their mobile devices. More info about this here: Running tests using device cloud services.
Do I need access to the source code of the Unity App to write tests?
In order to run tests using AltTester® Unity SDK you require an instrumented build of the Unity App. To create an instrumented build of the Unity App you need to import the AltTester® package in Unity Editor.
I don’t have access to source code, but I do have access to an instrumented build. How can I begin to write tests?
We’ve published AltTester® Desktop, which allows you to inspect the app objects outside the unity editor without access to the source code. More information about AltTester® Desktop can be found in this documentation.
Troubleshooting
I get `waiting for connection on port 13000` popup message when i start my Unity App
The popup message shows up when you start your instrumented Unity App. It tells you that the AltTester® Unity SDK is ready and you can start running your tests.
I get the error: Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included or the current platform.
You get this error due to multiple imports of Newtonsoft.Json.dll library. You can remove the Newtonsoft.Json version from AltTester® Unity SDK by deleting the Newtonsonft folder Assets/AltTester/3rdParty/Newtonsonft.
I get the error: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?),
You get this error because you don't have a reference to Newtonsoft.Json package.
Add `"com.unity.nuget.newtonsoft-json": "3.1.0"` to your project `manifest.json`, inside `dependencies`.
{
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.1.0"
}
}
I get the error: The type or namespace name 'InputTestFixture' could not be found (are you missing a using directive or an assembly reference?),
You get this error because you don't have `com.unity.inputsystem` added as a testables dependency.
Add `"com.unity.inputsystem"` to your `manifest.json`, inside `testables.`
{
"testables": [
"com.unity.inputsystem"
]
}
[Addressable]Building the instrumented app, I get the error: The type or namespace name 'InputTestFixture' could not be found (are you missing a using directive or an assembly reference?),
If you have Addressables package included in your project, set the Addressables settings to not build addressable when building the instrumented app. This can be done in Windows->Asset Management->Addressables->Settings and you will have an option Build Addressables on Player Build. Select Do not build Addressables content on Player build
When building Addressable from Asset Management make sure that the option for Keep ALTTESTER symbol defined is not checked.
Make sure you built your latest addressable before instrumenting your app with AltTester
How can I use the Input from AltTester® Unity SDK if my project is using Assembly Definitions ?
To use the Input from AltTester® Unity SDK you have to reference AltTesterUnitySDK.asmdef in your .asmdef. In case you are using multiple assembly definitions you will have to reference our .asmdef in all of your .asmdef files which contain a reference to any kind of input (Unity's input or your custom built input).
I downloaded the AltTester® package v1.7.2 from the documentation on MacOS. I got a warning pop-up about the input system where I chose 'Yes' because I am using the New Input System. After reopening Unity Editor, AltTester® Unity SDK is missing.
After reopening Unity Editor, add again the AltTester® package in your project.
I get the error: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
You get this error because you don’t have the Input System (New) package. If you only want to use the Input Manager (Old) in your project, follow this steps:
delete:
Assets\AltTester\AltServer\NewInputSystem.cs
Assets\AltTester\AltServer\AltKeyMapping.cs
comment in
Assets\AltTester\AltServer\AltPrefabDrag.cs
the entire#else
statement#if ENABLE_LEGACY_INPUT_MANAGER eventData.pointerDrag.transform.position = Input.mousePosition; // #else // eventData.pointerDrag.gameObject.transform.position = UnityEngine.InputSystem.Mouse.current.position.ReadValue(); #endif
comment in
Assets\AltTester\AltServer\Input.cs
:all imports for using
UnityEngine.InputSystem.UI
#if ALTTESTER && ENABLE_LEGACY_INPUT_MANAGER using System; using System.Collections; using System.Collections.Generic; using System.Linq; using AltTester.AltTesterUnitySDK.Driver; using AltTester.AltTesterUnitySDK; using AltTester.AltTesterUnitySDK.InputModule; using UnityEngine; using UnityEngine.EventSystems; // using UnityEngine.InputSystem.UI; using UnityEngine.Scripting;
all
if
lines that containInputSystemUIInputModule
and the curly brackets inside theseif
statements making sure to leave the code inside the brackets uncommented// if (EventSystem.current.currentInputModule != null && EventSystem.current.currentInputModule.GetType().Name != typeof(InputSystemUIInputModule).Name) // { if (eventSystemTarget != previousEventSystemTarget) { if (previousEventSystemTarget != null) UnityEngine.EventSystems.ExecuteEvents.ExecuteHierarchy(previousEventSystemTarget, pointerEventData, UnityEngine.EventSystems.ExecuteEvents.pointerExitHandler); if (eventSystemTarget != null && previousMousePosition != mousePosition) UnityEngine.EventSystems.ExecuteEvents.ExecuteHierarchy(eventSystemTarget, pointerEventData, UnityEngine.EventSystems.ExecuteEvents.pointerEnterHandler); previousEventSystemTarget = eventSystemTarget; } // }
comment in
Assets\AltTester\AltServer\AltMockUpPointerInputModule.cs
the same as the above
Lean Touch: AltTester® is not working in my application that uses Old Input System and Lean Touch
There are two steps to make AltTester work with Lean Touch:
Add
AltTesterUnitySDK
as an assembly definition reference inCW.Common
asmdef that can be found usually atPlugin->CW->Shared->Common
.In the
CwInput.cs
file replace every occurrence ofUnityEngine.Input.
withInput.
When I try to run tests in C#/ Python I get the error: System.PlatformNotSupportedException : Operation is not supported on this platform.(C#) / Error: the JSON object must be str, bytes or bytearray, not NoneType and Connection to AltServer closed with status code: None and message: 'None'. (Python)
You get this error because you are using an older binding. (Eg: You use the AltTester Unity SDK v 2.1.x and a binding with v 2.0.3). You should update it to the latest version.