tmc*_*mcg 13 unit-testing asp-classic
我一直在研究经典ASP网站的自动化测试,以帮助我的公司进入1990年代后期.我们运行一个由~14K经典ASP页面组成的应用程序,ASP .NET慢慢获得更多份额.
我们已经为我们的核心.NET功能引入了单元测试,但我很好奇:其他人如何处理经典ASP的单元测试和自动测试?特别是在测试后端代码和前端页面方面.
谢谢,tmcg
也许这有帮助? asp ajaxed 为经典 asp 创建单元测试
通常,您需要创建一些基础结构(全部只是 vbscript 代码),然后您可以执行以下操作:
<!--#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
%>
Run Code Online (Sandbox Code Playgroud)
test_1 会成功,而 test_2 显然会失败。
你可以在这里找到那个 asp ajaxed 框架的源代码
在那里你可以看看 testFixture.asp 类