unit test
1 TopicSQL Server Unit Test Project using Visual Studio
Hello All, I have created SQL Unit Test project using the built-in Visual Studio Test project. I am able to create test cases for all scenarios using Pre-Test, Test and Post-Test conditions. Also, I am able to create the Database in run-time using DACPAC. All these are fine till now. The problem I am facing is, I am not able to drop the database post execution of all my test cases. I have tried the following approaches where it failed to drop the database: 1. Custom scripts to forcefully drop the database in the finally block of the last test case 2. Order the test cases and in the Post-Test script of the last test case, added the drop script Is there a way that this can be achieved? All I need in short is - Drop the database at the end of my test execution of the last test case. Please can you help me with this or point me in the right direction? Thanks Aravind S2.1KViews0likes2Comments