Chapter 9: DevOps Flashcards
Unit tests
These tests ensure that the smallest testable aspect of your code works as expected, even in isolation, by running tests against individual units of code without the full environment.
External variables are mocked with fake versions—for instance, a database would be mocked during a unit test to ensure that the code does exactly what it’s intended to do, even with a fake integration.
Integration tests
These tests ensure that the components and modules of code integrate and work properly with one another and are typically run before major commits that involve many components or the builds for new releases.
Integration tests are based on the environment, including all the integrations. For instance, if your application depends on a database and your integration test fails, the test results could identify issues with any of the variables in the environment. Integrations tests are the responsibility of your overall team. QA individuals can develop and build them, but be aware that as developers create and modify code, this can lead to integration tests breaking as a result of improper new code or the need to update your integration tests to incorporate the newly introduced changes.
End-to-end tests
In these tests, an application is run from beginning to end to test the flow of the application and to ensure that the system can be validated for integration and data integrity.