From adeee70a30fe6a55ab6587e92bf8b7705bf60054 Mon Sep 17 00:00:00 2001 From: Benjamin Karran Date: Tue, 6 Aug 2024 15:17:58 +0200 Subject: [PATCH 1/5] IRIS-1036 Add native mobile testing for visual --- docs/visual-testing/mobile-native-testing.md | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/visual-testing/mobile-native-testing.md diff --git a/docs/visual-testing/mobile-native-testing.md b/docs/visual-testing/mobile-native-testing.md new file mode 100644 index 0000000000..64af84e405 --- /dev/null +++ b/docs/visual-testing/mobile-native-testing.md @@ -0,0 +1,33 @@ +--- +id: mobile-native-testing +title: Sauce Labs Visual Testing +sidebar_label: Mobile Native Testing (BETA) +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import useBaseUrl from '@docusaurus/useBaseUrl'; + +## Mobile Native Testing (BETA) + +In addition to website testing, Sauce Visual also supports testing of native mobile apps for Android and iOS. + +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 +- [Selective diffing](./selective-diffing.md) +- DOM capture and inspection + From 362c4f2332206a49ba50e8fbff51e5b889266c9c Mon Sep 17 00:00:00 2001 From: Benjamin Karran Date: Tue, 6 Aug 2024 16:38:33 +0200 Subject: [PATCH 2/5] add diffing engines --- docs/visual-testing/diffing-engines.md | 36 ++++++++++++++++++++++++++ sidebars.js | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 docs/visual-testing/diffing-engines.md diff --git a/docs/visual-testing/diffing-engines.md b/docs/visual-testing/diffing-engines.md new file mode 100644 index 0000000000..3a58c7de04 --- /dev/null +++ b/docs/visual-testing/diffing-engines.md @@ -0,0 +1,36 @@ +--- +id: diffing-engines +title: Sauce Labs Visual Testing +sidebar_label: Diffing Engines +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import useBaseUrl from '@docusaurus/useBaseUrl'; + +## Diffing Engines + +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. diff --git a/sidebars.js b/sidebars.js index 453378a55c..c103d3e6d3 100644 --- a/sidebars.js +++ b/sidebars.js @@ -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', ], }, From 6f39e3ef14560f16bda93b2ce5979bc349e20979 Mon Sep 17 00:00:00 2001 From: Benjamin Karran Date: Tue, 6 Aug 2024 16:49:11 +0200 Subject: [PATCH 3/5] Clean up structure --- docs/visual-testing/diffing-engines.md | 10 ++++------ docs/visual-testing/mobile-native-testing.md | 8 +++----- docs/visual-testing/selective-diffing.md | 4 +--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/docs/visual-testing/diffing-engines.md b/docs/visual-testing/diffing-engines.md index 3a58c7de04..83d4d4e5ae 100644 --- a/docs/visual-testing/diffing-engines.md +++ b/docs/visual-testing/diffing-engines.md @@ -1,6 +1,6 @@ --- id: diffing-engines -title: Sauce Labs Visual Testing +title: Diffing Engines sidebar_label: Diffing Engines --- @@ -8,20 +8,18 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -## Diffing Engines - 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 +## 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 +## 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. @@ -30,7 +28,7 @@ In particular, selective diffing is not available for the Simple engine. We recommend using the Balanced engine instead of the Simple engine. -### (Experimental) +## (Experimental) We have am Experimental engine that is constantly changing and used for showcasing and troubleshooting. Please don't use this engine in production. diff --git a/docs/visual-testing/mobile-native-testing.md b/docs/visual-testing/mobile-native-testing.md index 64af84e405..8de38e556a 100644 --- a/docs/visual-testing/mobile-native-testing.md +++ b/docs/visual-testing/mobile-native-testing.md @@ -1,6 +1,6 @@ --- id: mobile-native-testing -title: Sauce Labs Visual Testing +title: Mobile Native Testing (BETA) sidebar_label: Mobile Native Testing (BETA) --- @@ -8,8 +8,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import useBaseUrl from '@docusaurus/useBaseUrl'; -## Mobile Native Testing (BETA) - In addition to website testing, Sauce Visual also supports testing of native mobile apps for Android and iOS. 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. @@ -17,14 +15,14 @@ In principal, the process is the same as writing a visual test for a website, ex Check out [our examples](https://github.com/saucelabs/visual-examples/) to see it in action. -### Best Practices +## 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 +## Limitations The following features are not available for mobile app testing: - Full page screenshots diff --git a/docs/visual-testing/selective-diffing.md b/docs/visual-testing/selective-diffing.md index 92d345e20b..e472bf500d 100644 --- a/docs/visual-testing/selective-diffing.md +++ b/docs/visual-testing/selective-diffing.md @@ -1,6 +1,6 @@ --- id: selective-diffing -title: Sauce Labs Visual Testing +title: Selective Diffing sidebar_label: Selective Diffing --- @@ -8,8 +8,6 @@ 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. From 765a405aaf5914066ff3d516e33d7d25d781b301 Mon Sep 17 00:00:00 2001 From: Benjamin Karran Date: Wed, 7 Aug 2024 10:24:24 +0200 Subject: [PATCH 4/5] Update docs/visual-testing/mobile-native-testing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Félix P. --- docs/visual-testing/mobile-native-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-testing/mobile-native-testing.md b/docs/visual-testing/mobile-native-testing.md index 8de38e556a..fb63f15331 100644 --- a/docs/visual-testing/mobile-native-testing.md +++ b/docs/visual-testing/mobile-native-testing.md @@ -8,7 +8,7 @@ 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. +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. From 71b19431b33f3e62ae7bd008837cfae488c71781 Mon Sep 17 00:00:00 2001 From: Benjamin Karran Date: Wed, 7 Aug 2024 10:24:35 +0200 Subject: [PATCH 5/5] Update docs/visual-testing/mobile-native-testing.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Félix P. --- docs/visual-testing/mobile-native-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-testing/mobile-native-testing.md b/docs/visual-testing/mobile-native-testing.md index fb63f15331..815c0d534c 100644 --- a/docs/visual-testing/mobile-native-testing.md +++ b/docs/visual-testing/mobile-native-testing.md @@ -26,6 +26,6 @@ When writing a visual test for mobile apps, we recommend the following The following features are not available for mobile app testing: - Full page screenshots -- [Selective diffing](./selective-diffing.md) - DOM capture and inspection +- [Selective diffing](./selective-diffing.md)