Mac Self-Hosted Test Runners

Introduction

Testable test runners are responsible for executing test cases and reporting back the results.

Mac test runners are available for tests that need to execute on the Mac OS instead of the standard Ubuntu 22.04 LTS inside a container that we use. It is the only test runner package that supports Safari testing.

Supported scenario types: Selenium, Playwright, Puppeteer, Live sessions, Node.js scripts, HAR replay, Postman, and Java.

Prerequisites

  • 50GB disk, 2 vCPU, 4GB+ RAM
  • sudo access
  • brew installed

Installation

Steps to install our test runner software on Mac:

  1. Download https://testable-onprem.s3.amazonaws.com/testable-mac-installer-[x64|arm64]-latest.tar.xz (x64 for Intel based Macs, arm64 for the ARM based Macs)
  2. Extract the tar file (tar -xf testable-mac-installer-[x64|arm64]-latest.tar.xz)
  3. Run the installer.sh with the appropriate options (e.g. ./install.sh --noprompt --dir /usr/local/testable --key xxxxxx --region mac-demo)
  4. Once installed, go to the installation directory (/usr/local/testable in this case) and start the runner via ./run.sh.
  5. Once it’s successfully running, go back to the Testable web application under Org Management -> Test Runner Sources -> Self-Hosted and you should see the newly configured test runner under the chosen region name. Tests can be assigned to run in this region and Testable will assign the test to one or more available runners in that region.

The above steps as a simple script:

#!/bin/bash

testable_key=xxxxxxx # your API key (found under Org Management => API Keys)
region_name=mac-demo # the chosen region name will be visible in the Location dropdown when creating a test
install_dir=/usr/local/testable
arch=$(uname -m)
if [ "$arch" = "x86_64" ]; then
    processor="x64"
else
    processor="arm64"
fi

wget https://testable-onprem.s3.amazonaws.com/testable-mac-installer-$processor-latest.tar.xz
tar -xf testable-mac-installer-$processor-latest.tar.xz
./install.sh --noprompt --dir $install_dir --key $testable_key --region $region_name
cd $install_dir
./run.sh

Update

To update your runner simply follow the installation steps. The installer will automatically install any new version of the runner code or other tools and remove older versions.

Once done go to the installation directory and restart the runner by running ./stop.sh and then ./run.sh.