a set of shell scripts that install the tools of a QA automation workstation on Ubuntu, one script per tool. the goal is to replace a day of manual installs with a few commands. they were written for Ubuntu 22.04 (the Docker script names jammy and ubuntu-jammy packages) on x86-64.
| script | what it does |
|---|---|
install-adb.bash |
downloads the adb binary (stored in this repo as adb41) to /usr/bin/adb |
install-android-sdk.bash |
installs OpenJDK 8, downloads Android command-line tools (sdk-tools-linux-4333796) to ~/android-sdk-29, sets ANDROID_HOME, ANDROID_SDK_ROOT, JAVA_HOME and PATH in ~/.bashrc, accepts licenses, installs platform-tools, platforms;android-29, build-tools;29.0.2 |
install-appium-only.bash |
installs Node.js 18 (NodeSource), then Appium and the uiautomator2 driver with npm |
install-appium-and-appium-inspector.bash |
runs the Appium script, then installs Appium Inspector 2023.6.1 (AppImage) into /opt/appium-inspector with a desktop entry |
install-chrome-dev.bash |
adds the Google apt repository and installs google-chrome-unstable |
install-dedicated-chrome.bash |
removes google-chrome-stable, installs Chrome 109.0.5414.74 from a .deb and unpacks the matching chromedriver 109 into ~/julo/github/env-setup |
install-docker-engine.bash |
installs Docker CE 20.10.24 for Ubuntu jammy, the CLI, containerd, buildx and compose plugins, and rootless extras |
install-docker-compose-1.25.1.bash |
downloads Docker Compose 1.25.1 to /usr/local/bin/docker-compose |
install-genymotion.bash |
installs VirtualBox 6.1.50 for jammy and Genymotion 3.4.0 |
install-github-desktop.bash |
installs GitHub Desktop 3.3.1 (the Linux build from the shiftkey/desktop releases) |
install-pyenv.bash |
installs the build libraries and pyenv, adds it to ~/.bashrc |
install-virtualenv.bash |
installs the pyenv-virtualenv plugin |
setup-python39.bash |
installs Python 3.9 with pyenv and creates the virtualenv julo_pytest_3.9 |
setup-python369.bash |
the same for Python 3.6.9, virtualenv julo_pytest_3.6.9 |
other files: bundletool-all-1.9.1.jar (Android bundletool 1.9.1, for .aab files), adb41 (the adb binary), appium-inspector.desktop and appiuminspector.png (the Appium Inspector launcher entry and icon), ta-lib-0.4.0-src.tar.gz (TA-Lib source, not used by any script).
- you have a fresh Ubuntu 22.04 x86-64 machine and need pyenv, Docker, Appium, the Android SDK or a pinned Chrome on it.
- you want to read how each tool is installed from the shell, one small script at a time.
when not to use it:
- you are on macOS or Windows: these scripts use
aptand Linux binaries. use https://github.com/ClasherGeek77/wsl_docker_immich_hotspot_server for a Windows WSL example, or the setup sections of https://github.com/ClasherGeek77/pytest_web_boilerplate and https://github.com/ClasherGeek77/pytest_android_boilerplate - you want pinned, current tool versions: the versions here are from 2023 (Chrome 109, Node 18, Docker 20.10, Python 3.9, Android SDK 29) and are not updated.
- Ubuntu 22.04 (jammy) on x86-64, with
sudo. other releases are not verified. bash,wget,curl, internet access, and a few GB of disk (Android SDK, VirtualBox, Genymotion, Chrome).- a desktop session for the GUI tools (Genymotion, GitHub Desktop, Appium Inspector).
pick only the scripts you need. a typical order for a mobile and web QA machine:
git clone https://github.com/ClasherGeek77/linux_qa_environment_setup_script.git
cd linux_qa_environment_setup_script
chmod +x *.bash
./install-pyenv.bash
./install-virtualenv.bash
./setup-python39.bash
./install-docker-engine.bash
./install-android-sdk.bash
./install-appium-and-appium-inspector.bashyou should see apt and download progress, then the tool on your PATH after you open a new terminal: pyenv versions, docker --version, echo $ANDROID_HOME, appium --version. not run here: the scripts change system packages and need Ubuntu; they were read and their syntax was checked with bash -n.
- every script is short and follows the same pattern: check if the tool is there, download it again if so, install, then add exports to
~/.bashrc. - start with
install-pyenv.bash, thensetup-python39.bash(it tries four compiler options in turn: clang, the default compiler, gcc-10, gcc-11). install-appium-and-appium-inspector.bashcallsinstall-appium-only.bashby downloading it from GitHub, not from your local copy.
| symptom | cause | fix |
|---|---|---|
| a script stops after printing nothing useful, and a new shell opens | the scripts call exec "$SHELL" to reload the shell, which ends the current script run |
run the next step in the new shell, or run the remaining commands by hand |
E: Unable to locate package or a held package error in the Docker script |
a release other than 22.04, or the pinned version 5:20.10.24~3-0~ubuntu-jammy is no longer in the repository |
use Ubuntu 22.04, or remove the version pin in install-docker-engine.bash |
| a download returns 404 | a pinned URL (Chrome 109 mirror, chromedriver.storage.googleapis.com, Android sdk-tools-linux-4333796, Genymotion 3.4.0) moved |
download the file from the vendor and edit the URL |
install-android-sdk.bash fails at sdkmanager |
the old sdk-tools package needs Java 8, or the license step needs sudo |
check java -version shows 1.8 and re-run |
Appium or Appium Inspector scripts fetch files from ClasherGeek77/install-script |
the scripts still use an older repository name in their URLs (it answered HTTP 200 when checked) | if it stops working, change those URLs to this repository, https://github.com/ClasherGeek77/linux_qa_environment_setup_script |
| pyenv install fails with build errors | missing build libraries | run install-pyenv.bash first, it installs them |
notes on safety: the scripts use sudo, chmod 777 on the Android SDK folder, apt-key and curl ... | bash. read each script before you run it, and do not run them on a machine you cannot rebuild.
- the maintained test projects that these tools support: https://github.com/ClasherGeek77/pytest_web_boilerplate , https://github.com/ClasherGeek77/pytest_android_boilerplate and https://github.com/ClasherGeek77/katalon_android_boilerplate
- Android UI inspection in Docker: https://github.com/ClasherGeek77/uiautomatorviewer_docker_novnc
- all repositories: https://github.com/ClasherGeek77