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
In Control Panel, click Programs and Features, and then click Turn Windows features on or off. Expand Internet Information Services, expand World Wide Web Services, expand Application Development Features, and then select ASP. The ISAPI Extensions feature will be selected if it has not already been installed. Click OK.
Classic ASP is a server-side scripting environment that you can use to create and run dynamic web applications. With ASP, you can combine HTML pages, script commands, and COM components to create interactive web pages that are easy to develop and modify.
Introduction to testing for ASP.Net This test is the functionality of an application. The testing is conducted to ensure that the application behaves as expected. In ASP.Net, the first task is to create a test project in Visual Studio. The test project will contain the necessary code to test the application.
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
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.
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/
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With