Advanced Usage

Running AltTester® Server in terminal

You can run AltTester® Server in a terminal with the following command:

Bash: ./AltTesterDesktop.exe -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt

CMD: AltTesterDesktop.exe -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt

This is useful when you want to run tests but don’t want to waste resources for the Desktop part.

Note

In case of Windows, we recommend using Git Bash instead of CMD. If you choose to use CMD, the server won’t stop when the terminal is killed. To kill the AltTester® Desktop process if the CMD is still opened, please open the Task Manager and search for a process called Windows Command Processor (a process that, when expanded, displays the AltTester® Desktop process). If CMD was closed, the steps are similar, except that you should look exactly for the AltTester Desktop process and kill it.

Command line arguments

Argument Required Information
-batchmode Yes Unity related argument. Please check PlayerCommandLineArguments for more details.
-nographics Yes Unity related argument. Please check PlayerCommandLineArguments for more details.
-port INTEGER Yes Sets the port on which AltTester® Server will start, this value must be between 1 and 65535. This is a mandatory argument for running AltTester® Server.
-license TEXT No Yes when you never activated a license on the device and you try to run AltTester® Server add this argument with a valid licenseKey. This argument is not necessary if you already activated the license on the device.
-removeActivation No Deactivates the active license key if there is one. If you add this argument AltTester® Server will not start (the -port argument is not needed in this situation). AltTester® Desktop will just try to deactivate the license key and quit after.
-termsAndConditionsAccepted No Means that you have read our Terms and Conditions and you accept them. You only need to specify this argument the first time using AltTester® Server or any time our Terms and Conditions are updated. Please take a look at the example below.
-logfile FILE No This argument is needed in case of saving the logs in a specific file. -logfile - will output logs in the bash terminal
-version No Displays the AltTester® Desktop version. You should use this argument together with -batchmode and -nographics.

Bash: ./AltTesterDesktop.exe -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt -termsAndConditionsAccepted

CMD: AltTesterDesktop.exe -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt -termsAndConditionsAccepted

Note

The run of the command may be stuck if the value for -port contains certain special characters.In this case is recommended to rerun the process using a valid port number.

Code examples for setting up AltTester® Server from terminal

This section is for users who want to set up the AltTester® Server from terminal (eg: for servers or pipelines).

  1. Export your license which is stored in a file:

export LICENSE_KEY=$(cat license.txt)

* storing the license in a file is not a must, but it’s a safe practice

  1. Download the AltTester® archive from alttester.com using the following command:

wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopPackageMac__v2.1.2.zip
  1. Unzip the AltTester® Desktop folder and move to it:

unzip AltTesterDesktopPackageMac__v2.1.2.zip
cd AltTesterDesktopPackageMac__v2.1.2
  1. Attach the AltTester® Desktop as disk:

hdiutil attach AltTesterDesktop__v2.1.2.dmg
  1. Copy the .app file to the Application folder and move to it:

cp -R /Volumes/AltTesterDesktop/AltTesterDesktop.app /Applications
cd /Applications
  1. Start the AltTester® Desktop in batchmode:

AltTesterDesktop.app/Contents/MacOS/AltTesterDesktop -batchmode -port 13000 -license $LICENSE_KEY -nographics -logfile LOGFILE.txt
  1. Run your tests:

  • depending on your set up, you might go out from this folder and run your tests

  1. Remove the AltTester® Desktop from Applications:

rm -r /Applications/AltTesterDesktop.app
  1. Detach the AltTester® Desktop disk:

hdiutil detach /Volumes/AltTesterDesktop