Re: FCGI application testing
Marc Prewitt <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Steve Ferguson wrote:
> You could write it so that it can still function as a "regular" CGI, which
> isn't much work, at which point you could just feed it inputs on STDIN
> and get the results on STDOUT/STDERR by running it on the command lnie.
We're doing this with our perl apps. Using CGI.pm/FCGI. The main loop
looks like this:
#!/usr/bin/perl
use CGI::Fast;
use strict;
while (my $q = new CGI::Fast()) {
print "Hello world: \nfoo=", $q->param('foo'), "\n";
}
When called from the command line, you can pass cgi arguments like this:
foo.cgi arg1=foo arg2=bar
>
> Or you could set up your app as an external FCGI server, then just open
> sockets to it directly for testing. Granted, this means you have to add
> your own code to deal with listening on the socket and handling requests,
> so this may be using a sledge hammer to crack a walnut.
>
> Steve
>
> On Thu, 30 Sep 2004, Michael Hartley wrote:
>
>
>>Does anyone have any suggestions for testing FCGI applications without
>>making HTTP calls via a web server?
>>
>>I would like to generate test plans that call the FCGI application
>>directly passing a fully formed FCGI stream to the application server and
>>reading back the output with the destination probably being a file.
>>
>>Failing the possibility of an FCGI application test mechanism, does can
>>anyone recommendations for executing reproducible test scripts against an
>>FCGI application?
>>
>>Any comments, thoughts, suggestions or radical idea's would be gladly
>>received!
>>
>>Kind regards,
>>
>>Michael Hartley
>>
>>
>
>
>
> ------------------------------------------------------------------------
>
> ___________________________________
> fastcgi-developers mailing list
> http://fastcgi.com/fastcgi-developers/
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/