简体   繁体   English

编写单元测试用例

[英]writing unit test cases

In my project we are dealing with database (SQL server 2008). 在我的项目中,我们正在处理数据库(SQL Server 2008)。 Reading, inserting, deleting and updating data. 读取,插入,删除和更新数据。 Some of the SQL script is created by xml automation tool and some are manually written by developer. 一些SQL脚本是由xml自动化工具创建的,而某些是由开发人员手动编写的。 Most of the times we face issues by manual missing entry and automated generated scripts. 在大多数情况下,我们会因手动缺少条目和自动生成脚本而面临问题。 I would lie to write unit test cases for that scripts just to take care so that we will not face issues after checkin the code. 我会撒谎为脚本编写单元测试用例,只是要小心,以使我们在签入代码后不会遇到问题。 so my question is that is it a good way to write unit test cases for these scripts? 所以我的问题是,为这些脚本编写单元测试用例是一种好方法吗?

如果您想测试您的SQL,那么我建议您看一下SQL Server数据工具 ,其中包括可以通过Visual Studio 2010和2012运行的数据库UT。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM