HTTP POST or GET

January 27th, 2009
Comments Off

Some time ago I made a little test comparing web services performance using HTTP GET and POST methods. I used the same script, in the same environment with the same web service. HTTP method was the only difference.

I discovered that POST method is twice much faster than request sent using GET method.
You should also know that request size with GET method can be limited, although RFC2616 says:

The HTTP protocol does not place any a priori limit on the length of
   a URI. Servers MUST be able to handle the URI of any resource they
   serve, and SHOULD be able to handle URIs of unbounded length if they
   provide GET-based forms that could generate such URIs.

So if you are planning some web services performance testing or you want to speed up your tests a little bit before customer demo :) you should consider POST HTTP method.

Web Services performance using LoadRunner HTTP Vuser script

January 24th, 2009
Comments Off

Small (basic) example howto test performance of Web Service using LoadRunner API.

Let say we have a web services that uses SOAP over HTTP. We want to check how fast we can send a request and receive a response.  Because our service uses HTTP as a transport protocol, we are able to test it using simple HTTP Vuser script.

Here is the C code:

  1. Action()
  2. {
  3.    web_reg_save_param("Response","LB=", "RB=", LAST);
  4.    web_add_header("SOAPAction", "SampleMethod");
  5.    lr_start_transaction("REQ");
  6.    web_custom_request("Sample_Request","Method=POST",
  7.          "Mode=HTML",
  8.          "RecContentType=text/xml",
  9.          "EncType=text/xml; charset=utf-8",
  10.          "URL=http://example.com:1234/sample/",
  11.          "Body=<Envelope xmlns=\"http://example.com/sample\">\n"
  12.                "   <Header/>\n"
  13.                "   <Body>\n"
  14.                "      <price><id>001</id></price>\n"
  15.                "   </Body>\n"
  16.                "</Envelope>",
  17.    "LAST");
  18.    lr_end_transaction("REQ", LR_AUTO);
  19.    lr_output_message("Response is : %s\n", lr_eval_string("{Response}"));
  20.    return 0;
  21. }

Have a fun…

How (in)secure is your proxy password in LoadRunner 9.0

January 16th, 2009
Comments Off

Are you using proxy server to access your application? Do you store proxy username/password in VuGen Run-Time settings?

If yes, then be careful. LR stores your password as plain text on the disk!

Instead of Run-Time settings you can use web_set_proxy() function from API and encrypt your password there.

How to crash LoadRunner 9.0 in 5 steps

January 15th, 2009
Comments Off

I’ve found it during playing with latest LR version. Steps to reproduce:

  • Open controller
  • Create new goal oriented scenario
  • edit goal type and select “Virtual Users” goal
  • set 0 (zero) as amount of Vusers to reach
  • click OK

Done. LR crashes without any error message, without completely anything. And I thought  boundary value testing is something basic… :/

P.S. This bug is already reported to HP.

Hello on my blog

January 13th, 2009
Comments Off

Hello and welcome on Waldemar’s blog.