Skip to content

Commit 0a946e3

Browse files
Merge pull request #510 from DavidRajnoha/test-config-interactive-setup
NO-JIRA: Test config interactive setup
2 parents 3f9afde + c5433f6 commit 0a946e3

2 files changed

Lines changed: 479 additions & 1 deletion

File tree

web/cypress/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ node_modules/ -> dependencies will be installed at runtime here
1717
## Running locally
1818

1919
### Export necessary variables
20-
in order to run Cypress tests, we need to export some environment variables that Cypress can read then pass down to our tests, currently we have following environment variables defined and used.
20+
in order to run Cypress tests, we need to export some environment variables that Cypress can read then pass down to our tests, currently we have following environment variables defined and used.
2121

2222
Using a non-admin user.
2323
```bash
@@ -62,6 +62,28 @@ Set the following var to use custom Monitoring Console Plugin UI plugin image. T
6262
export CYPRESS_MCP_CONSOLE_IMAGE=<Monitoring Console Plugin image>
6363
```
6464

65+
### Environment Configuration Script
66+
67+
The `configure-env.sh` script provides an interactive way to set up all the required environment variables. This script eliminates the need to manually export each variable and helps find the correct kubeconfig file.
68+
69+
**Features:**
70+
- Automatic prompting for all CYPRESS_ variables
71+
- Automatic discovery and numbered selection of `*kubeconfig*` files in `$HOME/Downloads` dir
72+
73+
**Usage:**
74+
```bash
75+
# Note: source command requires Bash shell
76+
source ./configure-env.sh
77+
```
78+
To export variables directly (Bash only).
79+
80+
**File generation**
81+
```bash
82+
./configure-env.sh
83+
```
84+
Creates an export file you can source later. (`source "export-env.sh`)
85+
86+
6587
### Before running cypress
6688
- Make sure cluster's kubeconfig file is located at the correct environment variable / path you have exported
6789
- The file to run Monitoring Plugin tests: bvt.cy.ts

0 commit comments

Comments
 (0)