Skip to main content

Interactions

Interactions is a functionality that allows you to record every test session’s action and check how it interacted with the app’s UI. By reviewing the taps you can check if certain interface elements failed to load or crashed.

What You'll Need

Using Interactions for Real Devices

By default, the Interactions feature is enabled if the instrumentation feature is enabled. To enable device instrumentation:

  1. On Sauce Labs, click Live > Mobile App.
  2. Upload your mobile app to Sauce Labs through the UI or CLI.
  3. After you’ve uploaded your app, return to the Live > Mobile App page, hover your mouse over your app, then select Settings.
    Mobile app settings navigation
  4. Under Default Settings, toggle Instrumentation on.
    Mobile app settings navigation

Now you can start your live or automated testing session. Interactions will be captured and be part of your test results.

note

The Interactions feature works for all the automated test framework types.

Interaction Metrics

You can use Interactions to understand what happened in your test session and improve your app's performance, stability, and more. At the top of the Test Results page, you can see the data on activities that occurred during the testing session. To get more detailed information, click on the dropdown icon next to an action you want to investigate.


Mobile app settings navigation
Mobile app settings navigation

The following table lists the available metrics:

NameDescription
labelThe user-readable label for a particular activity.
viewTagA tag that provides additional information associated with a view.
viewIdIdentifier that defines view attributes.
classNameThe class name of an element.
contentDescriptionThe description of an element.
xPositionThe horizontal position of the tap.
yPositionThe vertical position of the tap.
xPathUsed to locate an element in the XML structure of the app.
note

You can use the xPath value to build your Appium test quickly!

Accessing Interactions Metrics

You can access Interactions metrics from the Live Test Results or Automated Test Results page:


Mobile app settings navigation
Mobile app settings navigation

You can also download the results using the API call below:

 curl --compressed \
-O https://{SAUCE_USERNAME}:{SAUCE_ACCESS_KEY}@{DATA_CENTER}.saucelabs.com/v1/rdc/jobs/{JOB_ID}/insights.json

Limitations

note

Webviews and hybrid apps are not supported

More Information