Testing PHP script using Test::Simple perl script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Ramsden

    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
  • Allan Rydberg

    #2
    Re: Testing PHP script using Test::Simple perl script



    maybe php-commandline?





    John Ramsden wrote:
    [color=blue]
    > 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[/color]

    Comment

    • Jimmy Jacobson

      #3
      Re: Testing PHP script using Test::Simple perl script

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



      Jimmy

      Comment

      Working...