-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Slow Test Execution Time Reducing Developer Efficiency
Problem
The current test suite running via pnpm test
is taking too long to execute, which is reducing developer efficiency. Long test times slow down the development cycle, especially when running tests frequently during development.
Impact
- Reduced development velocity
- Developers may skip running tests locally due to long wait times
- Increased context switching as developers wait for tests to complete
- Longer CI/CD pipeline execution times
Current State
I've analyzed the test execution and identified several key factors contributing to the slow test performance:
-
Browser-based tests are particularly slow
- Tests involving browser initialization, navigation, and waiting for elements are taking 3-6 seconds each
- Browser tests account for a significant portion of the total test time
- Each browser test suite initializes a new browser instance
-
External dependencies slow down tests
- Many tests make real HTTP requests to external websites (e.g., https://the-internet.herokuapp.com)
- Network latency and external server response times add unpredictable delays
-
Long wait times and timeouts
- Default timeouts are set high (30000ms for browser operations)
- Many tests include explicit waits for elements or state changes
- Some tests intentionally simulate slow operations
-
Process handling in shell tests
- Shell tests start real processes and wait for them to complete
- Tests include sleep periods to allow processes to run
-
Sequential test execution
- Tests run sequentially rather than in parallel
- No selective test running capabilities for faster feedback cycles
I'll follow up with proposed solutions in the comments.
Metadata
Metadata
Assignees
Labels
No labels