VBScript、ASP 代码和 SQL Server 2000 的单元测试 [英] Unit Testing for VBScript, ASP Code and SQL Server 2000

查看:57
本文介绍了VBScript、ASP 代码和 SQL Server 2000 的单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在(经典)ASP 和 SQL Server 2000 中实现了一个非常古老的项目.出于质量问题,我一直在考虑实现某种形式的自动化质量测试的可能性.虽然,网页是 ASP 项目,但实际上 85% 是 SQL Server 存储过程、函数、视图和 DTS.(大量依赖于 DTS)SQL Server 生成大量代码.

I have a very old project implemented in (classic) ASP and SQL Server 2000. Because of quality concerns, I've been considering the possibility of implementing some form of automated quality testing. Though, the web pages are ASP the project is really 85% SQL Server stored procedure, functions, views and DTS. (Lots of dependency on DTS) A lot of code generation occurs from SQL Server.

关于 DTS,我们希望可能 将数据库升级到 SQL Server2005 -- 如果不能在 DTS 上设置单元测试,那么 SSIS 呢?

In regards to the DTS, we are hoping to possibly upgrade the database to SQL Server 2005 -- so If unit testing can't be setup on DTS, what about SSIS?

我找到了 ASPUnit,但它似乎不再被维护......

I've found ASPUnit but it no longer seems to be maintained...

至于我的问题,这确实是一个多部分的问题.

As for my question, it is really a multi-part question.

  1. 对 ASP 进行单元测试是否可行且可行?
  2. 对 SQL Server 对象进行单元测试是否可行且可行?(我在这方面看到了一些成功,但也有些沮丧)
  3. 是否有当前受支持的可用于 ASP 和 SQL Server 的测试框架?
  4. 是否有其他软件质量控制方法可以对此类代码库进行单元测试?(任何一般性建议也会有所帮助.谢谢.)
  5. 另外,我一直在考虑在这样的项目中实施自动化测试的投资回报率.项目很大.我不知道有多少代码,但有数百个文件,数千(如果不是数百万)行代码.鉴于此,让我们回到 1 和 3.

我对这个项目的处境真的很糟糕;任何一般的质量控制建议将不胜感激......

推荐答案

听起来你的问题实际上比单元测试更高.我认为您的主要问题最好在集成测试级别得到解决.

It sounds like your problems are actually at a higher level than unit tests. I'd argue that your major issues would be best solved at an integration test level.

由于您的页面主要由 SQL 生成,asp 单元测试仅涵盖一小部分问题,因此通过使用自动化工具(例如 watinieunit/.

Since your pages are generated largely by SQL, asp unit tests will only cover a small percentage of issues, so you will have better coverage by testing the end pages using an automated tool such as watin or ieunit/.

您可以从单元测试的角度来考虑这些,但它们实际上是在测试集成后的最终结果,而不是测试较小功能的结果.尽管您可能会错过一些较低级别的更改,但您正在绕过底层设计问题.

You can think of these in terms of unit testing, but they are really testing the end result after integration instead of testing the results of smaller functions. Although you may miss some lower level changes, you are bypassing the underlying design issues.

只要您的最终结果保持不变,您的测试就不会关心该区域的内容是来自 asp 还是 SQL.

As long as your end result remains the same, your test will not care whether the area's content came from asp or SQL.

这篇关于VBScript、ASP 代码和 SQL Server 2000 的单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆