Skip to content

Commit

Permalink
Merge branch 'main' into time_zone
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach authored Aug 8, 2024
2 parents 3d8c2fa + b499f07 commit dd30815
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 24 deletions.
5 changes: 4 additions & 1 deletion docs/dev/test-configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,12 @@ Always use the latest Selenium version. The Selenium developers are very conscie

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

Allows the browser to communicate directly with servers without going through a proxy. By default, Sauce routes traffic from Internet Explorer and Safari through an HTTP proxy server so that HTTPS connections with self-signed certificates will work. The proxy server can cause problems for some users, and this setting allows you to avoid it.
Allows the browser to communicate directly with servers without going through a proxy that is shipped with Selenium versions prior to v3.
By default, Sauce routes traffic from Internet Explorer and Safari through an HTTP proxy server so that HTTPS connections with self-signed certificates will work.
The proxy server can cause problems for some users, and this setting allows you to avoid it.

:::note
This configuration is only relevant for Selenium versions 2.x and older.
Any test run with a Sauce Connect tunnel has to use the proxy and this flag will be ignored.
:::

Expand Down
20 changes: 10 additions & 10 deletions docs/secure-connections/sauce-connect-5/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Visit the following pages for installation instructions for your platform:

If you prefer to do custom installation, you can download Sauce Connect binaries from the following links.

SHA256 checksums are available [here](https://saucelabs.com/downloads/sauce-connect/5.1.1/checksums).
SHA256 checksums are available [here](https://saucelabs.com/downloads/sauce-connect/5.1.2/checksums).

<table>
<tr>
Expand All @@ -27,51 +27,51 @@ SHA256 checksums are available [here](https://saucelabs.com/downloads/sauce-conn
<tr>
<td rowspan="3">Linux x86_64</td>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.tar.gz">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.tar.gz</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.tar.gz">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.tar.gz</a>
</td>
</tr>
<tr>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_amd64.deb">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_amd64.deb</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_amd64.deb">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_amd64.deb</a>
</td>
</tr>
<tr>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.rpm">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.rpm</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.rpm">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.rpm</a>
</td>
</tr>
<tr>
<td rowspan="3">Linux arm64</td>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.tar.gz">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.tar.gz</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.tar.gz">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.tar.gz</a>
</td>
</tr>
<tr>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_arm64.deb">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_arm64.deb</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_arm64.deb">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_arm64.deb</a>
</td>
</tr>
<tr>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.rpm">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.rpm</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.rpm">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.rpm</a>
</td>
</tr>
<tr>
<td>macOS</td>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_darwin.all.zip">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_darwin.all.zip</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_darwin.all.zip">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_darwin.all.zip</a>
</td>
</tr>
<tr>
<td>Windows x86_64</td>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.x86_64.zip">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.x86_64.zip</a>
</td>
</tr>
<tr>
<td>Windows arm64</td>
<td>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.aarch64.zip">https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.aarch64.zip</a>
<a href="https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.aarch64.zip">https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.aarch64.zip</a>
</td>
</tr>
</table>
12 changes: 6 additions & 6 deletions docs/secure-connections/sauce-connect-5/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ defaultValue="ARM64"
<TabItem value="ARM64">

```bash
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_arm64.deb
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_arm64.deb
sudo dpkg -i sauce-connect.deb
```
</TabItem>

<TabItem value="x86-64">

```bash
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect_5.1.1.linux_amd64.deb
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect_5.1.2.linux_amd64.deb
sudo dpkg -i sauce-connect.deb
```

Expand Down Expand Up @@ -81,14 +81,14 @@ defaultValue="ARM64"
<TabItem value="ARM64">

```bash
sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.rpm
sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.rpm
```
</TabItem>

<TabItem value="x86-64">

```bash
sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.rpm
sudo rpm -i https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.rpm
```

</TabItem>
Expand Down Expand Up @@ -132,7 +132,7 @@ defaultValue="ARM64"
<TabItem value="ARM64">

```bash
curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.aarch64.tar.gz
curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.aarch64.tar.gz
sudo mkdir -p /opt/sauce-connect
sudo tar -C /opt/sauce-connect -xzf sauce-connect.tar.gz
```
Expand All @@ -141,7 +141,7 @@ sudo tar -C /opt/sauce-connect -xzf sauce-connect.tar.gz
<TabItem value="x86-64">

```bash
curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_linux.x86_64.tar.gz
curl -L -o sauce-connect.tar.gz https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_linux.x86_64.tar.gz
sudo mkdir -p /opt/sauce-connect
sudo tar -C /opt/sauce-connect -xzf sauce-connect.tar.gz
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Sauce Connect provides `.zip` package with a signed binary that can be used on a
### Unpack the zip file

```bash
curl -L -o sauce-connect.zip https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_darwin.all.zip
curl -L -o sauce-connect.zip https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_darwin.all.zip
sudo mkdir -p /opt/sauce-connect
sudo unzip -d /opt/sauce-connect sauce-connect.zip
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defaultValue="ARM64"

```bash
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.aarch64.zip -OutFile sauce-connect.zip
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.aarch64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
```
</TabItem>
Expand All @@ -29,7 +29,7 @@ Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect

```bash
mkdir C:\sauce-connect
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.1/sauce-connect-5.1.1_windows.x86_64.zip -OutFile sauce-connect.zip
Invoke-WebRequest -Uri https://saucelabs.com/downloads/sauce-connect/5.1.2/sauce-connect-5.1.2_windows.x86_64.zip -OutFile sauce-connect.zip
Expand-Archive -Path sauce-connect.zip -DestinationPath C:\sauce-connect
```

Expand Down
157 changes: 156 additions & 1 deletion docs/secure-connections/sauce-connect-5/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,164 @@ Logs are automatically rotated when running Sauce Connect Proxy 5 as a Linux Sys
For other setups, use the `logrotate` utility.

:::note
The logrotate integration in Linux and macOS will be available in upcoming **Sauce Connect Proxy 5.2**.
The logrotate integration in Linux and macOS is available in **Sauce Connect Proxy 5.1.2** and later.
:::

### Linux

When running as a Systemd service, logs are stored in `/var/log/sauce-connect` and rotated automatically.

For standalone runs, configure logrotate as follows:

1. Create a directory for log files:

First, create a directory for Sauce Connect log files or use existing one.
The directory needs to be writable by the user running Sauce Connect.

```bash
mkdir -p /path/to/sauce-connect/logs
```

1. Adjust Sauce Connect configuration to write logs to the log file:

Command line:

```bash
sc run ... --log-file /path/to/sauce-connect/logs/sc.log
```

Configuration file:

```yaml
log-file: /path/to/sauce-connect/logs/sc.log
```
1. Configure logrotate:
Create a logrotate configuration file `/etc/logrotate.d/sauce-connect` with the following content:

```
/path/to/sauce-connect/logs/sc.log {
size 100M
rotate 10
compress
maxage 30
postrotate
/usr/bin/killall -HUP sc
endscript
}
```
This configuration rotates the log file when it reaches 100MB, keeps 10 rotated files, compresses rotated files, and deletes files older than 30 days.
You can adjust these values to suit your needs.
For information on available logrotate config file options, check [`man logrotate`](https://linux.die.net/man/8/logrotate).
You can test the configuration with the following command.
```bash
logrotate -d /etc/logrotate.d/sauce-connect
```

### MacOS

1. Install logrotate:

First, ensure logrotate is installed via Homebrew.

```bash
brew install logrotate
```

1. Create a directory for log files:

Create a directory for log Sauce Connect files or use existing one.
The directory needs to be writable by the user running Sauce Connect.

```bash
mkdir -p /path/to/sauce-connect/logs
```

1. Adjust Sauce Connect configuration to write logs to the log file:

Command line:

```bash
sc run ... --log-file /path/to/sauce-connect/logs/sc.log
```

Configuration file:

```yaml
log-file: /path/to/sauce-connect/logs/sc.log
```
1. Configure logrotate:
Create logrotate configration directory.
```bash
sudo mkdir -p /usr/local/etc/logrotate.d
```

Create a logrotate configuration file `/usr/local/etc/logrotate.d/sauce-connect` with the following content:

```
/path/to/sauce-connect/logs/sc.log {
size 100M
rotate 10
compress
maxage 30
postrotate
/usr/bin/killall -HUP sc
endscript
}
```

This configuration rotates the log file when it reaches 100MB, keeps 10 rotated files, compresses rotated files, and deletes files older than 30 days.
You can adjust these values to suit your needs.


For information on available logrotate config file options, check [`man logrotate`](https://linux.die.net/man/8/logrotate).

You can test the configuration with the following command.

```bash
logrotate -d /usr/local/etc/logrotate.d/sauce-connect
```

1. Create run logrotate script:

Create `run_logrotate.sh` script with the following content:

```bash
#!/bin/sh
/opt/homebrew/sbin/logrotate -s /opt/homebrew/var/run/logrotate.status /usr/local/etc/logrotate.d/*
```

Set execute permissions for the script.

```bash
chmod 755 run_logrotate.sh
```

1. Set up periodic job:

The `periodic` utility runs scripts located in specific directories at daily, weekly, or monthly intervals.
Place your script in `/etc/periodic/daily` for daily execution.

```bash
sudo cp run_logrotate.sh /etc/periodic/daily/500.logrotate
```

Manually run the script to test it.

```bash
sudo periodic daily
```

Check the logs or the logrotate results to ensure it is functioning as expected.

### Windows

Open Terminal application to run the following commands.
Expand Down
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)

Loading

0 comments on commit dd30815

Please sign in to comment.