7.1 KiB
Cypress E2E Test Execution Report
Date: April 5, 2026 Test Environment: React App (localhost:3001) vs Angular Reference (localhost:3000) Test Duration: 46 seconds Status: FAILED - Critical Application Stability Issue
Executive Summary
The Cypress e2e test suite experienced complete failure due to a critical issue: the React application crashes during the test run after processing only the first few test files. All 40 test files were discovered and attempted, but the React server becomes unresponsive (ECONNREFUSED errors) after approximately 8-10 minutes into execution.
Test Execution Results
Overall Statistics
- Total Test Files: 40
- Total Tests (Potential): 897
- Tests Executed: 56 (before app crash)
- Tests Passing: 0
- Tests Failing: 56
- Tests Skipped: 841
- Success Rate: 0%
Critical Failure Pattern
All failures are identical: CypressError: cy.visit() failed - Error: connect ECONNREFUSED 127.0.0.1:3001
This indicates the React development server crashes or becomes unresponsive when Cypress attempts to run multiple tests in succession.
Test File Breakdown
Successfully Started (Before App Crash)
- components/button.cy.ts - 1 failure (beforeEach hook), 4 skipped
- components/datepicker.cy.ts - 1 failure (beforeEach hook), 36 skipped
- components/input.cy.ts - 1 failure (beforeEach hook), 47 skipped
- components/modal.cy.ts - 1 failure (beforeEach hook), 38 skipped
- components/tabs.cy.ts - 1 failure (beforeEach hook), 34 skipped
- error-handling/form-validation.cy.ts - 1 failure, 7 skipped
- error-handling/network-errors.cy.ts - 1 failure, 7 skipped
- error-handling/performance.cy.ts - 1 failure, 5 skipped
- error-handling/session-timeout.cy.ts - 4 failures (3 seconds duration)
- flight-details/fares.cy.ts - 1 failure, 56 skipped
- flight-details/flight-info.cy.ts - 1 failure, 57 skipped
- flight-details/passenger-info.cy.ts - 1 failure, 50 skipped
- flight-details/seat-selection.cy.ts - 1 failure, 49 skipped
- flight-details/services.cy.ts - 1 failure, 23 skipped
- i18n/currency.cy.ts - 1 failure, 4 skipped
- i18n/date-localization.cy.ts - 1 failure, 6 skipped
- i18n/language-switching.cy.ts - 1 failure, 7 skipped
- i18n/locale-persistence.cy.ts - 6 failures (4 seconds duration)
- i18n/text-direction.cy.ts - 1 failure, 4 skipped
- navigation/404.cy.ts - 5 failures (3 seconds duration)
- navigation/back-forward.cy.ts onwards - ALL FAILED with ECONNREFUSED
Files Never Executed
- navigation/breadcrumb.cy.ts
- navigation/links.cy.ts
- navigation/routes.cy.ts
- online-board/** (all 5 files)
- responsive/** (all 5 files)
- schedule/** (all 5 files)
- base.spec.ts
Root Cause Analysis
Primary Issue: React App Instability
The React development server at localhost:3001 crashes or becomes unresponsive when:
- Cypress rapidly loads the application multiple times (beforeEach hooks)
- Tests execute in quick succession with no delays
- The app is under sustained network load from test automation
Evidence
- Manual
curl http://localhost:3001/works fine outside of test execution - The app becomes unresponsive exactly when Cypress reaches tests 8-10
- Error pattern is consistent:
ECONNREFUSED 127.0.0.1:3001 - No beforeEach hook ever completes successfully
Secondary Issues (Cannot Be Verified Due to Primary Crash)
Since no tests ran successfully, the following cannot be validated:
- UI component rendering
- data-testid attribute presence
- Route functionality
- Navigation between pages
- Component functionality matching Angular
Detailed Test Results Summary
| Test File | Tests | Duration | Status | Notes |
|---|---|---|---|---|
| components/button.cy.ts | 5 | 868ms | FAILED | BeforeEach hook failure |
| components/datepicker.cy.ts | 37 | 843ms | FAILED | BeforeEach hook failure |
| components/input.cy.ts | 48 | 854ms | FAILED | BeforeEach hook failure |
| components/modal.cy.ts | 39 | 862ms | FAILED | BeforeEach hook failure |
| components/tabs.cy.ts | 35 | 847ms | FAILED | BeforeEach hook failure |
| error-handling/* | 22 | ~800ms ea | FAILED | BeforeEach hook failures |
| flight-details/* | 240 | ~850ms ea | FAILED | BeforeEach hook failures |
| i18n/* | 31 | ~800ms ea | FAILED | BeforeEach hook failures |
| navigation/* | 19 | 844ms-3sec | FAILED | App crash at 404.cy.ts |
| online-board/* | 188 | N/A | SKIPPED | App crashed before execution |
| responsive/* | 31 | N/A | SKIPPED | App crashed before execution |
| schedule/* | 162 | N/A | SKIPPED | App crashed before execution |
| base.spec.ts | 1 | 826ms | FAILED | App crash confirmed |
Critical Failures Identified
Failure Type 1: Server Connection Refused (ALL)
Error: connect ECONNREFUSED 127.0.0.1:3001
- Occurs: During cy.visit() in beforeEach hooks
- Impact: Prevents all test execution
- Severity: CRITICAL
Failure Type 2: Test Skipping (Cascading)
- When beforeEach fails, all subsequent tests in that file are automatically skipped
- 841 tests skipped due to 56 failures
Recommendations
Immediate Actions Required
-
Investigate React App Stability
- Check for memory leaks in React dev server
- Review Vite configuration for resource limits
- Enable verbose logging in React app during test runs
- Check for unhandled exceptions in React code
-
Check for Port Conflicts
- Verify localhost:3001 is exclusively available
- Check for port reuse or TIME_WAIT issues
- Monitor network connections during test run:
netstat -an | grep 3001
-
Review React Component Rendering
- Some component may cause infinite loops or hangs on mount
- Check for race conditions in async component initialization
- Review hooks for effects that might crash
-
Examine Test Infrastructure
- Add delays between tests (cy.wait, cy.pause)
- Run tests serially instead of in batch
- Add health checks between test files
- Consider running fewer tests per Cypress session
Investigation Steps
# Monitor React app during test run
npm run dev -- --clearScreen false 2>&1 | tee react-dev.log
# Run Cypress with detailed debugging
DEBUG=cypress:* npm run cypress:run
# Monitor port status
lsof -i :3001
# Check system resources
top -l1 | head -20
Next Steps
- Identify which component or React code causes the crash
- Stabilize React dev server under load
- Implement test retry logic and backoff
- Consider running tests with separated browser instances
- Add server health checks in test suite
- Consider using a production build instead of dev server for testing
Screenshots
Failure screenshots have been captured in /Users/gnezim/_projects/tims/flights_web_raw/Aeroflot.Flights.Web/e2e/cypress/screenshots/
Conclusion
The React application requires critical stability fixes before meaningful e2e testing can proceed. The current test suite cannot validate any functionality because the development server becomes unresponsive after the first 8-10 tests. This indicates a fundamental problem with how the React app handles rapid page loads or multiple concurrent connections from the test automation framework.