By using the magicpod-api-client, it is possible to run mobile app tests followed by browser tests in sequence.
You can also schedule regular executions by integrating with a CI tool or using local scheduling tools such as cron or Task Scheduler.
For example, if you want to run the tests in the following order:
Mobile App Test → Browser Test → Mobile App Test, and only proceed to the next test if the previous one succeeds, this can be achieved with the following shell script:
#!/bin/bash
SECRET_API_TOKEN="<API token>"
# Step 1: Run the mobile app test
if ./magicpod-api-client batch-run -t "$SECRET_API_TOKEN" -o <organization_name> -p <project_name_mobile_app> -S <setting_number>; then
# Step 2: (If Step 1 succeeds) Run the browser test
if ./magicpod-api-client batch-run -t "$SECRET_API_TOKEN" -o <organization_name> -p <project_name_browser> -S <setting_number>; then
# Step 3: (If Step 2 succeeds) Run the mobile app test
./magicpod-api-client batch-run -t "$SECRET_API_TOKEN" -o <organization_name> -p <project_name_mobile_app> -S <setting_number>
fi
fi