Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
99e7fe0
Add Phase 1 E2E tests and test categorization markers
samsternberg Jan 8, 2026
55244e0
Add test matrix parallelization strategy document
samsternberg Jan 8, 2026
8385043
Implement E2E test matrix parallelization
samsternberg Jan 8, 2026
626a9f7
Fix workflow syntax and chatbot test assertions
samsternberg Jan 8, 2026
67a31fa
Fix pr-summary job dependencies
samsternberg Jan 8, 2026
962668c
Update pr-summary to use matrix e2e-tests job
samsternberg Jan 8, 2026
6ab2128
Restructure E2E tests to use verticalized matrices
samsternberg Jan 8, 2026
6dcb279
Fix E2E test job dependencies - tests must complete before seeding data
samsternberg Jan 8, 2026
aded12f
Complete production workflow matrix migration
samsternberg Jan 8, 2026
4321673
Fix E2E tests when deployment skipped - fetch URLs from CloudFormation
samsternberg Jan 8, 2026
3f90afe
Apply URL fetching fix to production workflow
samsternberg Jan 8, 2026
89532b0
Trigger landing deployment for E2E test validation
samsternberg Jan 8, 2026
658976b
Fix landing E2E tests - wait for all vertical UIs to deploy
samsternberg Jan 8, 2026
47da473
Fix deploy-landing-ui dependencies - add UI jobs to needs array
samsternberg Jan 8, 2026
18d225f
Simplify deploy-landing-ui conditions - remove blocking on vertical UI
samsternberg Jan 8, 2026
0250e88
Remove vertical UI dependencies from deploy-landing-ui
samsternberg Jan 8, 2026
d389002
Fix deploy-landing-ui - remove infra dependencies entirely
samsternberg Jan 8, 2026
c01064e
Add vertical-specific change outputs to detect-changes job
samsternberg Jan 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/actions/run-e2e-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ description: Run E2E tests for a specific vertical with Selenium/Chrome

inputs:
vertical:
description: 'Vertical name (insurance/retail/landing)'
description: 'Vertical name (insurance/retail/healthcare/landing)'
required: true
category:
description: 'Test category (smoke/api/ui/lifecycle) - runs all tests if not specified'
required: false
default: ''
web-url:
description: 'Web URL for the vertical'
required: true
Expand Down Expand Up @@ -47,4 +51,14 @@ runs:
HEADLESS: 'true'
run: |
cd tests/e2e
pytest -v --tb=short -m "${{ inputs.vertical }}"

# Build marker expression based on inputs
MARKER="${{ inputs.vertical }}"

# Add category filter if specified
if [ -n "${{ inputs.category }}" ]; then
MARKER="${MARKER} and ${{ inputs.category }}"
fi

echo "Running tests with marker: ${MARKER}"
pytest -v --tb=short -m "${MARKER}"
325 changes: 243 additions & 82 deletions .github/workflows/deploy-production.yml

Large diffs are not rendered by default.

395 changes: 288 additions & 107 deletions .github/workflows/deploy-test.yml

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions tests/e2e/TEST-MATRIX-STRATEGY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# E2E Test Matrix Parallelization Strategy

## Overview
Split E2E tests into categories (smoke/api/ui/lifecycle) and run them in parallel per vertical using GitHub Actions matrix strategy.

## Test Categories

### Smoke Tests (fast, ~30-60s per vertical)
- Page loads, navigation exists, basic rendering
- No API calls, minimal interactions
- Run on every PR

### API Tests (~2-3min per vertical)
- Create/read/delete via API
- Backend integration, data persistence
- Run on every PR

### UI Tests (~3-4min per vertical)
- Interactive workflows: buttons, forms, modals
- Customer portals, chatbots, data seeding
- Run on every PR

### Lifecycle Tests (~5-7min per vertical)
- Complete user journeys (quote→policy→claim)
- Cross-entity workflows
- Run on main branch merges (optional for PRs)

## Matrix Configuration

```yaml
strategy:
fail-fast: false
matrix:
include:
# Insurance (12 tests total: 2 smoke, 3 api, 4 ui, 1 lifecycle)
- vertical: insurance
category: smoke
deploy_job: deploy-insurance-ui
- vertical: insurance
category: api
deploy_job: deploy-insurance-ui
- vertical: insurance
category: ui
deploy_job: deploy-insurance-ui
- vertical: insurance
category: lifecycle
deploy_job: deploy-insurance-ui

# Retail (13 tests total: 5 smoke, 5 api, 2 ui, 1 lifecycle)
- vertical: retail
category: smoke
deploy_job: deploy-retail-ui
- vertical: retail
category: api
deploy_job: deploy-retail-ui
- vertical: retail
category: ui
deploy_job: deploy-retail-ui
- vertical: retail
category: lifecycle
deploy_job: deploy-retail-ui

# Healthcare (11 tests total: 5 smoke, 4 api, 1 ui, 1 lifecycle)
- vertical: healthcare
category: smoke
deploy_job: deploy-healthcare-ui
- vertical: healthcare
category: api
deploy_job: deploy-healthcare-ui
- vertical: healthcare
category: ui
deploy_job: deploy-healthcare-ui
- vertical: healthcare
category: lifecycle
deploy_job: deploy-healthcare-ui

# Landing (7 tests total: 4 smoke, 3 ui)
- vertical: landing
category: smoke
deploy_job: deploy-landing-ui
- vertical: landing
category: ui
deploy_job: deploy-landing-ui
```

## Benefits

1. **Parallelization**: 14 jobs run concurrently instead of 4 sequential
2. **Fast feedback**: Smoke tests (4 jobs) complete in ~1 min
3. **Targeted reruns**: Failed API tests don't require rerunning UI tests
4. **Resource efficiency**: Lifecycle tests can be main-only
5. **Clear organization**: Failures immediately show which category broke

## Timing Estimates

### PR Workflow (parallel execution):
- Smoke tests: **1 minute** (4 jobs × 30-60s)
- API tests: **3 minutes** (3 jobs × 2-3min)
- UI tests: **4 minutes** (4 jobs × 3-4min)
- **Total PR time: ~4 minutes** (vs 16 minutes sequential)

### Main Branch (adds lifecycle):
- Lifecycle tests: **7 minutes** (3 jobs × 5-7min)
- **Total main time: ~7 minutes** (parallel)

## Test Count Summary

- **Insurance**: 8 → 12 tests (+4 Phase 1)
- **Retail**: 12 → 13 tests (+1 Phase 1)
- **Healthcare**: 6 → 11 tests (+5 Phase 1)
- **Landing**: 7 tests (unchanged)
- **Total**: 33 → 43 tests (+10 Phase 1)

## Implementation

1. ✅ Add api/ui/lifecycle markers to pytest.ini
2. ✅ Tag all existing tests with category markers
3. ✅ Write Phase 1 new tests (10 tests)
4. ✅ Update run-e2e-tests action to support category parameter
5. 🔄 Replace individual test jobs with matrix in deploy-test.yml
6. 🔄 Replace individual test jobs with matrix in deploy-production.yml
7. ⏳ Verify all tests pass in new structure
3 changes: 3 additions & 0 deletions tests/e2e/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ markers =
customer: Customer portal tests
slow: Slow tests
vertical: Multi-vertical architecture tests
api: API integration tests
ui: UI interaction tests
lifecycle: Full lifecycle workflow tests

# Test discovery
python_files = test_*.py
Expand Down
Loading