diff --git a/Docs/source/_static/img/alttester-editor/build-settings.png b/Docs/source/_static/img/alttester-editor/build-settings.png index 8180f39fb..15e16754c 100644 Binary files a/Docs/source/_static/img/alttester-editor/build-settings.png and b/Docs/source/_static/img/alttester-editor/build-settings.png differ diff --git a/Docs/source/_static/img/alttester-editor/popup.png b/Docs/source/_static/img/alttester-editor/popup.png index 586c0bd14..da58bcf6a 100644 Binary files a/Docs/source/_static/img/alttester-editor/popup.png and b/Docs/source/_static/img/alttester-editor/popup.png differ diff --git a/Docs/source/pages/advanced-usage.md b/Docs/source/pages/advanced-usage.md index 07b87272d..46e1e1d7b 100644 --- a/Docs/source/pages/advanced-usage.md +++ b/Docs/source/pages/advanced-usage.md @@ -609,6 +609,65 @@ Use [Reverse Port Forwarding](#what-is-reverse-port-forwarding-and-when-to-use-i On mobile devices, AltDriver can interact only with a single app at a time and the app needs to be in focus. In case of 2 drivers and 2 apps, you need to switch (in your test scripts) between the applications. This is due to the fact that on Android/iOS only one application is in focus at a time, even when using split screen mode. ``` +## Secure Mode (WSS) in AltTester® Unity SDK + +AltTester® Unity SDK can communicate with AltTester® Server using a **secure WebSocket +connection** (``wss://``). Secure mode encrypts all data exchanged between the +instrumented application and the server. + +To successfully establish a secure connection, the Unity SDK configuration, +AltTester® Server configuration, and client environment must match. + +### Enabling Secure Mode + +Secure mode is enabled in the instrumented application by activating the +**Secure Mode (WSS)** option, either by enabling the toggle in the AltTester® +Editor or by selecting the secure protocol in the AltTester® PopUp (green pop-up). + +When enabled: +- The Unity application connects to the server using ``wss://`` +- The AltTester® Server must be running in secure mode +- A valid TLS certificate must be configured on the server + +If secure mode is enabled in the SDK but the server is not configured for secure +connections, the connection will fail. + +Likewise, if the server runs in secure mode but secure mode is disabled in the SDK, +the connection will fail. + +```eval_rst +.. note:: + The Secure Mode (WSS) setting must always match the server configuration. +``` + +### Secure Mode in WebGL Builds + +For **WebGL instrumented builds**, secure mode has additional browser-specific +requirements. + +When using secure mode (``wss://``) in WebGL: +- The server URL must use HTTPS + (for example: ``https://127.0.0.1:13000``) +- The HTTPS endpoint must be **trusted by the browser** + +If the certificate is self-signed or not trusted by default, the browser will block +the connection. + +To allow the connection: +1. Open a new browser tab +2. Navigate to ``https://:`` + (for example: ``https://127.0.0.1:13000``) +3. Proceed through the browser security warning +4. Confirm that you want to continue to the unsafe site + +Once the URL is trusted, reload the WebGL application and retry the connection. + +```eval_rst +.. important:: + This step is required only once per browser session. Without explicitly trusting + the HTTPS endpoint, secure WebSocket connections from WebGL builds will now work. +``` + ## Execute tests concurrently In the `AltDriver` constructor you have the option to specify multiple tags. The available tags are: app name, platform, platform version, device instance id and app id. The app id can be used to uniquely identify an app. In case you specify no tags, the tests will be run on a randomly chosen app. diff --git a/Docs/source/pages/alttester-editor.md b/Docs/source/pages/alttester-editor.md index cce616be6..0594463f4 100644 --- a/Docs/source/pages/alttester-editor.md +++ b/Docs/source/pages/alttester-editor.md @@ -35,7 +35,11 @@ In the following sections you can see a breakdown of all the sections in the GUI ## Build Settings -![Build Settings Section Screenshot](../_static/img/alttester-editor/build-settings.png) +```eval_rst + .. figure:: ../_static/img/alttester-editor/build-settings.png + :scale: 60 % + +``` - *Company Name* @@ -45,20 +49,6 @@ In the following sections you can see a breakdown of all the sections in the GUI The product name (same with Unity's Player Settings). -- *Hide AltTester Popup Option* - - You can choose to hide the green AltTester popup by checking the "Hide Green Popup" option in the AltTester Editor. When checked, the popup will not be shown in the instrumented build. - - *Toggling the Popup at Runtime* - - You can show or hide it at any time using the following platform-specific shortcuts: - - - Windows: Press Ctrl + Alt + T - - MacOS: Press Ctrl + Opt + T - - Mobile (Android/iOS): Hold three fingers on the screen for one second. - -![Popup Screenshot](../_static/img/alttester-editor/popup.png) - - *Append "Test" to product name for AltTester® Unity SDK builds*: Will add "Test" to the product name. @@ -84,6 +74,32 @@ In the following sections you can see a breakdown of all the sections in the GUI You can also use the shortcut: - Press LeftCtrl + LeftShift + D + L to reset your connection data to the default values specified in the Build Settings. +- *Hide AltTester Popup Option* + + You can choose to hide the green AltTester popup by checking the "Hide Green Popup" option in the AltTester Editor. When checked, the popup will not be shown in the instrumented build. + + *Toggling the Popup at Runtime* + + You can show or hide it at any time using the following platform-specific shortcuts: + + - Windows: Press Ctrl + Alt + T + - MacOS: Press Ctrl + Opt + T + - Mobile (Android/iOS): Hold three fingers on the screen for one second. + +- *Secure Mode (WSS)* + + Enables or disables secure communication between the instrumented application + and the AltTester® Server. + + When enabled, the app will attempt to connect to the server using a secure + WebSocket connection (`wss://`). This option must be enabled if the AltTester® + Server is running in secure mode. + + If the server is not configured for secure connections, this option should be + disabled to allow standard WebSocket (`ws://`) communication. + +![Popup Screenshot](../_static/img/alttester-editor/popup.png) + ## Test run Settings ![Test run Settings Screenshot](../_static/img/alttester-editor/testrun-settings.png) diff --git a/Docs/source/pages/commands.md b/Docs/source/pages/commands.md index 874b9ac75..60318210e 100644 --- a/Docs/source/pages/commands.md +++ b/Docs/source/pages/commands.md @@ -59,6 +59,11 @@ An AltDriver instance will connect to the running instrumented Unity application - string - No - The unique ID of the Unity application. The default value is: `unknown` + * - secureMode + - boolean + - No + - Enables secure WebSocket communication (``wss://``). When set to `true`, the driver will attempt to connect to the AltTester® Server using a secure connection. The default value is: `false`. + .. tab:: Java @@ -106,6 +111,11 @@ An AltDriver instance will connect to the running instrumented Unity application - string - No - The unique ID of the Unity application. The default value is: `unknown` + * - secureMode + - boolean + - No + - Enables secure WebSocket communication (``wss://``). When set to `true`, the driver will attempt to connect to the AltTester® Server using a secure connection. The default value is: `false`. + .. tab:: Python @@ -132,7 +142,7 @@ An AltDriver instance will connect to the running instrumented Unity application * - enable_logging - boolean - No - - The default value is: `false` + - The default value is: `False` * - connect_timeout - int - No @@ -153,6 +163,11 @@ An AltDriver instance will connect to the running instrumented Unity application - string - No - The unique ID of the Unity application. The default value is: `unknown` + * - secure_mode + - boolean + - No + - Enables secure WebSocket communication (``wss://``). When set to `True`, the driver will attempt to connect to the AltTester® Server using a secure connection. The default value is: `False`. + .. tab:: Robot @@ -179,7 +194,7 @@ An AltDriver instance will connect to the running instrumented Unity application * - enable_logging - boolean - No - - The default value is: `false` + - The default value is: `False` * - connect_timeout - int - No @@ -200,6 +215,11 @@ An AltDriver instance will connect to the running instrumented Unity application - string - No - The unique ID of the Unity application. The default value is: `unknown` + * - secure_mode + - boolean + - No + - Enables secure WebSocket communication (``wss://``). When set to `True`, the driver will attempt to connect to the AltTester® Server using a secure connection. The default value is: `False`. + ```