by Chance Smith
Here are some quick thoughts about writing tests that I hear a lot.
These help us test the right things and have more confience without needing 100% coverage.
Mental models for when and how to create tests. These give your team confience while still having time for work and a positive impact on your business goals.
- keep your frontend really dumb, abstract the logic and test that part
- don’t test what you don’t own
- start with a failing test, then go pass it
- test the expectations of the software given by your customer and end-user
- write just enough of a failing test, and then write just enough code to pass the test, and repeat
- don’t let the tests get in the way of creating features
- don’t let the bugs repeat by adding a test first
- don’t go for gold first
- first test if you got nothin, and then test for the unexpected
- testing is designing, documenting, and validating how the function will be used
[last updated: 01/26/2023]
Do you struggle writing tests, but see the benefits? Reach out with questions on Twitter, LinkedIn, or by email. I’d love to help.