Tips and Q&A

If you have questions please post them here. I’ll try to give answers to the best of my ablitiy!

Advertisements

12 thoughts on “Tips and Q&A

  1. Hi,

    I am working on performance testing of an application built on flex.

    I am using following protocol for the scripting:
    Flex, Web(HTTP/HTML).

    In my script I am getting a function “flex_call_Request” where the data comes in binary format. I contacted the developemnt team to provide me the jar files , so that I can regenerate the script and convert the data from binary to XML format. But they informed, they don’t have any jar files associated.

    Can you please suggest any alternate method to convert data from binary to XML.

  2. I’m not exactly sure what you want to do here.. If you could provide an example with some code it will make it easier to understand.

    The conversion from BIN to XML is also not a generic thing, one needs to know how the BIN data is constructed to be able to produce XML from it, if it is even possible.

  3. Hi,

    I’m facing an issue with one of my scripts recorded using web(http/html).

    The error message thrown at the below function is:
    Error -26631: HTTP Status-Code=400 (Bad Request) for “http://150.175.29.41:8080/maportal/maportal/BLOCKED SCRIPT”;”

    web_url(“editWPTPROT.do”,
    “URL=http://150.175.29.41:8080/maportal/maportal/editWPTPROT.do?&mod=uportal000200&cat=uportal000202&_callingModel=/maportal/editWPTPROT.do&actionmode=Edit&pB_Pin=Maportal&pB_Event=MaportalActivity&_content2=/maportal/searchPersonMini.jsp&pri=uportal&nextURL=erm_frameContent.jsp&ctrl_flag=16&preventFrameUpdateCode=1&forceFrameUpdateCode=2&”,
    “TargetFrame=”,
    “Resource=0”,
    “RecContentType=text/html”,
    “Referer=http://150.175.29.41:8080/maportal/jsp/epctrl.jsp?mod=uportal000200&cat=uportal000202&_callingModel=/maportal/editWPTPROT.do&actionmode=Edit&pB_Pin=Maportal&pB_Event=MaportalActivity&_content2=/maportal/searchPersonMini.jsp&pri=uportal&nextURL=erm_frameContent.jsp&ctrl_flag=16&preventFrameUpdateCode=1&forceFrameUpdateCode=2”,
    “Snapshot=t43.inf”,
    “Mode=HTML”,
    LAST);

    I tried to access the URL manually and it works. I see the expected page in the runtime view too. I checked the source of the page and found something like this:
    <iframe id="workaroundFrame" src="BLOCKED SCRIPT'<html></html>';" scrolling="no" frameborder="0"

    Do you think this could be the reason for the error? Pls suggest.

    • My first impression from this is that the page returned actually IS returned with the 400 status code. You’d have to replay the script in vugen with debug (all options) to see what’s really going on.
      Assuming the 400 response is there, you can turn off the error-checking for that specific URL call, and manually check the result-codes to catch 500 series errors.

      Other options:

      • The call should have some additional custom headers
      • have a specific accept type and not just */* (this I’ve seen before)
      • Capture the traffic using WireShark (since you use http mode) and look at the raw-data with the browser, and replicate that as close as possible (headers as well)
  4. I’m facing an issue with one of my scripts recorded using web(http/html).

    lr_start_transaction("login");
    web_submit_data("login",
    "Action=http://10.200.130.78:8880/login",
    "Method=POST",
    "RecContentType=application/json",
    "Referer=http://10.200.130.78:8880/",
    "Snapshot=t2.inf",
    "Mode=HTML",
    ITEMDATA,
    "Name=loginUser", "Value=liyanyun", ENDITEM,
    "Name=loginPass", "Value=a856321ed75435babf75aabb4662d278", ENDITEM,
    "Name=validateCode", "Value=unseat", ENDITEM,
    LAST);
    web_set_user("10.200.130.78\\liyanyun", "liyanyun", "10.200.130.78:8880");
    web_set_sockets_option("INITIAL_BASIC_AUTH","1");
    web_url("courseware",
    "URL=http://10.200.130.78:8880/res/resource/courseware",
    "Resource=0",
    "RecContentType=text/html",
    "Referer=http://10.200.130.78:8880/",
    "Snapshot=t3.inf",
    "Mode=HTML",
    EXTRARES,
    "Url=/static/images/logo/logoBg.png", "Referer=http://10.200.130.78:8880/static/css/common.css", ENDITEM,
    "Url=/static/images/ico/ico_user.png", "Referer=http://10.200.130.78:8880/static/css/common.css", ENDITEM,
    "Url=/static/images/logo/logoIco.jpg", "Referer=http://10.200.130.78:8880/static/css/common.css", ENDITEM,
    "Url=/static/images/bg/bg_nav.gif", "Referer=http://10.200.130.78:8880/static/css/common.css", ENDITEM,
    "Url=initCourseware?_=1397711146311", ENDITEM,
    "Url=loadTopic/1?_=1397711146312", ENDITEM,
    "Url=/static/css/images/loading.gif", "Referer=http://10.200.130.78:8880/static/css/twitter.css", ENDITEM,
    "Url=/static/images/ico/icoBasic.png", "Referer=http://10.200.130.78:8880/static/css/common.css", ENDITEM,
    LAST);
    lr_end_transaction("login",LR_AUTO);

    Replay Log

    Action.c(23): Notify: Transaction "login" started.
    Action.c(25): web_submit_data("login") was successful, 1 body bytes, 265 header bytes, 10 chunking overhead bytes [MsgId: MMSG-26385]
    Action.c(38): web_set_user was successful [MsgId: MMSG-26392]
    Action.c(39): web_set_sockets_option was successful [MsgId: MMSG-26392]
    Action.c(41): Downloading resource "http://10.200.130.78:8880/res/resource/initCourseware?_=1397711146311" (specified by argument number 21) [MsgId: MMSG-26577]
    Action.c(41): Downloading resource "http://10.200.130.78:8880/res/resource/loadTopic/1?_=1397711146312" (specified by argument number 23) [MsgId: MMSG-26577]
    Action.c(41): Error -26630: HTTP Status-Code=401 (Unauthorized) for "http://10.200.130.78:8880/res/resource/courseware" [MsgId: MERR-26630]
    Action.c(41): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://10.200.130.78:8880/res/resource/loadTopic/1?_=1397711146312" [MsgId: MWAR-26627]
    Action.c(41): Warning -26627: HTTP Status-Code=404 (Not Found) for "http://10.200.130.78:8880/res/resource/initCourseware?_=1397711146311" [MsgId: MWAR-26627]
    Action.c(41): Warning -26200: At least one of the resources specified by EXTRARES has not been downloaded due to the above error(s) [MsgId: MWAR-26200]
    Action.c(41): web_url("courseware") highest severity level was "ERROR", 2811 body bytes, 632 header bytes, 34 chunking overhead bytes [MsgId: MMSG-26387]
    Action.c(41): Notify: Transaction "login" ended with "Fail" status (Duration: 0.1771).

    loginUser = liyanyun and loginPass=liyanyun

    why 401?

    • I would need to see the complete trace of the traffic before I can say anything .. Could you send the whole project (this part) as a zip, complete with full debug logs on?

  5. Hello
    I’m vince.
    I want to use AES (Decryption) in loadrunner.
    Actually I can find many C sources on the internet but I’m not certain it’ll work correctly.
    In addtion, I don’t know exaclty how to apply it in loadrunner environment..

    Our service is providing customers with encrypted XML Body for the HTTP Request.
    So I need to decrypt the XML BODY in HTTP RESPONSE.

    If you have it or the way to solve this problem, Please let me know…
    I’m looking forward to your answer ASAP.

    • I’m planning on implementing a DLL library with a lot of ciphers, but time-constraints have prevented me from doing this. I’m sure you can find an AES implementation for LR if you google around. However, it may involve some customization to fit the LR way of using variables/strings.

  6. Hi,
    Can you please explain briefly how to setup an lg for loadrunner. Tell it from scratch.
    Means what are the ports to be enabled, wat are things we need to do as pre requisite..
    Everything totally and completely..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s