Skip to content

Commit

Permalink
Merge branch 'main' into DVI-5381
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-sauce authored Dec 12, 2024
2 parents 904ec05 + df99485 commit 2734858
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 28 deletions.
56 changes: 46 additions & 10 deletions docs/dev/test-configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1419,19 +1419,23 @@ Controls Sauce Labs default resigning (iOS) or instrumentation (Android) of mobi

When set to `true`, Sauce Labs will resign the app under test with its own signature. This is required for iOS apps to be installed on our devices, but also to support features like:

- [Vitals](#vitals)
- [Network Capture](#networkcapture)
- [Image Injection](#saucelabsimageinjectionenabled)
- [Biometrics interception](#allowtouchidenroll)
- [Image Injection](#imageinjection)
- [Biometrics interception](#biometricsinterception)
- [Crash Reporting](#crashreporting)

And many more. This value can be set to `false` to allow testing of specific behaviors that are not permitted under the Sauce Labs provisioning. See [Resigning Enablements](/mobile-apps/automated-testing/ipa-files/#sauce-labs-resigning-enablements) for more information. This capability can only be set to `false` for iOS private devices.

**Android**

When set to `true`, Sauce Labs will instrument the app under test with its own signature. This is required for Android apps if you want to use features like:

- [Vitals](#vitals)
- [Network Capture](#networkcapture)
- [Image Injection](#saucelabsimageinjectionenabled)
- [Biometrics interception](#allowtouchidenroll)
- [Image Injection](#imageinjection)
- [Biometrics interception](#biometricsinterception)
- [Crash Reporting](#crashreporting)

and many more. This value can be set to `false` and can be used for private and public devices.

Expand All @@ -1449,7 +1453,23 @@ capabilities.setCapability("sauce:options", sauceOptions);

---

### `sauceLabsImageInjectionEnabled`
### `vitals`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span> |</small></p>

Vitals enables memory, cpu, performance stats alongside UI interactions during the session.

```java
MutableCapabilities capabilities = new MutableCapabilities();
//...
MutableCapabilities sauceOptions = new MutableCapabilities();
sauceOptions.setCapability("vitals", true);
capabilities.setCapability("sauce:options", sauceOptions);
```

---

### `imageInjection`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span> |</small></p>

Expand All @@ -1459,13 +1479,13 @@ Enables the [camera image injection](/mobile-apps/features/camera-image-injectio
MutableCapabilities capabilities = new MutableCapabilities();
//...
MutableCapabilities sauceOptions = new MutableCapabilities();
sauceOptions.setCapability("sauceLabsImageInjectionEnabled", true);
sauceOptions.setCapability("imageInjection", true);
capabilities.setCapability("sauce:options", sauceOptions);
```

---

### `sauceLabsBypassScreenshotRestriction`
### `bypassScreenshotRestriction`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span> | <span className="sauceGreen">Android Only</span> |</small></p>

Expand All @@ -1475,13 +1495,13 @@ Bypasses the restriction on taking screenshots for secure screens (i.e., secure
MutableCapabilities capabilities = new MutableCapabilities();
//...
MutableCapabilities sauceOptions = new MutableCapabilities();
sauceOptions.setCapability("sauceLabsBypassScreenshotRestriction", true);
sauceOptions.setCapability("bypassScreenshotRestriction", true);
capabilities.setCapability("sauce:options", sauceOptions);
```

---

### `allowTouchIdEnroll`
### `biometricsInterception`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span> |</small></p>

Expand All @@ -1491,7 +1511,23 @@ Enables the interception of biometric input, allowing the test to simulate Touch
MutableCapabilities capabilities = new MutableCapabilities();
//...
MutableCapabilities sauceOptions = new MutableCapabilities();
sauceOptions.setCapability("allowTouchIdEnroll", true);
sauceOptions.setCapability("biometricsInterception", true);
capabilities.setCapability("sauce:options", sauceOptions);
```

---

### `crashReporting`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span> |</small></p>

Enables capturing and inclusion of detailed stack traces in the test results, providing insights into any application crashes that occur during testing.

```java
MutableCapabilities capabilities = new MutableCapabilities();
//...
MutableCapabilities sauceOptions = new MutableCapabilities();
sauceOptions.setCapability("crashReporting", true);
capabilities.setCapability("sauce:options", sauceOptions);
```

Expand Down
27 changes: 17 additions & 10 deletions docs/mobile-apps/features/audio-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ Click the link below that corresponds to your framework:

Now you can start your automated testing session. Your audio recording will be captured and be part of the video recording on the Test Results page.

### Using Audio Streaming during a Live Testing session on Real Devices
### Using Live Audio Streaming during a Live Testing session on Real Devices

<p><small><span className="sauceGreen">Real Devices Only</span></small></p>

You just need to launch a Live Testing session on a real device, and the audio will be streamed automatically without any configuration.
You just need to launch a Live Testing session on a real device, and the audio will be streamed to your browser automatically without any configuration. If it doesn't launch for you, you can manually launch it by clicking **Performance Mode** butoon under **Device Settings** menu in the live testing toolbar.

The Audio Streaming feature ensures a better digital experience by validating audio playback and testing user flows that require audio testing in the early stages of the development lifecycle.

Expand All @@ -41,14 +41,15 @@ You will be able to mute and unmute the sound during your session by clicking on
<img src={useBaseUrl('img/audio.png')} alt="Mobile app settings navigation" width="300"/>
:::

## Streaming Limitations
## Live Streaming Limitations

:::note Limitations

- TalkBack Audio is ONLY supported on Private devices, reach out to our Support Team or your Sauce Labs representative to get this configured.
- Audio Streaming is supported on iOS/iPadOS 13.2 and above.
- Audio Streaming is supported on Android 10 and above.
- When Audio Streaming is enabled, we are not attaching the audio to the test results after the session ends on Android 12 and below.
- Android TalkBack is ONLY supported on Private devices, reach out to our Support Team or your Sauce Labs representative to get this configured.
- Audio Live Streaming is not supported on automated tests.
- Audio Live Streaming is supported on iOS/iPadOS 13.2 and above.
- Audio Live Streaming is supported on Android 10 and above.
- When Audio Live Streaming is enabled, we are not attaching the audio to the test results after the session ends on Android 12 and below.
- Website testing is not yet available on Android.

:::
Expand Down Expand Up @@ -92,6 +93,12 @@ For further information, you can refer to the official documentation on [TalkBac
<img src={useBaseUrl('/img/mobile-apps/talkBack-live.png')} alt="Sauce Labs TalkBack" width="751"/>
<img src={useBaseUrl('/img/mobile-apps/voiceOver-live.png')} alt="Sauce Labs Voiceover" width="751"/>

### Text to Speech

Text to speech audio of the focused element will be streamed to your browser as you interact with the devices.

On Android, text to speech audio will not be available for download once the session is over.

## Using Audio Capture on iOS/iPadOS

You will be able to capture audio from iOS 10 and above. Additionally, you can validate the sounds produced by your application, enable VoiceOver, and verify its output.
Expand All @@ -111,9 +118,9 @@ curl --compressed \ -O https://{SAUCE_USERNAME}:{SAUCE_ACCESS_KEY}@{DATA_CENTER}
:::note Limitations

- iOS Audio capture for automated test results is supported on iOS/iPadOS 10.1 and above.
- Android Audio capture for test results is supported on Android 10 and above.
- When Audio streaming is enabled, we are not attaching the audio to the test results after the session ends.
- Accessibility and TalkBack on Android are not supported.
- Android Audio capture for automated is supported on Android 10 and above.
- Android Audio capture for live testing is supported on Android 12 and above. Older devices will have limited audio depending on the device in use.
- Audio generated by Android Talkback will not be recorded in the test results video however it will be audible during live testing, streamed to your browser in real-time.
- Emulators and simulators are not supported.
- Website testing is not yet available on Android.

Expand Down
10 changes: 5 additions & 5 deletions docs/mobile-apps/features/biometric-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ To use biometric interception in a live mobile app test, you must ensure that th

To enable fingerprint and facial recognition on iOS and Android real devices:

1. Add the `allowTouchIdEnroll` capability to your test configuration and set it to `true`.
1. Add the `biometricsInterception` capability to your test configuration and set it to `true`.
:::note

Setting `allowTouchIdEnroll` does not update your app's biometric interception setting in Sauce Labs. It only sets the capability for the test in the event that the app setting in Sauce Labs is _different_ from the test script capability.
Setting `biometricsInterception` does not update your app's biometric interception setting in Sauce Labs. It only sets the capability for the test in the event that the app setting in Sauce Labs is _different_ from the test script capability.

- If biometric interception is ENABLED for the app in Sauce Labs, setting `allowTouchIdEnroll=true` or omitting it will have no effect, but setting `allowTouchIdEnroll=false` will disable the enrollment for the test, overriding the app setting.
- If biometric interception is ENABLED for the app in Sauce Labs, setting `biometricsInterception=true` or omitting it will have no effect, but setting `biometricsInterception=false` will disable the enrollment for the test, overriding the app setting.
- The opposite is true if biometric interception is DISABLED for the app in Sauce Labs.

:::
Expand All @@ -135,8 +135,8 @@ Testing biometric interception on Sauce Labs iOS Simulators or on your local mac
```js reference title="WebdriverIO Biometrics Check Sample"
https://github.com/saucelabs-training/demo-js/blob/docs-1.1/webdriverio/appium-app/examples/biometric-login/test/specs/biometrics.emusim.spec.ts#L10-L31
```
:::note Setting allowTouchIdEnroll capability is optional
You can set the desired capability `allowTouchIdEnroll` to `true` to enable enrollment by default for your app, but if you are checking the enrollment in your script anyway, this is not required.
:::note Setting biometricsInterception capability is optional
You can set the desired capability `biometricsInterception` to `true` to enable enrollment by default for your app, but if you are checking the enrollment in your script anyway, this is not required.
:::
2. If biometrics is disabled, call the `driver.toggleEnrollTouchId(true)` method to enable it.
```js reference title="WebdriverIO Toggle Biometrics Sample"
Expand Down
6 changes: 3 additions & 3 deletions docs/mobile-apps/features/camera-image-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ During an automated test, you'll pass an image to the image injection endpoint.

In your test script, you'll need to input the desired capabilities specific to Camera Image Injection (see below code snippets). The code will execute your image upload and opening of the device camera.

1. First, add the camera instrumentation desired capability command, `sauceLabsImageInjectionEnabled`, to your test script. This capability enables image injection functionality.
1. First, add the camera instrumentation desired capability command, `imageInjection`, to your test script. This capability enables image injection functionality.

<Tabs
defaultValue="Webdriver.io example"
Expand All @@ -165,7 +165,7 @@ platformName: 'Android',
platformVersion: '10',
automationName: 'UiAutomator2',
// Enable image-injection on RDC
sauceLabsImageInjectionEnabled: true
imageInjection: true
}
]
//...
Expand All @@ -181,7 +181,7 @@ desiredCapabilities.setCapability("deviceName", "Samsung Galaxy S10");
desiredCapabilities.setCapability("platformVersionName", "10");
...
// Enable image-injection on RDC
desiredCapabilities.setCapability("sauceLabsImageInjectionEnabled", true);
desiredCapabilities.setCapability("imageInjection", true);
```

</TabItem>
Expand Down

0 comments on commit 2734858

Please sign in to comment.