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

IRIS-1036 Add native mobile testing for visual #2879

Merged
merged 5 commits into from
Aug 7, 2024
Merged
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
34 changes: 34 additions & 0 deletions docs/visual-testing/diffing-engines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
id: diffing-engines
title: Diffing Engines
sidebar_label: Diffing Engines
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';

Sauce Visual Testing supports the various diffing engines, which are described below.
Our SDKs give you the ability to select a specific engine for each snapshot, if you don't want to rely on the default engine.


## Balanced

The Balanced engine will soon be our default engine.
It support all features like selective diffing and provides great all around performance.
It is able to detect single pixel changes while ignoring barely visible rendering artifacts such as anti-aliasing or small color inaccuracies.


## Simple

Our first engine. It is similar to the Balanced engine, but we specifically developed the Balanced engine to address some corner cases that the Simple engine didn't handle well.
We will support the Simple engine for the forseeable future, but we won't backport new features to it.
In particular, selective diffing is not available for the Simple engine.

We recommend using the Balanced engine instead of the Simple engine.


## (Experimental)

We have am Experimental engine that is constantly changing and used for showcasing and troubleshooting.
Please don't use this engine in production.
31 changes: 31 additions & 0 deletions docs/visual-testing/mobile-native-testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: mobile-native-testing
title: Mobile Native Testing (BETA)
sidebar_label: Mobile Native Testing (BETA)
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';

In addition to website testing, Sauce Visual also supports testing of native mobile apps for Android and iOS with Appium.

In principal, the process is the same as writing a visual test for a website, except that instead of a website, an app needs to be specified in the capabilities.

Check out [our examples](https://github.com/saucelabs/visual-examples/) to see it in action.


## Best Practices

When writing a visual test for mobile apps, we recommend the following
- Explicitly control "dark mode" / "light mode" before taking visual snapshots, so snapshots are either always taken in dark or light mode, but not mixed.
- Explicitly specify a single device and OS version for testing. You may run the same test suite on various devices, but don't use wildcards in device names (dynamic device allocation).


## Limitations

The following features are not available for mobile app testing:
- Full page screenshots
- DOM capture and inspection
- [Selective diffing](./selective-diffing.md)

4 changes: 1 addition & 3 deletions docs/visual-testing/selective-diffing.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
id: selective-diffing
title: Sauce Labs Visual Testing
title: Selective Diffing
sidebar_label: Selective Diffing
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import useBaseUrl from '@docusaurus/useBaseUrl';

## Selective Diffing

Sauce Visual allows you to ignore only certain types of changes.
We support the following change types:
- **Content:** The text, image or other content changes.
Expand Down
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,8 @@ module.exports = {
},
'visual-testing/cli',
'visual-testing/selective-diffing',
'visual-testing/mobile-native-testing',
'visual-testing/diffing-engines',
'visual-testing/faq',
],
},
Expand Down
Loading