14

I've been researching automated testing of classic ASP websites to help bring my company into the late 1990's. We run an application made up of ~14K classic ASP pages, with ASP .NET slowly gaining more of a share.

We've introduced unit tests for our core .NET functionality, but I was curious: how do others handle unit testing and automated testing for classic ASP? Especially with respect to testing both back end code, and front end pages.

Thanks, tmcg

Cheran Shunmugavel
  • 8,319
  • 1
  • 33
  • 40
tmcg
  • 175
  • 1
  • 6

4 Answers4

5

maybe this helps? asp ajaxed Creating unit tests for classic asp

generally you need to create some infrastructure (all just vbscript code) and then you are able to do the following:

<!--#include virtual="/ajaxed/class_TestFixture/testFixture.asp"-->
<%
set tf = new TestFixture
tf.allEnvs = true
tf.run()

sub test_1()
    tf.assert 1 = 1, "1 is not equal 1"
end sub

sub test_2()
    tf.assert 1 = 2, "1 is not equal 1"
end sub
%>

test_1 would be successful and test_2 would fail obviously.

you can find the source code of that asp ajaxed framework here

there you can have a look at the testFixture.asp class

ulluoink
  • 2,775
  • 2
  • 17
  • 22
  • Your link is dead and your answer is now very little help. I'll check the WaybackMachine when I can but it would be great if you could update it. – RyanfaeScotland Nov 01 '17 at 08:59
  • @RyanfaeScotland updated description with some text and working links – ulluoink Nov 02 '17 at 14:53
  • Brilliant, thanks and thanks more for the reply, I'd forgotten about this question and had meant to come back to it. If it is of help this is now the website for the project: http://www.asp-ajaxed.org/ no to use an archive (although I found this using the archive, to get to the git repo, to find the updated homepage). – RyanfaeScotland Nov 02 '17 at 15:12
2

We use Selenium successfully with an array of positive and negative tests to make sure that the pages properly function, that the back-end handles issues with bad user input and that appropriate success and error messages are displayed to the user.

This doesn't provide unit testing but it does a good job of making sure our old Classic ASP code continues running smoothly.

1

I have used Rational Functional Tester on an ASP Classic app. It was more for the end users to get a warm and fuzzy feeling when a new feature was released. But, it does work.

http://www-01.ibm.com/software/awdtools/tester/functional/

1

We ended up going with Selenium to drive the testing, but it has not made the jump from proof of concept to implementation at large. Thanks, everyone.

tmcg
  • 175
  • 1
  • 6