单元测试,SQL服务器单元测试 [英] Unit testing, SQL server unit testing
本文介绍了单元测试,SQL服务器单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个涉及测试简单SQL查询的项目,如SELECT,INSERT,UPDATE和DELETE。
VS 2010/2012是测试环境。我知道如何使用MS unit Testing框架测试SP。但是根据要求,我需要测试上面说的SQL命令/查询,而不将这些语句包装在SP中。
请帮助我。
谢谢,
Raghuveer
我尝试过:
尝试使用VS 2010测试SP
Hi,
I am working on a Project that involves testing a Simple SQL Query like, SELECT, INSERT, UPDATE AND DELETE.
The VS 2010/ 2012 is the test environment. I know how to test a SP using MS unit Testing framework. But as per the requirement I need to test the above said SQL Commands / Queries as well without wrapping these statements in a SP.
Please help me.
Thanks,
Raghuveer
What I have tried:
Tried testing the SP using VS 2010
推荐答案
您可以尝试TSQLT - 数据库单元测试SQL SERVER的框架,允许您在T-SQL中实现单元测试。
它是开源的,你可以在这里找到它: tSQLt - SQL Server的数据库单元测试 [ ^ ]
You might try TSQLT - THE DATABASE UNIT TESTING FRAMEWORK FOR SQL SERVER, which allows you to implement unit tests in T-SQL.
It is open source and you can find it here: tSQLt - Database Unit Testing for SQL Server[^]
这篇关于单元测试,SQL服务器单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文