Test Data Management

Learn about different test types and their data management techniques.

Test data management refers to creating and maintaining data within systems on which the test execution relies. Let us look at various test types and their corresponding data management techniques.

Unit test data

Unit tests have the luxury of mocking dependency interfaces to ensure that a given test method runs in a repeatable fashion. If there were no way to substitute dependencies with fake objects, unit tests would need to rely on real services and databases to have data that meets the expectations of a particular scenario. Thanks to mocking, managing test data for unit tests has become straightforward.

For example, to unit-test an API controller that retrieves a product, we only need to mock a repository that is the source of such information.

Get hands-on with 1200+ tech skills courses.