Skip to content

Commit de14257

Browse files
committed
docs: add "Features of running on a localhost" doc
1 parent 12abd53 commit de14257

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# APIHUB UI auto-tests
22
This project is used to create and run auto-tests, primarily for UI E2E. The framework used is [Playwright](https://playwright.dev/).
33

4+
[Features of running on a **localhost**](docs/localhost-run.md)
5+
46
## Contents
57
- [Installation](#installation)
68
- [Environment variables](#environment-variables)
@@ -26,7 +28,7 @@ Before starting test execution, you need to set environment variables in any con
2628

2729
**TEST_USER_PASSWORD** - The password that will be used by test users.
2830

29-
**PLAYGROUND_BACKEND_HOST** - Only Required for testing on **localhost**. The host that will be used in the test to create a custom server for sending requests. More information can be found at the [link](https://github.com/Netcracker/qubership-apihub/issues/18).
31+
**PLAYGROUND_BACKEND_HOST** - Only Required for testing on **localhost**. The host that will be used in the test to create a custom server for sending requests. More information can be found at the [link](docs/localhost-run.md).
3032

3133
**DEV_PROXY_MODE** - Only Required for testing on **localhost** in dev proxy mode.
3234

docs/localhost-run.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Features of running on a localhost
2+
To test the "Playground" via a localhost, in playwright tests, you need to set a value for the `PLAYGROUND_BACKEND_HOST` environment variable, it will be used in the test to create a custom server for sending requests.
3+
In case of using Docker Compose, this is `http://host.docker.internal:8081` (protocol + value of the `APIHUB_URL` variable from the [qubership-apihub-backend.env](https://github.com/Netcracker/qubership-apihub/blob/main/docker-compose/qubership-apihub-backend.env) file). Also, you need to add the variable `ALLOWED_HOSTS=host.docker.internal` to the [qubership-apihub-backend.env](https://github.com/Netcracker/qubership-apihub/blob/main/docker-compose/qubership-apihub-backend.env) file.
4+
5+
In case of using docker compose + dev proxy, in addition to the previous settings, in playwright tests, you need to add the variable `DEV_PROXY_MODE=true`, to skip tests that cannot be executed in this mode.
6+
7+
8+
| | Live environment | Docker compose | Docker compose + dev proxy |
9+
| --------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
10+
| Playground tests | ✔️ | ✔️ `ALLOWED_HOSTS=host.docker.internal` - in docker compose<br>`PLAYGROUND_BACKEND_HOST=http://host.docker.internal:8081` - in tests | ✔️ `ALLOWED_HOSTS=host.docker.internal` - in docker compose<br>`PLAYGROUND_BACKEND_HOST=http://host.docker.internal:8081` - in test |
11+
| Tests with rediretcs to the Agent | ✔️ | ✔️ | ❌ Skipped with `DEV_PROXY_MODE=true` - in tests |
12+
| Expand/collapse the Package page sidebar test | ✔️ | ✔️ | ❌ Skipped with `DEV_PROXY_MODE=true` - in tests |

0 commit comments

Comments
 (0)