|The stupid question is the question not asked|
Writing a module testby TStanley (Canon)
|on Jun 09, 2007 at 13:00 UTC||Need Help??|
TStanley has asked for the
wisdom of the Perl Monks concerning the following question:
I think the time has finally come where I add another set of tests to the Games::QuizTaker module to test a function that is completely untested in the current framework. Oddly enough, the function in question is the "test" function which prints out the questions of the quiz and waits for the input of an answer, which it then checks and reports back as to whether it is correct or incorrect.
Since this entire function is an interactive one, how would I go about implementing a decent test to cover this part of the module? As always, I'm merely looking for suggestions/alternatives. The test function of the module is below:
People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf. -- George Orwell