Skip to content

Commit ee9e1a7

Browse files
authored
Updated AltTester Unity SDK docs (#1917)
1 parent 30a6021 commit ee9e1a7

File tree

5 files changed

+112
-17
lines changed

5 files changed

+112
-17
lines changed
65.9 KB
Loading
90.8 KB
Loading

Docs/source/pages/advanced-usage.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,65 @@ Use [Reverse Port Forwarding](#what-is-reverse-port-forwarding-and-when-to-use-i
609609
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.
610610
```
611611

612+
## Secure Mode (WSS) in AltTester® Unity SDK
613+
614+
AltTester® Unity SDK can communicate with AltTester® Server using a **secure WebSocket
615+
connection** (``wss://``). Secure mode encrypts all data exchanged between the
616+
instrumented application and the server.
617+
618+
To successfully establish a secure connection, the Unity SDK configuration,
619+
AltTester® Server configuration, and client environment must match.
620+
621+
### Enabling Secure Mode
622+
623+
Secure mode is enabled in the instrumented application by activating the
624+
**Secure Mode (WSS)** option, either by enabling the toggle in the AltTester®
625+
Editor or by selecting the secure protocol in the AltTester® PopUp (green pop-up).
626+
627+
When enabled:
628+
- The Unity application connects to the server using ``wss://``
629+
- The AltTester® Server must be running in secure mode
630+
- A valid TLS certificate must be configured on the server
631+
632+
If secure mode is enabled in the SDK but the server is not configured for secure
633+
connections, the connection will fail.
634+
635+
Likewise, if the server runs in secure mode but secure mode is disabled in the SDK,
636+
the connection will fail.
637+
638+
```eval_rst
639+
.. note::
640+
The Secure Mode (WSS) setting must always match the server configuration.
641+
```
642+
643+
### Secure Mode in WebGL Builds
644+
645+
For **WebGL instrumented builds**, secure mode has additional browser-specific
646+
requirements.
647+
648+
When using secure mode (``wss://``) in WebGL:
649+
- The server URL must use HTTPS
650+
(for example: ``https://127.0.0.1:13000``)
651+
- The HTTPS endpoint must be **trusted by the browser**
652+
653+
If the certificate is self-signed or not trusted by default, the browser will block
654+
the connection.
655+
656+
To allow the connection:
657+
1. Open a new browser tab
658+
2. Navigate to ``https://<host>:<port>``
659+
(for example: ``https://127.0.0.1:13000``)
660+
3. Proceed through the browser security warning
661+
4. Confirm that you want to continue to the unsafe site
662+
663+
Once the URL is trusted, reload the WebGL application and retry the connection.
664+
665+
```eval_rst
666+
.. important::
667+
This step is required only once per browser session. Without explicitly trusting
668+
the HTTPS endpoint, secure WebSocket connections from WebGL builds will now work.
669+
```
670+
612671
## Execute tests concurrently
613672

614673
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.

Docs/source/pages/alttester-editor.md

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ In the following sections you can see a breakdown of all the sections in the GUI
3535

3636
## Build Settings
3737

38-
![Build Settings Section Screenshot](../_static/img/alttester-editor/build-settings.png)
38+
```eval_rst
39+
.. figure:: ../_static/img/alttester-editor/build-settings.png
40+
:scale: 60 %
41+
42+
```
3943

4044
- *Company Name*
4145

@@ -45,20 +49,6 @@ In the following sections you can see a breakdown of all the sections in the GUI
4549

4650
The product name (same with Unity's Player Settings).
4751

48-
- *Hide AltTester Popup Option*
49-
50-
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.
51-
52-
*Toggling the Popup at Runtime*
53-
54-
You can show or hide it at any time using the following platform-specific shortcuts:
55-
56-
- Windows: Press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>
57-
- MacOS: Press <kbd>Ctrl</kbd> + <kbd>Opt</kbd> + <kbd>T</kbd>
58-
- Mobile (Android/iOS): Hold three fingers on the screen for one second.
59-
60-
![Popup Screenshot](../_static/img/alttester-editor/popup.png)
61-
6252
- *Append "Test" to product name for AltTester® Unity SDK builds*:
6353

6454
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
8474
You can also use the shortcut:
8575
- Press <kbd>LeftCtrl</kbd> + <kbd>LeftShift</kbd> + <kbd>D</kbd> + <kbd>L</kbd> to reset your connection data to the default values specified in the Build Settings.
8676

77+
- *Hide AltTester Popup Option*
78+
79+
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.
80+
81+
*Toggling the Popup at Runtime*
82+
83+
You can show or hide it at any time using the following platform-specific shortcuts:
84+
85+
- Windows: Press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>
86+
- MacOS: Press <kbd>Ctrl</kbd> + <kbd>Opt</kbd> + <kbd>T</kbd>
87+
- Mobile (Android/iOS): Hold three fingers on the screen for one second.
88+
89+
- *Secure Mode (WSS)*
90+
91+
Enables or disables secure communication between the instrumented application
92+
and the AltTester® Server.
93+
94+
When enabled, the app will attempt to connect to the server using a secure
95+
WebSocket connection (`wss://`). This option must be enabled if the AltTester®
96+
Server is running in secure mode.
97+
98+
If the server is not configured for secure connections, this option should be
99+
disabled to allow standard WebSocket (`ws://`) communication.
100+
101+
![Popup Screenshot](../_static/img/alttester-editor/popup.png)
102+
87103
## Test run Settings
88104
![Test run Settings Screenshot](../_static/img/alttester-editor/testrun-settings.png)
89105

Docs/source/pages/commands.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ An AltDriver instance will connect to the running instrumented Unity application
5959
- string
6060
- No
6161
- The unique ID of the Unity application. The default value is: `unknown`
62+
* - secureMode
63+
- boolean
64+
- No
65+
- 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`.
66+
6267
6368
.. tab:: Java
6469
@@ -106,6 +111,11 @@ An AltDriver instance will connect to the running instrumented Unity application
106111
- string
107112
- No
108113
- The unique ID of the Unity application. The default value is: `unknown`
114+
* - secureMode
115+
- boolean
116+
- No
117+
- 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`.
118+
109119
110120
.. tab:: Python
111121
@@ -132,7 +142,7 @@ An AltDriver instance will connect to the running instrumented Unity application
132142
* - enable_logging
133143
- boolean
134144
- No
135-
- The default value is: `false`
145+
- The default value is: `False`
136146
* - connect_timeout
137147
- int
138148
- No
@@ -153,6 +163,11 @@ An AltDriver instance will connect to the running instrumented Unity application
153163
- string
154164
- No
155165
- The unique ID of the Unity application. The default value is: `unknown`
166+
* - secure_mode
167+
- boolean
168+
- No
169+
- 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`.
170+
156171
157172
.. tab:: Robot
158173
@@ -179,7 +194,7 @@ An AltDriver instance will connect to the running instrumented Unity application
179194
* - enable_logging
180195
- boolean
181196
- No
182-
- The default value is: `false`
197+
- The default value is: `False`
183198
* - connect_timeout
184199
- int
185200
- No
@@ -200,6 +215,11 @@ An AltDriver instance will connect to the running instrumented Unity application
200215
- string
201216
- No
202217
- The unique ID of the Unity application. The default value is: `unknown`
218+
* - secure_mode
219+
- boolean
220+
- No
221+
- 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`.
222+
203223
204224
```
205225

0 commit comments

Comments
 (0)