From: Dossy Date: 2002-07-15T11:35:25+09:00 Subject: Has anyone combined Test::Unit with CGI? Doing some Test::Unit work on my CGI scripts, I wondered if anyone had done any work combining Test::Unit with CGI? Specifically, I'm thinking: Create your Test::Unit test case file. Just as it auto-magically runs the test runner by simply requiring 'test/unit' and defining a class that inherits from Test::Unit::TestCase, I'm thinking if you require 'cgi' -- well, if a class named "CGI" is defined -- that the Test::Unit test runner generates its output as a HTML document. Perhaps this is too magical: if your testing a CGI script, it'll have a CGI class defined and you may not want the output in HTML. So, maybe defining a flag would be necessary. I'm just thinking of an easy way of turning a Test::Unit test case (or suite) into something that can be published to the web ... or, in my case, run the test cases as a CGI script -- each hit to the CGI runs the test cases and sends the results as HTML back to the browser. If anyone has already _done_ this, please speak up! I'd love to use whatever you've got. Otherwise, I'm going to start working on this now. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)