8 Replies Latest reply: Jan 23, 2013 6:44 AM by Peter Krutý RSS

HTTP POST used in WPM

dihris

Hello folks,

 

Is there an option or a proper way in WPM to perform HTTP POST against a web site and then verify what is needed?

To me it seems that WPM supports only GET and HEAD requests.

 

Thank you in advance for your time and suggestions!

 
  • Re: HTTP POST used in WPM
    macnugetz

    dihris,

     

    Could you specify exactly what you're trying to do?  WPM supports the ability to record things like filling out and submitting a web form.

     

    -Craig

    • Re: HTTP POST used in WPM
      dihris

      Hello Craig,

       

      I have web servers configured to respond on POST requests only.

      If I try and record URL from one of those web servers with WPM recorder I get "Page cannot be displayed" HTML error 405 which is what I would expect as initially WPM recorder sends GET request that is not being accepted by the web server.

      What I'm looking is to set a monitoring for URL where I can send POST request with data enclosed in the request message's body and then verify what is needed.

       

      To wrap it up I have the following:

      POST URL: https://mydomain.com

      POST data: set of parameters sent to the web page wrapped in POST request message body

      Expected result: "text string"

      I need to be able to monitor the POST URL by sending POST data on regular intervals and verifying the "text string" as a result.

       

      Thanks

      • Re: HTTP POST used in WPM
        lukas.cerny

        Hello dihris,

         

        a best way to simulate this behavior would be to create a simple page with form on it which would upon submitting sent POST data to your site. You could then record the navigation to this page, click on the submit button and then use text verify feature. This created page must be accessible from all playback locations where transactions based on this recording will be played.

         

        Let me know if you have any questions.

         

        Thanks,

        Lukas

        • Re: HTTP POST used in WPM
          dihris

          Hello Lukas,

           

          Yes, this kind of solution would work if there are handful of web servers and all of them are using the same POST data for monitoring. In addition to that you add additional layer of failure where the webpage that you create can go down which automatically will prompt the monitoring system to flag all monitored web servers as down.

          I have multiple web servers using different POST data for being checked and I do not see your solution feasible for that kind of setup.

          I was thinking of writing a script which would perform the POST against my web sites and then verifying what is needed.  Once the script is written, trigger it using the External Process Monitor.

          • Re: HTTP POST used in WPM
            lukas.cerny

            dihris,

             

            as we are relying on the Internet Explorer during the recording and the playback and Internet Explorer doesn't allow you to create the POST request to page directly. I'm afraid that this kind of recording is currently not possible. The only way to workaround this I can think of right now is the one I suggested previously.

             

            Lukas