-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
Summary
Cypress test scripts that chain multiple cypress run invocations with && do not execute the second (or subsequent) runs when the first run fails. This leads to incomplete test coverage in CI and misleading pass/fail results.
Description
In frontend/package.json, several npm scripts run multiple Cypress suites in sequence using the shell operator &&. If the first cypress run exits with a non-zero status (e.g. one or more tests fail), the shell short-circuits and all following cypress run commands are never executed.
- Current behavior: First run fails → later runs are skipped → only the first suite's results are visible; overall run may still be reported as failed, but later suites are never run or reported.
- Expected behavior: All configured suites run regardless of individual pass/fail, and results (and JUnit reports, where used) reflect the full set of runs so that failures are visible per suite and CI can report complete status.
Affected scripts (kiali/kiali and kiali/openshift-servicemesh-plugin)
The following scripts are affected in frontend/package.json (and equivalent structure in the plugin repo where present):
| Script | Chained runs |
|---|---|
| cypress:run | core-1/core-2 → crd-validation → perses |
| cypress:run:ambient | @ambient → @waypoint → @waypoint-tracing |
| cypress:run:ambient-multi-primary | @ambient-multi-primary → @waypoint-multicluster |
| cypress:run:ambient:junit | @ambient → @waypoint → @waypoint-tracing (with JUnit reporter) |
| cypress:run:ambient-multi-primary:junit | @ambient-multi-primary → @waypoint-multicluster (with JUnit reporter) |
| cypress:run:junit | core-1/core-2 → crd-validation (with JUnit reporter) |
In each case, a failure in the first run prevents the second (and any further) run from executing.
Affected repositories and branches
- Repositories: kiali/kiali, kiali/openshift-servicemesh-plugin
- Branches: All release branches and main/master where these scripts exist (same package.json script definitions).
Suggested direction (for implementation)
- Run all suites in a single pass where possible (e.g. single cypress run with combined tags), or
- Use a runner that always executes every suite and then aggregates exit codes (e.g. run each cypress run in a loop or script; collect results; exit non-zero if any suite failed), so that:
- Every suite runs even if a previous one failed.
- JUnit/reporting still gets results from all suites.
- CI gets a single, accurate pass/fail that reflects the full matrix.