- On “unit tests vs integration tests”
- Uni tetss
- Unit Test: A test written by a programmer for the purpose of ensuring that the production code does what the programmer expects it to do. (For the moment we will ignore the notion that unit tests also aid the design, etc.) (Source) > A unit is the smallest testable part of any software. Unit testing is performed to validate that each unit of an application performs as expected. If an external dependency(a method or a function) is called in the unit being tested, such function/method must be mocked, so as to test only the unit of interest. (Source)
- Integration tests
- Integration Test: A test written by architects and/or technical leads for the purpose of ensuring that a sub-assembly of system components operates correctly. These are plumbing tests. They are not business rule tests. Their purpose is to confirm that the sub-assembly has been integrated and configured correctly. (Source) > Integration tests verify that different modules or services used by your application work well together. For example, it can be testing the interaction with the database or making sure that microservices work together as expected (Source)
- Uni tetss
2020-12-09