32
The Four Stages Of Full Software Testing
👉Testing software is crucial to assure that it does what we expect it to do, and to catch problems as early as possible to speed up the development process.
👉The process of testing can be divided into 4 stages, starting from writing code and ending with deploying to production.
This includes tests that fail fast
- A total run time of 5 minutes or less is preferred.
- Unit tests
- Testing isolated units of behavior.
- Controller tests
- For example, Given that we send a POST request to this endpoint, it should fail because the parameters are invalid.
- Database tests
- For example, Given those records in the DB, this method should get them.
- Coding standards tests
- This test fails because at file X you have 5 empty lines.
-
Acceptance tests
- For example, When user X logs in and orders a new book, we should create a new order request and send an email.
Performance tests.
Configuration tests.
Any other tests that we want to run prior to release.
This stage comes after building the software and attaching all its components together.
- Smoke test
- Test the system's most important features.
- Sign-in, book purchase, etc...
- Canary release testing🐤
- Releasing the new version of the system to places of low impact.
- For example, Netflix uses Canary releasing by releasing new updates to geographic locations in the world where it's 1 AM so if any failure happens, only few people experience it.🤫
- Test the system's most important features.
- Exception tracking.
This stage is executed after the system is deployed to production and is under use.
- Can it scale up/down?
- Is it using a lot of memory/disk/CPU?
- What is the request response time?
- Do performance metrics match predications?
- Security.
- For example Netflix has teams to test those aspects and try to break the system.
- Chaos monkeys, Latency monkeys, Security monkeys🐒
This material in this post is mainly derived from Dave Farley amazing video on testing.
32