Feel free to support the development with a donation for the next improvements.
Requirements | |
---|---|
Operating System | Ubuntu 16.04, 18.04, 20.04, 21.04, 22.04 Linux CentOS 7+ Amazon Linux2 MacOS (Ventura) |
CPU | 8+ Cores |
Memory | 32 Gb RAM |
Free space | SSD 128Gb+ of free space |
valid path to socat binary should be
/usr/local/bin/socat
git clone https://github.com/zebrunner/mcloud-agent.git
cd mcloud-agent
./zebrunner.sh setup
-opencv5.6.0
postfix to the APPIUM_VERSION
in the ./defaults/main.yml:
APPIUM_VERSION: 2.0-opencv5.6.0
Full list of supported appium+opencv images can be found here: https://gallery.ecr.aws/zebrunner/appium
roles/devices/vars/main.yml
file according to the obligatory/optional comments inside.
Register all whitelisted Android and iOS devices with their udids!
ansible-playbook -vvv -i hosts devices.yml
To reregister the devices list only, you can use the following command:
ansible-playbook -vvv -i hosts devices.yml --tag registerDevices
To provide extra arguments including sudo permissions, you can use the below command:
ansible-playbook -vvv -i hosts --user=USERNAME --extra-vars "ansible_sudo_pass=PSWD" devices.yml
- Devices management script is deployed to /usr/local/bin/zebrunner-farm.
- Udev rules with whitelisted devices are in /etc/udev/rules.d/90_mcloud.rules.
- Whitelisted devices properties are in /usr/local/bin/mcloud-devices.txt.
- Usbmuxd service is stopped and masked (disabled).
- [Optional] Register
@reboot /usr/local/bin/zebrunner-farm restart
via crontab to forcibly restart containers on reboot- [Optional] Increased
fs.inotify.max_user_instances
to workaround #328sudo sysctl fs.inotify.max_user_instances=2048
roles/mac-devices/vars/main.yml
file according to the obligatory/optional comments inside.
Register all whitelisted iOS devices (phones, tablets or TVes) with their udids! Important! Only iOS devices supported on MacOS!
ansible-playbook -vvv -i hosts mac-devices.yml
To reregister the devices list only, you can use the following command:
ansible-playbook -vvv -i hosts mac-devices.yml --tag registerDevices
To provide extra arguments including sudo permissions, you can use the below command:
ansible-playbook -vvv -i hosts --user=USERNAME --extra-vars "ansible_sudo_pass=PSWD" mac-devices.yml
- Devices management script is deployed to /usr/local/bin/zebrunner-farm.
- Whitelisted devices properties are in /usr/local/bin/mcloud-devices.txt.
- Deployed and loaded $HOME/Library/LaunchAgents/ZebrunnerUsbmuxd.plist to share usbmuxd into the device containers
- Deployed $HOME/Library/LaunchAgents/ZebrunnerDevicesListener.plist to load and manage iOS devices connect/disconnect automatically
Disable screen lock:
Phone and Tablet: Settings->Lock screen->Turn display off when inactive->select Never
Apple TV: Settings->General->Sleep after->Select never
You need an Apple Developer account to sign in and build WebDriverAgent.
Make sure to specify relative
./Payload
to archive only Payload folder content
to override WDA_FILE artifacts per each device use
wda_file
andwda_bundleid
iOS device properties and re-execute ansible playbook.
./zebrunner.sh start/stop/restart
to manage the devices.
Run
./zebrunner.sh
to see available options.
Follow the below algorithm to identify any configuration issues with MCloud agent:
sudo udevadm control --log-priority=debug
.zebrunner-farm
shell script executed on every whitelisted device is able to connect/disconnect:
tail -f /var/log/syslog | grep zebrunner-farm
/usr/local/bin/zebrunner-farm
,/usr/local/bin/mcloud-devices.txt
and /etc/udev/rules.d/90_mcloud.rules
files.zebrunner-farm
output in syslog to identify the exact failure during containers creation.healthy
:
docker ps -a | grep device
// appium and WebDriverAgent for iOS container:
docker logs -f device-<Name>-<udid>-appium
// STF provider container:
docker logs -f device-<Name>-<udid>
// artifacts uploader container:
docker logs -f device-<Name>-<udid>-uploader
Code - Apache Software License v2.0
Documentation and Site - Creative Commons Attribution 4.0 International License