This presupposes you have added a unit test project to your solution. If not, create a new project in step 2 as you create the first test.
http://msdn.microsoft.com/en-us/library/jj851212(v=vs.103).aspx#CreateDBUnitTests
- Visual Studio - SQL Server Object Explorer - projects node db - Progammability - Stored Procedures.
- Right-click one of the stored procedures, and click Create Unit Tests to display the Create Unit Tests dialog box.
- Verify the Unit test project you are adding it to.
- Name the class something meaningful like TestProcDoesSomething.cs
- Select a connection. do you test locally on either (localdb) or localhost, or remotely on your dev or build server?
- Deploy the database project before testing if you are running this locally or on a personal dev vm. If running on build or shared dev boxes you may want to have something more explicit deploying.
- Add a test condition in the Test Conditions window. Note that scalar results are case sensitive since the programming language executing the test is C#.
- Right click - Properties - Add values for test and provide valid name.
- Delete the default inconclusive test condition.This test condition is included to indicate that test verification has not been implemented.
http://msdn.microsoft.com/en-us/library/jj851212(v=vs.103).aspx#CreateDBUnitTests
No comments:
Post a Comment