Skip to content

Commit

Permalink
Appium capabilities constant rename (#3036)
Browse files Browse the repository at this point in the history
* Update sauceLabsImageInjectionEnabled in camera-image-injection.md

* Update sauceLabsImageInjectionEnabled in test-configuration-options.md

* Update sauceLabsBypassScreenshotRestriction in test-configuration-options.md

* Update allowTouchIdEnroll in test-configuration-options.md

* Update allowTouchIdEnroll in biometric-authentication.md

* Fixed broken anchor

* Added ceash reporting

* Added vitals
  • Loading branch information
shahrukhamd authored Dec 12, 2024
1 parent ebaf5f2 commit df99485
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 18 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
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 df99485

Please sign in to comment.