Testing on iOS with Sauce Labs

This page is not available in the language you requested. You have been redirected to the English version of the page.
Link to this page copied to clipboard
Not for use with personal data

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
important

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

  1. Download the latest virtual USB client.
  2. Gather your Sauce Labs credentials - user name, access key and device name
  3. 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.


Screenshot showing “App to Test” dropdown on SauceLabs’ Live Testing Dashboard

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.


Screenshot showing private device selected and ready to start test session

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!


Screenshot showing a running session with device booted and app launched on device

Connect to Test Session

Following method 1 in the vUSB documentation, connect to the test session you just started.

note

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.


Screenshot showing the Sauce Labs device in the Xcode device drop down

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