views:

311

answers:

3

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.

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?

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

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

  1. Is it possible and practical to Unit Test ASP?
  2. Is it possible and practical to Unit Test SQL Server objects? (I've seen some success on this but some discouragement too)
  3. Is there a currently supported testing framework that is usable with both ASP and SQL Server?
  4. Are there any alternative software quality control methods to unit testing this type of code base? (Any general advise would also be helpful. Thank you.)
  5. Also, I've been considering the ROI on implementing automated testing in a project like this. The project is big. I don't know how much code but hundreds of files, thousands (if not millions) of lines of code. Given this, lets go back to 1 and 3.

I'm really in a bad situation with this project; any general quality control advise would be greatly appreciated...

+1  A: 

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.

chills42
So, the question becomes does WatiN work with classic ASP? I see no indication to say it does. I do see that ieunit to be a great possibility. We could do a good percentage of testing with that...
Frank V
Oh, and thank you for your reply.
Frank V
With the support from Leslie, I think this is the answer I needed. Again, thank you.
Frank V
+1  A: 

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

Michal
Might be a possible solution in addition to the others too. Thank you.
Frank V
+2  A: 

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.

Leslie
Thank you for the extra info.
Frank V