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
AltTesterDesktop.app/Contents/MacOS/AltTesterDesktop -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt
./AltTesterDesktop.x86_64 -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
AltTesterDesktop.app/Contents/MacOS/AltTesterDesktop -batchmode -port 13000 -license YOUR_LICENSE -nographics -logfile LOGFILE.txt -termsAndConditionsAccepted
./AltTesterDesktop.x86_64 -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).
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
Download the AltTester® archive from alttester.com using the following command:
wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopPackageMac__v2.1.2.zip
Unzip the AltTester® Desktop folder and move to it:
unzip AltTesterDesktopPackageMac__v2.1.2.zip
cd AltTesterDesktopPackageMac__v2.1.2
Attach the AltTester® Desktop as disk:
hdiutil attach AltTesterDesktop__v2.1.2.dmg
Copy the .app file to the Application folder and move to it:
cp -R /Volumes/AltTesterDesktop/AltTesterDesktop.app /Applications
cd /Applications
Start the AltTester® Desktop in batchmode:
AltTesterDesktop.app/Contents/MacOS/AltTesterDesktop -batchmode -port 13000 -license $LICENSE_KEY -nographics -logfile LOGFILE.txt
Run your tests:
depending on your set up, you might go out from this folder and run your tests
Remove the AltTester® Desktop from Applications:
rm -r /Applications/AltTesterDesktop.app
Detach the AltTester® Desktop disk:
hdiutil detach /Volumes/AltTesterDesktop
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
Download the AltTester® archive from alttester.com using the following command:
wget https://alttester.com/app/uploads/AltTester/desktop/AltTesterDesktopLinuxBatchmode.zip
Unzip the archive:
unzip AltTesterDesktopLinuxBatchmode.zip
Navigate to the unzipped folder:
cd AltTesterDesktopLinux
Run the following command to give rights to the AltTester® Desktop file:
chmod +x AltTesterDesktop.x86_64
Start the AltTester® Server in batchmode:
./AltTesterDesktop.x86_64 -batchmode -port 13000 -license $LICENSE_KEY -nographics -termsAndConditionsAccepted &
Run your tests:
depending on your set up, you might go out from this folder and run your tests
Navigate to the AltTesterDesktopLinux folder and kill the AltTester® process:
cd AltTesterDesktopLinux
kill -2 `ps -ef | awk '/AltTesterDesktop.x86_64/{print $2}'`