Industrial manufacturing
A test suite that had never passed, repaired and extended
- Industry
- Industrial manufacturing
- Engagement
- Contract through Resultstack
- When
- 2026
- Stack
- TypeScript
- Express
- Vite
- Playwright
- Vitest
- Jest
The challenge
An industrial manufacturer had a browser test suite that had never been green, 0 of 103 passing, and no unit or integration tests at all. A red suite on every run had stopped telling anyone anything, so defects kept coming back.
The approach
- Drove the application directly, outside the suite, to settle whether the application was broken or the test harness was. The application was healthy.
- Fixed the harness itself: setup steps without a usable timeout, fixed waits longer than the test limit, unstable element ids, and nothing that started the app before the tests ran.
- Audited whether a pass would mean anything. Tests that skipped when data was missing, or swallowed their own errors, were repaired or removed.
- Added a unit and integration layer where none existed, on the code paths the browser tests miss or reach differently. Job, part and subtask validation alone has 129 unit tests behind it, and it runs on both the server and the screens, so a rule is covered whichever route a user took to save.
- Kept browser tests for the paths that matter, aiming both layers at the areas with the most reported defects.
- Broke the code on purpose under every new test, watched the test catch it, and restored the code.
The result
The browser suite was repaired from 0 of 103 passing to 111, and a unit and integration layer that did not exist was added: 458 tests. With all four pull requests merged that is 569 tests, 111 browser, 207 client and 251 server, 530 of them added. The work also surfaced production defects, each with its fix written in its own pull request.
See it measured
Read the method and its limitsMerge the pull requests
Every test, one square each
0 of 103 browser tests passing, and 0 unit or integration tests
Browser suite repaired to 111 passing, and 458 unit and integration tests added: 569 in all, 530 of them new
- Browser 111
- Client 207
- Server 251
Each square is one test, drawn the same size in both grids. Squares are grouped by layer and coloured by it; they do not stand for individual named tests.
Verdict
The browser suite went from reporting nothing to catching real defects, with a unit and integration layer behind it.
Have a system that needs this kind of work?
Tell me what is slow, fragile or missing, and I will tell you how I would measure it first. I reply within two business days.