Testing on iOS with Sauce Labs
The axe DevTools Mobile Analyzer will connect with a Sauce Labs device through Xcode and Sauce Labs' VirtualUSB technology, enabling you to manually test any app installed on a Sauce Labs real device for accessibility defects.
Requires:
- A Sauce Labs Enterprise plan
- A private device running < iOS 17
- Sauce Labs' latest virtualUSB client installed on your Mac
Currently, vUSB is only possible with private real devices running an iOS version earlier than 17. A new CLI solution is being developed by Sauce Labs to support iOS 17 and up.
First Time Setup
- Download the latest virtual USB client.
- Gather your Sauce Labs credentials - user name, access key and device name
- Start the Sauce Labs server, establishing connection to their Real Device cloud.
Don’t start a test session just yet. Follow the first three steps of the axe DevTools Mobile Analyzer setup process. In step 2, you'll follow the physical device instructions.
Start a Test Session
On the Sauce Labs dashboard, go to Live -> Mobile App, and select the “App to Test”. Ensure the app has been built for real devices and not simulators. Sauce Labs will show a tag next to the app that indicates whether it is built for a Simulator or a Real Device.
Select the device to start a session with. Ensure that the device is available and is a private device running an iOS version lower than 17.
Now, select the “Start Test” button. You will see the device being prepared for testing. Once it is ready, the app you selected should be open on the device. Keep this session running through the next steps!
Connect to Test Session
Following method 1 in the vUSB documentation, connect to the test session you just started.
Once you have connected to the session, you may get a pop-up prompting you to enter your password to allow read/write access to /var/run/usbmuxd
. Allow access in order for Xcode to communicate with the Sauce Labs device.
Start Testing
Open the axe DevTools Mobile Analyzer project. You should see the device populate in Xcode. If it does not appear, you may need to restart Xcode after connecting to the session.
Once you see the device in Xcode, it may take a few moments for Xcode to download the relevant symbols for the device before you are able to run a test.
Now you you can refer to Step 4 in the axe DevTools Mobile Analyzer setup and run your test.
If prompted, click the button to 'Register Device'. You should see the scan post successfully to the dashboard once the test completes.
You can continue scanning as long as the test session is active and connected.
Close the session
Once you are done testing, follow the Sauce Labs documentation to disconnect from the session and then close the live session on the dashboard.
Additional Resources
- Find complete instructions for Virtual USB Testing on Real Mobile Devices in Sauce Labs' documentation.
- Learn how to build Real Device
.ipa
files - Find details on uploading
.ipa
files to SauceLabs Mobile App Storage