Unit Testing for VBScript, ASP Code and SQL Server 2000

亡梦爱人 提交于 2019-12-03 13:23:11

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.

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.

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

WATiN will work great. It manipulates the browser, so it doesn't care what language the code is written in, or whether the code is good or bad, or designed for testability or not. It is regression testing, not unit testing. But that's an excellent place to start.

You can use your unit testing tool of choice: nUnit, mbUnit, MSTest, etc.

You might have a look at ajaxed unit tests. (The library is still maintained)

For the sql upgrade itself (and any other changes to sql code), I would have a look at Sql Unit (haven't used it) or something similar to implement unit tests on just the database.

You can do this alongside whatever other testing strategies you select.

Do be aware of the downsides to testing through the UI: http://blog.objectmentor.com/articles/2010/01/04/ui-test-automation-tools-are-snake-oil. Understand that tests via UI are generally fragile when designers want to make changes that should be OK for them to make. For strictly upgrading SQL versions, however, you should be fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!