Skip to content

Commit

Permalink
espresso fps
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerem Beygo committed Dec 6, 2024
1 parent c3a6bff commit 642c40c
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions docs/visual-testing/integrations/espresso.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Sauce Visual Espresso plugin provides a library exposing a `VisualClient` object
Add [Sauce Visual](https://central.sonatype.com/artifact/com.saucelabs.visual/visual-espresso) dependency to your build.gradle

```groovy reference
https://github.com/saucelabs/visual-examples/blob/main/espresso/app/build.gradle#L106
https://github.com/saucelabs/my-demo-app-android/blob/main/app/build.gradle#L96
```

_Note: You can find the latest versions available [here](https://central.sonatype.com/artifact/com.saucelabs.visual/visual-espresso)._

Check warning on line 30 in docs/visual-testing/integrations/espresso.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/visual-testing/integrations/espresso.md#L30

[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.
Raw output
{"message": "[sauce.MeaningfulLinkWords] Improve SEO and accessibility by rewriting 'here' in the link text.", "location": {"path": "docs/visual-testing/integrations/espresso.md", "range": {"start": {"line": 30, "column": 52}}}, "severity": "WARNING"}
Expand All @@ -43,7 +43,7 @@ static VisualClient visual = VisualClient.builder(sauceUsername, sauceAccessKey)

To enhance efficiency in managing tests, it's important to provide a specific test name and suite name for each test. This practice allows Sauce Visual to effectively organize snapshots into coherent groups. As a result, it simplifies the review process, saving time and effort in navigating through test results and understanding the context of each snapshot.

Moreover, our Espresso binding offers an automated solution to this process. By integrating the following code snippet into your tests, the Java Binding can automatically assign appropriate test names and suite names, streamlining your testing workflow.
Moreover, our Espresso binding offers an automated solution to this process. By integrating the following code snippet into your tests, the Sauce Visual can automatically assign appropriate test names and suite names, streamlining your testing workflow.

```java
import com.saucelabs.visual.junit.TestMetaInfoRule;
Expand Down Expand Up @@ -242,6 +242,29 @@ visualClient.sauceVisualCheck("Visible Sale Banner",
.clipElement(withId(R.id.changeTextBt))
.build());
```
### Full page screenshots

Check warning on line 245 in docs/visual-testing/integrations/espresso.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/visual-testing/integrations/espresso.md#L245

[sauce.Headings] 'Full page screenshots' should use title case capitalization.
Raw output
{"message": "[sauce.Headings] 'Full page screenshots' should use title case capitalization.", "location": {"path": "docs/visual-testing/integrations/espresso.md", "range": {"start": {"line": 245, "column": 5}}}, "severity": "WARNING"}

Sauce Visual Espresso allows you to capture the entire scrollable area of your application, ensuring thorough visual testing that includes content beyond the visible viewport.

**Key Behaviors:**
- Capture of Scrollable Areas: The tool focuses exclusively on scrollable content within the defined area, providing an accurate representation of your app's primary interface.

Check warning on line 250 in docs/visual-testing/integrations/espresso.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/visual-testing/integrations/espresso.md#L250

[sauce.WordList] Use 'in' instead of 'within'.
Raw output
{"message": "[sauce.WordList] Use 'in' instead of 'within'.", "location": {"path": "docs/visual-testing/integrations/espresso.md", "range": {"start": {"line": 250, "column": 83}}}, "severity": "WARNING"}
- Exclusions: Static elements outside the scrollable area, such as headers, footers, or overlaying menus, are not included in the full-page screenshot.
- Comparison to Web Page Screenshots: Unlike full-page screenshots for web pages—where the page is scrolled and stitched together from multiple screenshots—Sauce Visual Espresso captures only the designated scrollable area in one seamless snapshot.

This tailored approach ensures precise testing and highlights the elements critical to your application’s user experience.

**Note**: Full-page screenshots for Espresso are currently in beta and may exhibit unexpected behavior, and DOM capture is not available for these screenshots.

Check warning on line 256 in docs/visual-testing/integrations/espresso.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/visual-testing/integrations/espresso.md#L256

[sauce.CurrentStatus] Remove 'currently'. The documentation reflects the current state of the product.
Raw output
{"message": "[sauce.CurrentStatus] Remove 'currently'. The documentation reflects the current state of the product.", "location": {"path": "docs/visual-testing/integrations/espresso.md", "range": {"start": {"line": 256, "column": 50}}}, "severity": "WARNING"}

Example:

```java
import com.saucelabs.visual.VisualCheckOptions;

visualClient.sauceVisualCheck("Long content page",
VisualCheckOptions.builder()
.fullPageScreenshot(withId(R.id.scrollView))
.build());
```

## Examples

Expand Down

0 comments on commit 642c40c

Please sign in to comment.