in reply to Re: Using Perl to Test a Web App that uses Javascript
in thread Using Perl to Test a Web App that uses Javascript

From the CPAN docs for HTTP::Recorder:

"HTTP::Recorder won't record Javascript actions, or pages delivered via SSL."
  • Comment on Re^2: Using Perl to Test a Web App that uses Javascript

Replies are listed 'Best First'.
Re^3: Using Perl to Test a Web App that uses Javascript
by perrin (Chancellor) on Jun 08, 2004 at 18:27 UTC
    You're not listening to me. JavaScript is totally irrelevant. It runs on the client, then the client sends an HTTP request to the server. The only thing you have to do to test the server is mimic the end result of running the JavaScript, which will be captured perfectly be HTTP::Recorder.
      I would have thought that the testing would have to also validate that non-HTTP-interacting parts of the JavaScript also functioned. I'd want to know that things like for ( var ix = 0; ix < stuff.length; ix++ ) document.write( stuff[ ix ] ); had output the correct data, etc. There is more to testing this sort of thing than just what passes between the client and the server.
        There is more to testing this sort of thing than just what passes between the client and the server.

        No, there isn't, unless you are testing a web browser. All that matters when testing a server is that you send in a certain request and get back a certain response. If you really want to check that the correct JavaScript was returned, you can compare it to a known correct sample. It's no different from checking any other content in an HTTP reply.