Integration testing with data stores
One of the most common systems that you will interact with integration tests are data stores, and they require special handling.
The schema for your data stores should be treated like code and be tracked in a source control system like Git. This allows you to keep all the schema changes over time in sync with changes to code that works on data in that structure.
The database schema includes table structure, index definitions, views, and stored procedures. For a SQL-based database, these are defined in SQL script files. You should also consider reference data, which is data that should be inserted into the database to prepopulate it. For example, you might need to add about 200 rows to a CountryRegion
table used by your project for location lookups.
Developer instances of the database and migrations
Each developer in a team should have their own instance of the database to work with locally. This is so that tests run by different...