The Test step
Last modified: November 18, 2024
Synopsis
Runs unit tests on a deployed database.
Description
The Test step in the CI/CD pipeline is a crucial phase that ensures the quality and stability of your database by running unit tests on a deployed database. This step validates that the recent changes to the database schema, configurations, and data migration scripts have not introduced any issues or unexpected behavior.
How to create the Test step
Click Add build step and select the Test a database using tSQLt step as shown below:
Next, provide the Package ID, the names of the server and the database that you want to test.
Customization options
- Database package to test
Provide a package id.
- Temporary database server
Select where dbForge DevOps Automation for SQL Server will recreate and validate your database - on your local server or on the specified SQL Server.
If you choose the SQL Server option, you’ll need to provide the following information to establish a connection to the specified SQL Server instance:
-
Server name
-
Database name
-
Authentication method: select between Windows Authentication and SQL Server Authentication
-
User name and password (for SQL Server Authentication)
- Run tests
Select whether to run every test or selected tests only. If you select to run the selected tests only, you will need to specify their names.
Advanced customization options
- Generate test data
Select to use dbForge Data Generator to populate your temporary database with test data. If you select this option, you will need to provide a path to the dbForge Data Generator project file.
- Schema Compare options
Specify additional Schema Compare options.
- Schema Compare filter
Specify a path to an alternative filter file which will be used for validating the schema to override *.scflt filter file present in the input.