SQL Server database continuous integration workflow POPULATE step – Populating the newly built SQL database with data

In the third part of the continuous integration aka “CI” workflow, the Populate step will be described.

After the Build step is successfully finished, where a new database is built directly from latest changes in source control, the Populate step is initiated. In this step, non static tables in the newly built database from the source control repository will be populated with test data.

We already populated our static tables with data in the Build step. While extracting our objects we checked the setting “Include static data” that will pull all static data found in the repository and will load it into the tables created from object scripts.

For transactional tables, or tables that generally hold the bulk of the dynamic data in a database, the task is to populate those with automatically generated synthetic test data.

Create test data

ApexSQL Generate is a tool that can populate SQL databases with test data using multiple generators for each column. It supports a full range of SQL data types and has an ability to recognize them in a loaded SQL database and provide real-world test data based on contained data types. It can generate: randomized test data using the Random generator and various options, and using the Regular expression generator, sequential data using the Incremental generator, and much more.

To follow the instructions to implement this step, read these articles:

In the next article, the fourth step of the CI workflow, the Test step, will be described.

All articles in this series:

  1. SQL Server database continuous integration workflow COMMIT step – Initially committing a SQL database to a source control repository
  2. SQL Server database continuous integration workflow BUILD step – Building a new SQL QA database from source control
  3. SQL Server database continuous integration workflow POPULATE step – Populating the newly built SQL database with data
  4. SQL Server database continuous integration workflow TEST step – Running SQL unit tests against the changes
  5. SQL Server database continuous integration workflow SYNC step – Creating the synchronization/migration script
  6. SQL Server database continuous integration workflow DOCUMENT step – Creating database documentation

A complete SQL Server CI/CD solution

Please see the ApexSQL CI/CD toolkit for a complete, end to end SQL Sever CI/CD solution including full, open source PowerShell scripts. Learn more

 

May 20, 2016