468,287 Members | 2,018 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,287 developers. It's quick & easy.

Testing PHP script using Test::Simple perl script

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
Jul 17 '05 #1
2 2166


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


Jul 17 '05 #2
Try using jmeter for testing php applications. It's great stuff.

http://www.phpbuilder.com/columns/bo...o20030610.php3

Jimmy
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sam | last post: by
5 posts views Thread by Mark Szlazak | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.