Engineering Decisions · Junior · Question 11 of 12
A small team has one day to add tests before a launch. The checkout flow earns all the revenue and has never been covered. What do you write first?
- 1A few end-to-end tests of the checkout path
- 2Unit tests for every checkout component
- 3Snapshot tests for all of the checkout pages
Show the answer
Correct answer: A few end-to-end tests of the checkout path
Explanation
A few end-to-end tests cover the whole money path in little time and catch the failures that hurt most. Unit tests fit complex logic such as price calculation, and they run fast, but they don't prove the pages work together. Snapshots fit stable output where any change matters, yet on a changing UI they mostly produce noise.