I have a suite of SQL Server Database Unit Tests built in Visual Studio 2013 to test stored procedures and functions. The tests run fine against my local database but I also want them to be run against a DEV server's DB as part of a CI process.
To achieve this I am building the test DLL and copying both the DLL and config file to the DEV server and then running the command line vstest.console.exe to test. This works fine on my local machine but when I try to run it on DEV I get the following exception for each test:
An error occurred while SQL Server unit testing settings were being read from the configuration file. Click the test project, open the SQL Server Test Configuration dialog box from the SQL menu, add the settings to the dialog box, and rebuild the project.
I have tried using slow cheetah to ensure that an App.Config transform is applied before the solution is built and I can see that the transform is being applied in the config file, but still my tests fail.
Has anyone figured out a way to do this? It seems strange that the DLL has to be rebuilt to consume connection string changes in a config file.
I also tried following the suggestions in this post but without success.