in

ASP.NET Weblogs

Jason Tucker's Blog

not at all creative...

Testing the Test Software.

Quick question: what do you guys/gals use for testing your applications? I'm very interested in hearing if any of you recommend a package that can test all types of apps (.Net/ASP.Net/Classic ASP/VB Apps). I'm trying to avoid if possible buying 2 packages, one for the web and one for reg. apps. Any help is appreciated.

Published Sep 19 2004, 02:33 PM by jtucker
Filed under:

Comments

 

Antoine said:

Hi Jason,

For my part, I regularly use NUnit for my dotnet developments. Not really because it's the best one but simply because that's the first one I really took time learning and reading some documentation about.

I also regularly code using classic ASP and sometimes in PHP. I try to respect as much as possible the 3-tier paradigm (Presentation/Business/Data layers) and I keep testing 2nd. & 3rd. layers. There's no NUnit stuff there, just some discipline in coding business methods: no one leaves the library files. This allows me to create a single utest.asp/utest.php file. Some excerpt of it:

...
include virtual="lib_db.asp"
include virtual="lib_security.asp"
include virtual="lib_business1.asp"
include virtual="lib_business2.asp"
...
include virtual="lib_utest.asp"
...
'* test(testName, testMethod, testExpectedResult)

test("SEC-1", HashPassword(""), CStr(""))
test("SEC-2", IsUserValid("john","johnpass"), CBool(True))
...
test("BL-1", IsValidEmail(""), CBool(False))
test("BL-2", IsValidEmail("asdas"), CBool(False))
test("BL-3", IsValidEmail("aasd@"), CBool(False))
test("BL-4", IsValidEmail("@dsdsd"), CBool(False))
test("BL-5", IsValidEmail("dfsd..ssf@asas"), CBool(False))
...
and so on...

This gives me an output like:

SEC-1: OK
SEC-2: OK
BL-1: OK
BL-2: FAIL (Expected: FALSE, Received: TRUE)
BL-3: OK
...
Some STATS:
...


Well, that's it for me =)

September 19, 2004 7:45 PM

Leave a Comment

(required)  
(optional)
(required)  
Add