Shadow Tests
| Key | Value |
|---|
| Status | Active |
| Owner | QA Automation |
| Updated | 2026-03-26 |
| Scope | Continuous background monitoring of site navigation across all 6 CNC sites |
Shadow tests exist because deploys are not the only time sites break. Menu items disappear. Sections redirect. Category pages return 404. These changes happen in content, CMS config, or infrastructure — not code deploys — and smoke tests run too rarely to catch them quickly. Shadow tests run every 4 hours, continuously, and check that key navigation paths on each site are still reachable.
What The Suite Does
| Capability | What It Means |
|---|
| navigation matrix per site | each site has a list of known menu items tested in every run |
| required vs optional items | some navigation failures hard-fail the test; others are logged as warnings |
| priority levels | high / medium / low per menu item |
| direct URL fallback | if link click fails, test can navigate directly to verify the destination |
| on-failure screenshot | JPEG screenshot attached to run for debugging |
Current Shape
| Metric | Current Snapshot |
|---|
| total tests | 6 |
| spec files | 6 (one per site in tests/shadow/) |
| schedule | every 4 hours (cron: 0 /4 ) |
| sites covered | 6 |
Each spec has exactly one test: navigation matrix. The test navigates each menu item in sequence and records pass/fail per item.
Navigation Items Per Site
Auto (8 items)
| Label | Path | Priority | Required |
|---|
| Novinky | /novinky | high | yes |
| Testy | /testy | high | yes |
| Elektromobilita | /elektromobilita | high | yes |
| Motorsport | /motorsport | medium | no |
| Veteran | /veteran | medium | no |
| Podcasty | /podcasty | low | no |
| Design | /design | low | no |
| Video | /video | medium | no |
Blesk (6 items)
| Label | Path | Priority | Required |
|---|
| Celebrity | /celebrity | high | no |
| Zprávy | /zpravy | high | no |
| Sport | isport.blesk.cz | high | no |
| Krimi | /krimi | medium | no |
| Politika | /zpravy/politika | medium | no |
| Tlapky | /tlapky | low | no |
E15 (5 items)
| Label | Path | Priority | Required |
|---|
| Ekonomika | /ekonomika | high | yes |
| Byznys | /byznys | high | yes |
| FINEXPERT | finexpert | medium | no |
| Reality | /reality | medium | no |
| Průmysl | /prumysl | medium | no |
iSport (9 items)
| Label | Path | Priority | Required |
|---|
| Fotbal | /fotbal | high | yes |
| Hokej | /hokej | high | yes |
| Tenis | /tenis | medium | no |
| Motorsport | /motorsport | medium | no |
| Basket | /basket | medium | no |
| Premium | /premium | medium | no |
| Atletika | /atletika | medium | no |
| Bojové sporty | /bojove-sporty | low | no |
| Cyklistika | /cyklistika | low | no |
Opinio (1 item)
| Label | Path | Priority | Required |
|---|
| Publikace | /publikace | high | yes |
Reflex (6 items)
| Label | Path | Priority | Required |
|---|
| Komentáře | /komentare | high | yes |
| Premium | /premium | high | yes |
| Video | /video | medium | no |
| Fotogalerie | /fotogalerie | medium | no |
| Kultura | /kultura | medium | no |
| Věda | /veda | low | no |
Full Test List
| Site | Test Name | Navigation Items |
|---|
| Auto | navigation matrix | 8 items (3 required) |
| Blesk | navigation matrix | 6 items (0 required) |
| E15 | navigation matrix | 5 items (2 required) |
| iSport | navigation matrix | 9 items (2 required) |
| Opinio | navigation matrix | 1 item (1 required) |
| Reflex | navigation matrix | 6 items (2 required) |
Test Assertions
Each navigation matrix test makes two assertions:
| Assertion | Meaning |
|---|
required_failures === 0 | all required navigation items were reachable |
successful_navigations > 0 | at least one item was successfully navigated to |
Optional items that fail are recorded in metrics but do not fail the test.
How To Run
| Command | What It Does |
|---|
npm run test:shadow | All 6 tests, all sites |
npm run test:shadow -- --grep "blesk" | Blesk only |
npm run test:shadow -- --grep "auto" | Auto only |
npm run test:headed | Headed browser |
Shadow vs Smoke
| Shadow | Smoke |
|---|
| purpose | continuous navigation monitoring | rapid health check before/after deploys |
| frequency | every 4 hours | before deploys + on demand |
| what it checks | specific menu items and category paths | basic load + header + article click + menu opens |
| depth per check | navigates to destination, verifies URL | clicks element, verifies page changes |
| test count | 6 (1/site) | 12 (2/site) |
| duration | ~5 minutes total | ~30 seconds |
When Shadow Fails
| Failure Type | Likely Cause | First Step |
|---|
| required item fails | category page removed or URL changed | check site navigation manually |
| all items fail for one site | site is down or consent blocking | check smoke tests |
| one optional item fails | section temporarily unavailable | monitor next run; skip if persistent |
successful_navigations === 0 | network issue or consent not dismissed | check consent handler config |
Shadow failures post to Slack via the standard alert webhook. Each failure includes site name, menu item label, expected URL path, and timestamp.
Related Pages