Testing is the integral part of software development. Poor testing methodologies lead to unstable products and unpredictable development times. It is very essential to have a testing plan in place to ensure that the product delivered is robust and stable and is delivered in a predictable timeline.
Standard development methodologies describe a set of general testing mechanisms which must be incorporated in the product development lifecycle. These mechanisms start from testing very small of code piece by piece to testing the whole application functionality in the end.
1) Unit Tests
This is the most basic testing mechanism at the developer level. This covers very narrow and well defined scope. We isolate the code from any outside interaction or any dependency on any module. Unit tests focus on very small unit of functionality. They cover the interaction of the code with memory only and do not cover any interaction with network, database or file systems. These dependencies are hard coded into the code while testing.
They provide a simple way to check smallest units of code and prove that units can work perfectly in isolation. However, we need to check further that when these units are combined they work in a cohesive manner which leads us to further types of tests.
2) Integration Tests
Integration Test forms the next class of tests at the developer level. They provide a mechanism to test the interoperation of smaller units. Integration test involve testing the modules which access network, databases and file systems. They reveal out the issues with network modules or databases and more importantly in the connections between small units of code. Often when the units are wired together there are issues. Unit A might not be giving data properly to the Unit B and these issues come up in the integration tests.
3) Functional Tests
After the integration tests are performed, higher level tests are used. Functional tests check for the correctness of the output with respect to the input defined in the specification. Not much emphasis is given on the intermediate values but more focus is given on the final output delivered.
4) Smoke Tests
Smoke Tests analogy comes from the electronics where a mistake means the circuit board giving out smoke. After functional tests are done a simple test is done from the start typically after a fresh installation and newer input values. Luckily there is no smoke in software industry but yeah, crashes are there to indicate trouble.
5) Regression Tests
Whenever complex bugs are patched in a system, typically which affect the core areas of the system, regression tests are used to re test all the modules of the system.
6) Acceptance Tests
These form the final level of test plan. Every feature is checked from the user’s perspective by the testing team and the feature is marked accepted or rejected. These tests test the application from end user’s perspective like detecting crashes after going through a certain flow. The results of these tests are very subjective in nature and it takes a while to figure out the exact issue in the code.