Unit Testing for VBScript, ASP, and SQL Server 2000

I have a very old project implemented in (classic) ASP and SQL Server 2000. Due to quality issues, I am considering introducing some form of automated quality testing. However, ASP Web pages are truly an 85% SQL Server stored procedure, function, view, and DTS. (Most of the dependency on DTS). A lot of code generation comes from SQL Server.

As for DTS, we hope to upgrade the database to SQL Server 2005 - so if unit testing cannot be configured for DTS, what about SSIS?

I found ASPUnit , but it is no longer supported ...

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

  • Is Unit Test ASP possible and practical?
  • Is it possible and possible to use Unit Test SQL Server objects? (I saw some success on this, but some disappointment too)
  • Is there a currently supported test environment that can be used for both ASP and SQL Server?
  • Are there alternative software quality control methods for testing this type of code base? (Any general advice would also be helpful. Thanks.)
  • In addition, I am considering ROI for the implementation of automated testing in such a project. The project is big. I don’t know how much code, but hundreds of files, thousands (if not millions) lines of code. Given this, we return to 1 and 3.

I am really bad at this project; Any general quality control advice would be greatly appreciated ...

+7
sql-server unit-testing asp-classic qa dts
source share
4 answers

It looks like your problems are actually higher than unit tests. I would say that your main problems are best solved at the integration level.

Since your pages are generated primarily by SQL, asp module tests cover only a small percentage of the problems, so you will have better coverage by testing your final pages using an automated tool like watin or ieunit / .

You can think of it from the point of view of unit testing, but they really check the final result after integration instead of checking the results of smaller functions. While you may be able to skip some of the lower level changes, you bypass the main design issues.

Until your end result changes, your test doesn’t care if the contents of the scope are obtained from asp or SQL.

+3
source share

WATiN will work just fine. It controls the browser, so it doesn’t care what language the code is written in, either good or bad code, or intended to be checked or not. This is regression testing, not unit testing. But this is a great place to start.

You can use your device testing tool: nUnit, mbUnit, MSTest, etc.

+5
source share

You can take a look at ajaxed unit tests . (The library is still supported)

+1
source share

For the sql update itself (and any other changes in the sql code), I would look at the Sql Unit (did not use it) or something similar for implementing unit tests only in the database.

You can do this along with any other testing strategies you have chosen.

Remember the disadvantages for testing through the user interface: http://blog.objectmentor.com/articles/2010/01/04/ui-test-automation-tools-are-snake-oil . Understand that user interface tests are usually fragile when designers want to make changes that should be okay for them. However, for a rigorous upgrade of SQL versions, you must be fine.

0
source share

All Articles