Reputation: 65
We have already configure Azure Build Pipeline for the project and need to configure continuous automated unit & integration(with database) tests .
Project specification
Build-in .NET Core Unit and integration tests. To run the Integration tests a database is required. Database project (SSDT) is part of repository to use .dacpack for deployment.
What we are trying to achieve
We are expecting a report should be generated on each build with the following data:
Total Unit tests with pass/fail status. Total integration tests with pass/fail status.
Since we are using Azure Build Service where we are able to run the Unit tests successfully but not able to run Integration tests because we need a database for the same.
Upvotes: 1
Views: 702
Reputation: 1285
Use Service Containers
Add one to your build pipeline and use the SQL base image of your choice.
Build your SSDT project
Create a new DB on the container hosted SQL server
Deploy the Dacpac to the container hosted SQL server
Run your integration tests
Upvotes: 0