I have an on-premises Azure DevOps Server and have a VS2019 Solution that contains a database project (using SSDT). I have added some database unit tests to the solution and these run through correctly.
I have created a build pipeline for the database solution which builds the database project. I now want to add a task to the pipeline to execute the unit tests. The default task finds the unit tests in the solution and tries to execute them - however it is failing with the a SQL connection error 'The server was not found or was not accessible'.
The unit test project has an app.settings which has two connection strings to the same host (ExecutionContext and PrivilegedContext) - these connect using integrated security.
I have two questions:
1) How do I determine which host it is trying to connect to? or is there a variable I need to define?
2) In Azure DevOps server - how do I specify the account to run the unit tests under (so it can connect to the appropriate database server)?