Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio support updates #2586

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions docs/dev/test-configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -1405,22 +1405,6 @@ capabilities.setCapability("sauce:options", sauceOptions);

---

### `audioCapture`

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

Enables audio recording in your iOS and Android native mobile app tests. The audio will be part of the **Test Results** page video file, which you can play back and download in our built-in media player. The default value is `false`.

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

---

### `networkCapture`

<p><small>| OPTIONAL | BOOLEAN | <span className="sauceGreen">Real Devices Only</span></small> |</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1296,25 +1296,12 @@ Application settings for real device tests.

```yaml
appSettings:
audioCapture: true
instrumentation:
networkCapture: true
```

---

#### `audioCapture`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this remain? Real devices are still supported after all, no? Same for XCUITest on RDC.


<p><small>| OPTIONAL | BOOLEAN |</small></p>

Record the audio stream generated by your native mobile app during a real device test.

```yaml
audioCapture: true
```

---

#### `instrumentation`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,28 +803,12 @@ Application settings for real device tests.
suites:
- name: My Saucy Test
appSettings:
audioCapture: true
instrumentation:
networkCapture: true
```

---

#### `audioCapture`

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

Record the audio stream generated by your native mobile app during a real device test.

```yaml
suites:
- name: My Saucy Test
appSettings:
audioCapture: true
```

---

#### `instrumentation`

<p><small>| OPTIONAL | OBJECT | <span className="sauceGreen">Real Devices Only</span> |</small></p>
Expand Down
66 changes: 11 additions & 55 deletions docs/mobile-apps/features/audio-capture.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
---
id: audio-capture
title: Audio Capture
title: Audio Streaming
---

import useBaseUrl from '@docusaurus/useBaseUrl';

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

Audio Capture is a functionality that gives you the ability to record the audio stream generated by your native mobile app (Android or iOS/iPadOS) during a live or automated real device test.
Audio Streaming is a functionality that gives you the ability to stream the audio stream generated by your native mobile app (Android or iOS/iPadOS) during a live test.

## What You'll Need

- A Sauce Labs account ([Log in](https://accounts.saucelabs.com/am/XUI/#login/) or sign up for a [free trial license](https://saucelabs.com/sign-up))
- A native Android, iOS, or iPadOS mobile app.

## Using Audio Capture for Automated Tests on Real Devices
## Using Audio Streaming on Real Devices

To enable Audio Capture in your automated tests, you need to use the following capabilities:

Click the link below that corresponds to your framework:

- [Espresso](/mobile-apps/automated-testing/espresso-xcuitest/espresso/#audiocapture)
- [XCUITest](/mobile-apps/automated-testing/espresso-xcuitest/xcuitest/#audiocapture)
- [Appium](/dev/test-configuration-options/#audiocapture)

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

<p><small><span className="sauceGreen">Real Devices Only</span></small></p>
To enable Audio Streaming during Live Testing you need allow the following protocols:
- Peer-to-peer connection
- Allow Twilio domains within your firewalls. (You can test it on the following [link]([url](https://networktest.twilio.com/)))
- Audio and Performance mode enabled in the Live Testing toolbar under Device Settings.

You just need to launch a Live Testing session on a real device, and the audio will be streamed automatically without any configuration.

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.

With the Audio Streaming feature, you are able to hear the sound your application is making during a Live Testing session. It allows you to validate audio streams, notification sounds, and animations.
With the Audio Streaming feature, you can hear the sound your application is making during a Live Testing session. It allows you to validate audio streams, notification sounds, and animations.
You will be able to test Android Talkback functionality during a session by enabling it under the Accessibility options in the toolbar.

:::note
You will be able to mute and unmute the sound during your session by clicking on the mute/unmute button on the toolbar:
Expand All @@ -45,24 +37,14 @@ You will be able to mute and unmute the sound during your session by clicking on

:::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.
- Website testing is not yet available on Android.
- Emulators and simulators are not supported.

:::

## Using Audio Capture and Streaming on your Android Device

You will have the capability to capture audio on Android 10 and later versions. On private devices, you can test TalkBack on Android 12 and later versions.

:::note
Once `audioCapture` is enabled, the status bar will display the recording icon.
:::

We use native Android audio capture for seamless audio capture for our real devices experience. Your test results and sessions are secured, and can only be viewed by you.

:::caution

If your apps's manifest.xml file defines `android:allowAudioPlaybackCapture="false"`, you need to enable instrumentation to have Audio Capture work for your apps.
Expand Down Expand Up @@ -94,31 +76,5 @@ For further information, you can refer to the official documentation on [TalkBac

## 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.

## Accessing the Audio in Your Test Tesults for Automated Test

The audio recording will be included in the video recording for automated tests, which you can play back and download from the built-in media player on the **Test Results** page.

You can also download the video file with the included audio stream programmatically using the following API request:

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

## Limitations

:::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.
- Emulators and simulators are not supported.
- Website testing is not yet available on Android.

:::

## More Information
You will be able to capture audio from iOS 13 and above. Additionally, you can validate the sounds produced by your application, enable VoiceOver, and verify its output.

- [Test Results](/test-results/)
Loading