We follow Test Driven Development - which means :
- Every piece of code we write must be tested automatically (than just manually).
- We write test cases "before" working code is developed. Worst case is that we write test cases after developing a working code. But in this case we do not want working code to got into git repository without accompaying its test cases
We couple it with Continuous Integration - which ensures that everytime someone in our team pushes their commit into git repository their commits are tested against the automated test cases before their code is merged into the repository.
The test cases we write can be categoriezed as follows :
- Testing 'code'. Referred as Unit tests. Cheapest to write. But least resemblance with testing done by a human tester.
- Testing 'services'. Referred as Integration testing. They test 'a sub system' and moderately resemble a human tester.
- Testing 'UI'. Referred as 'end to end' testing. They test the entire system. And completely resemble a human tester. Often costliest to write.
The above classification is elaborated better in Test Pyramid
At Smarter.Codes we employ all the 3 kinds of tests. Some tools we use at each level are :
- Selenium, Cypress.io for end to end testing
- Docker Compose for Integration Testing
- Any conventional unit testing framework for language of your choice
Further reading :