Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: RFC: Systemizing CGI upload testing

by SilasTheMonk (Chaplain)
on Jun 24, 2010 at 11:03 UTC ( [id://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 (Saint) 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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://846277]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found