Skip to content

Commit 6a75bb4

Browse files
committed
docs(cypress): Add test configuration scenarios overview
Add high-level scenarios table showing common testing configurations (Released Version, Pre-provisioned, Local Dev, Custom Images, FBC, Konflux) and test areas (Monitoring, COO, Incidents, Virtualization). Remove redundant Configuration Examples section. Simplify Incidents documentation to reference COO section.
1 parent edce6c4 commit 6a75bb4

File tree

1 file changed

+40
-84
lines changed

1 file changed

+40
-84
lines changed

web/cypress/README.md

Lines changed: 40 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,33 @@ Creates `export-env.sh` that you can source later: `source export-env.sh`
5858

5959
---
6060

61+
## Test Configuration Scenarios
62+
63+
All scenarios require the [standard variables](#required-variables) (`CYPRESS_BASE_URL`, `CYPRESS_LOGIN_IDP`, `CYPRESS_LOGIN_USERS`, `CYPRESS_KUBECONFIG_PATH`).
64+
65+
### General Scenarios
66+
67+
| Scenario | Key Variables | Description |
68+
|----------|---------------|-------------|
69+
| **Released Version** | `CYPRESS_COO_UI_INSTALL=true` | Install operators from redhat-operators catalog. Production-like testing. |
70+
| **Pre-provisioned COO** | `CYPRESS_SKIP_COO_INSTALL=true`, optionally `CYPRESS_COO_NAMESPACE=<ns>` | COO already installed. Tests still enable the monitoring plugin. Specify namespace if non-default. |
71+
| **Pre-provisioned Virtualization** | `CYPRESS_SKIP_KBV_INSTALL=true` | OpenShift Virtualization already installed. |
72+
| **Local Dev / PR Testing** | `CYPRESS_SKIP_ALL_INSTALL=true` | Run UI locally via `make start-feature-frontend` ([details](../../README.md#development)). Skips all setup. |
73+
| **Custom Images** | `CYPRESS_MP_IMAGE`, `CYPRESS_MCP_CONSOLE_IMAGE`, `CYPRESS_CHA_IMAGE`, `CYPRESS_CUSTOM_COO_BUNDLE_IMAGE` | Patch component images in the CSV, or replace the operator bundle. Combine with an installation method above. |
74+
| **FBC Image** | `CYPRESS_FBC_STAGE_COO_IMAGE` | Install COO from File-Based Catalog image. For release validation. |
75+
| **Konflux CI Bundle** | `CYPRESS_KONFLUX_COO_BUNDLE_IMAGE=<image>` | Install COO from Konflux CI bundle. For PR/CI testing. |
76+
77+
### Test Areas
78+
79+
| Area | Description | Run Command |
80+
|------|-------------|-------------|
81+
| **Monitoring (CMO)** | Core monitoring tests against CMO stack. No additional operator installation needed. | `npm run test-cypress-monitoring` |
82+
| **COO (Perses, Dashboards, Incidents)** | Requires COO installation. | `npm run test-cypress-coo` |
83+
| **Incidents** | COO subset. Set `CYPRESS_TIMEZONE` to match cluster timezone. | `npm run test-cypress-incidents` |
84+
| **Virtualization** | Requires OpenShift Virtualization (KubeVirt) installation. | `npm run test-cypress-virtualization` |
85+
86+
---
87+
6188
## Environment Variables Reference
6289

6390
### Required Variables
@@ -127,88 +154,6 @@ export CYPRESS_MOCK_NEW_METRICS=true
127154

128155
---
129156

130-
## Configuration Examples
131-
132-
### Example 1: Testing with Non-Admin User
133-
134-
```bash
135-
export CYPRESS_BASE_URL=https://console-openshift-console.apps.cluster.example.com
136-
export CYPRESS_LOGIN_IDP=flexy-htpasswd-provider
137-
export CYPRESS_LOGIN_USERS=testuser:testpassword
138-
export CYPRESS_KUBECONFIG_PATH=~/Downloads/kubeconfig
139-
```
140-
141-
### Example 2: Testing with Kubeadmin
142-
143-
```bash
144-
export CYPRESS_BASE_URL=https://console-openshift-console.apps.cluster.example.com
145-
export CYPRESS_LOGIN_IDP=kube:admin
146-
export CYPRESS_LOGIN_USERS=kubeadmin:admin-password
147-
export CYPRESS_KUBECONFIG_PATH=~/Downloads/kubeconfig
148-
```
149-
150-
### Example 3: Testing Custom Plugin Build
151-
152-
```bash
153-
# Required variables
154-
export CYPRESS_BASE_URL=https://...
155-
export CYPRESS_LOGIN_IDP=flexy-htpasswd-provider
156-
export CYPRESS_LOGIN_USERS=username:password
157-
export CYPRESS_KUBECONFIG_PATH=~/Downloads/kubeconfig
158-
159-
# Custom image
160-
export CYPRESS_MP_IMAGE=quay.io/myorg/monitoring-plugin:my-branch
161-
export CYPRESS_MCP_CONSOLE_IMAGE=quay.io/myorg/monitoring-console-plugin:my-branch
162-
```
163-
164-
### Example 4: Testing Custom cluster-health-analyzer Build
165-
166-
For CI jobs testing PRs to cluster-health-analyzer:
167-
168-
```bash
169-
# Required variables
170-
export CYPRESS_BASE_URL=https://...
171-
export CYPRESS_LOGIN_IDP=flexy-htpasswd-provider
172-
export CYPRESS_LOGIN_USERS=username:password
173-
export CYPRESS_KUBECONFIG_PATH=~/Downloads/kubeconfig
174-
175-
# Custom cluster-health-analyzer image built from PR
176-
export CYPRESS_CHA_IMAGE=quay.io/myorg/cluster-health-analyzer:pr-123
177-
178-
# Use COO bundle (required for incidents feature testing)
179-
export CYPRESS_KONFLUX_COO_BUNDLE_IMAGE=quay.io/rhobs/observability-operator-bundle:latest
180-
```
181-
182-
### Example 5: Pre-Provisioned Cluster (Skip Installations)
183-
184-
```bash
185-
# Required variables
186-
export CYPRESS_BASE_URL=https://...
187-
export CYPRESS_LOGIN_IDP=flexy-htpasswd-provider
188-
export CYPRESS_LOGIN_USERS=username:password
189-
export CYPRESS_KUBECONFIG_PATH=~/Downloads/kubeconfig
190-
191-
# Skip installations (cluster already configured)
192-
export CYPRESS_SKIP_ALL_INSTALL=true
193-
```
194-
195-
### Example 6: Configurable COO Namespace
196-
197-
Set the following var to specify the Cluster Observability Operator namespace. Defaults to `openshift-cluster-observability-operator` if not set. This is useful when testing with different namespace configurations (e.g., using `coo` instead of the default).
198-
```bash
199-
export CYPRESS_COO_NAMESPACE=openshift-cluster-observability-operator
200-
```
201-
202-
### Example 7: Debug Mode
203-
204-
```bash
205-
# Required variables + debug
206-
export CYPRESS_DEBUG=true
207-
export CYPRESS_SESSION=true # Faster test execution
208-
```
209-
210-
---
211-
212157
## Running Cypress
213158

214159
### Interactive Mode (GUI)
@@ -447,9 +392,20 @@ cypress/
447392

448393
---
449394

450-
### Incident Detection Test Documentation
395+
## Incident Detection Test Documentation
396+
397+
For configuration scenarios, see [COO Tests](#test-configuration-scenarios) above.
398+
399+
### Incidents-Specific Variables
400+
401+
| Variable | Default | Description |
402+
|----------|---------|-------------|
403+
| `CYPRESS_TIMEZONE` | `UTC` | Cluster timezone for incident timeline calculations |
404+
| `CYPRESS_MOCK_NEW_METRICS` | `false` | Transform old metric names to new format in mocks |
405+
406+
### Test Case Documentation
451407

452-
Test documentation for the Incidents feature is available at [`docs/incident_detection/tests/`](../../docs/incident_detection/tests/) in the repository root.
408+
Detailed test documentation: [`docs/incident_detection/tests/`](../../docs/incident_detection/tests/)
453409

454410
---
455411

0 commit comments

Comments
 (0)