Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: RFC: Systemizing CGI upload testing

by SilasTheMonk (Chaplain)
on Jun 24, 2010 at 11:03 UTC ( #846277=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: Systemizing CGI upload testing
in thread RFC: Systemizing CGI upload testing

No. Test::MockObject is essential if you are trying to achieve complete test coverage of a module - for example where you are trying to simulate unusual behaviour such as database queries failing for no particular reason. Rather the behaviour I am seeking to simulate is the normal behaviour of web server when processing a POST request - without actually running a web server.
  • Comment on Re^2: RFC: Systemizing CGI upload testing

Replies are listed 'Best First'.
Re^3: RFC: Systemizing CGI upload testing
by GrandFather (Sage) on Jun 24, 2010 at 11:28 UTC

    But doesn't that come to much the same thing? I use MockObject most often to mock MIME::Lite so that the code I'm testing thinks it is doing business as usual, but I can capture and print locally the email that would have been sent - not unlike your non-running web server really.

    True laziness is hard work
      That is a really cool and very practical use of Test:MockObject. However I don't think the analogy holds because I want the whole environment to be real and not fake: real environment variables, real input and a real CGI or equivalent object. Have a look at the CGI test script I cited. That is really what I want to do - but it depends on an input file that is not in a strictly human readable format. So essentially what I want to do is make that input file maintainable by humans.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://846277]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2018-04-26 00:34 GMT
Find Nodes?
    Voting Booth?