For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > March 2004 > Testing PHP script using Test::Simple perl script









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Testing PHP script using Test::Simple perl script
John Ramsden

2004-03-29, 9:34 am

I have a perl logging module that sends log messages,
via post variables, to a simple PHP web app whose
purpose is to write them to a database table.

The module is organized in the standard Test::Simple
format, and as one of the unit tests I'd like to
include a message send (followed by a read of the
database table). But to make the tests self-contained
I'd prefer not to assume that the logging web app is
installed.

Can anyone suggest a way of running a PHP script,
possibly with an auxiliary script (?) to accept
post variables in interactive mode?

I thought of starting an apache instance, using a
config file in the perl test directory and listening
on a non-standard port. But this, even if possible,
seems like using a hammer to crack a nut.

All constructive suggestions welcome...


Cheers

John R Ramsden
Allan Rydberg

2004-03-29, 10:34 am



maybe php-commandline?

http://www.php.net/manual/en/features.commandline.php



John Ramsden wrote:

> I have a perl logging module that sends log messages,
> via post variables, to a simple PHP web app whose
> purpose is to write them to a database table.
>
> The module is organized in the standard Test::Simple
> format, and as one of the unit tests I'd like to
> include a message send (followed by a read of the
> database table). But to make the tests self-contained
> I'd prefer not to assume that the logging web app is
> installed.
>
> Can anyone suggest a way of running a PHP script,
> possibly with an auxiliary script (?) to accept
> post variables in interactive mode?
>
> I thought of starting an apache instance, using a
> config file in the perl test directory and listening
> on a non-standard port. But this, even if possible,
> seems like using a hammer to crack a nut.
>
> All constructive suggestions welcome...
>
>
> Cheers
>
> John R Ramsden


Jimmy Jacobson

2004-03-29, 3:34 pm

Try using jmeter for testing php applications. It's great stuff.

http://www.phpbuilder.com/columns/b...to20030610.php3

Jimmy
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com