Websites and web tools
Testing Framework Selection Checklist
A testing framework runs automated checks on your code: that a booking form rejects a past date, that a price calculation is right, that the checkout page loads. If you commission or maintain a web app for a shop or dealership, this checklist helps you judge a developer's choice of framework or make your own, without needing to know every option on the market.
Know the three layers first
| Layer | What it tests | Speed | How many you want |
|---|---|---|---|
| Unit tests | One function, such as a labour-cost calculation | Milliseconds each | Many |
| Integration tests | Several parts together, such as saving a booking to the database | Fractions of a second to seconds | Some |
| End-to-end tests | A real browser clicking through the site | Seconds to tens of seconds each | Few, on the critical paths |
Some frameworks cover one layer; some cover two. Most projects use a unit and integration framework plus a separate browser automation tool for end-to-end tests.
The checklist
Fit
- It is the common choice for your language and web framework, so examples and help are easy to find.
- It works with your build tools without unusual configuration.
- It supports the kind of code you have, such as async functions or server-rendered pages.
Developer experience
- Failure messages show the expected and actual values clearly.
- It can run one test file or one test on its own.
- It has a watch mode that re-runs tests when files change.
- Mocking time, network calls and dates is straightforward; booking logic depends on all three.
Automation
- It runs headless in your continuous integration service.
- It produces reports in a standard format, such as JUnit XML.
- It can run tests in parallel.
- It reports coverage, or works with a coverage tool.
Long-term health
- It has regular releases and an active issue tracker.
- Its licence suits commercial use.
- Upgrades between major versions are documented.
Worked example: how long will the suite take?
Suppose a booking app has 400 unit tests at about 5 ms each, 40 integration tests at about 0.3 seconds each and 8 end-to-end tests at about 20 seconds each. The totals are 2 seconds, 12 seconds and 160 seconds, or 174 seconds in all.
Mistakes to avoid
- Choosing a framework for a feature you will never use.
- Writing mostly end-to-end tests because they feel more real, then living with slow, flaky runs.
- Testing implementation details so every refactor breaks dozens of tests.
- Letting failing tests stay red until everyone ignores them.
- Skipping tests for date and time-zone logic, a frequent source of booking bugs.