Stackoverflow LoadRunner

Syndicate content
most recent 30 from stackoverflow.com 2016-07-22T20:02:54Z
Updated: 4 days 23 hours ago

What happens if browser agent is changed while replaying loadrunner web protocol script?

Wed, 04/27/2016 - 23:00

Lets say I ran a LR script consists of usual web http/html protocol with the browser agent of Internet Explorer 8(IE8) using LR 11. The script were created using same LR version but with IE11. Kindly provide information whether this change in browser version affects anything & how exactly.

Also, please tell what happens for similar case if the record is done using LR12- IE11 & replay using LR11 - IE8.

Categories: LoadRunner Lists

how can i use web_reg_save_param when LoadRunner protocol is C Vuser?

Fri, 04/22/2016 - 07:51

I use LoadRunner 11, and need send some web_custom_request. I start with a C Vuser protocol because i need some c lib(MD5). When i replay, i meet the error below: vuser_init.c(24): Error: C interpreter run time error: vuser_init.c (24): Error -- Unresolved symbol : web_reg_save_param.

How can i use web_reg_save_param when i select C Vuser protocol? How can i make LoadRunner recognize web_reg_save_param when the protocol is C Vuser?

Thanks a lot.

My code is :

vuser_init() { char *digest; char jsonBody[500]; char jsonBodyFirst[500]; char *key = "3KJBI23U923B8W0NF8WB29B98DAYP9AUBI2UQPF98AF9ABEWFPAOINOANSFPOAIN"; strcpy(jsonBodyFirst, lr_eval_string("{\"channelId\":\"2\",\"loginType\":\"2\",\"userId\":\"{loginMobile}\",\"password\":\"GGDSuDK6SlEidji9\\/BtPlQ==\",\"osName\":\"Android\",\"deviceNo\":\"865982027651010\",\"clientVersion\":\"1.0.3\",\"osVersion\":\"6.0.1\",\"deviceModel\":\"MI NOTE LTE\",\"imsi\":\"460008011671383\"")); strcpy(jsonBody, jsonBodyFirst); strcat(jsonBody,"}"); digest = (char *)hmac_md5(jsonBody, key); memset(jsonBody,0,sizeof(jsonBody)); sprintf(jsonBody, "Body=%s,\"digest\":\"%s\"}", jsonBodyFirst, digest); web_reg_save_param("jsessionid", "LB/IC=JSESSIONID=", "RB/IC=;", "LAST"); web_custom_request("autoLogin", "Method=POST", "Mode=HTML", "EncType=application/json", "URL=https://testsys.szsharelink.com:8443/service/autoLogin.app", jsonBody, "LAST"); return 0;

}

Categories: LoadRunner Lists

How to define regex (including $) in Vugen

Tue, 04/19/2016 - 11:02

when I am writing the following code, it is failed at runtime But without end string char '$' at the end of the regex, the script is being passed.

lr_xml_find("XML={response}", "Query=/soapenv:Envelope/soapenv:Body/p4:TechParm/p3:SessionID", "UseRegExp=yes", "Value=^[A-z0-9]{8}[-][A-z0-9]{8}[-][A-z0-9]{8}[-][A-z0-9]{8}$", LAST);

Please let me know how to resolve this issue

Categories: LoadRunner Lists

Get RFH2 usr area name-value pairs from MQ queue using Java

Tue, 04/19/2016 - 10:25

Using Java, I want to build a MQ message that has MQMD,RFH2 usr area (with few name-value pairs). I am able to connect to Qmgr and able to read a message from one queue. I want to retrieve all header values (MQMD,RFH2 usr etc) and build one such message based on the retrieved message Can anyone please help me out in this ?

FYI: I am doing a load testing using Loadrunner tool that puts loads of messages on inbound queue and they will be processed and will be sent to outbound queue. And the tool will read the current queue depth of the outbound queue to check the total processing time.

Any suggestion are welcome

Images : MQ Message headers Image

Unsupported Version at MQRFH2

Categories: LoadRunner Lists

Getting error message after stop the recording in loadrunner

Fri, 04/15/2016 - 14:58

I am new in loadrunner.

When record sample project web tour in load runner, after stop the recording its showing error: "one of the post generation procedure has failed. failed procedure: performing scan for correlation post generation operation"

Can anyone help to resolve this issue. I am stuck here and not able to work further.

Categories: LoadRunner Lists

How to combine async and blocking requests in VuGen?

Wed, 04/13/2016 - 14:14

I'm working on a load test for my long-poll chat-like service. The use case I want to test is fairly simple:

  1. Open a long-poll GET connection
  2. Send a message using POST request
  3. Assert that connection opened in step 1 has received the same message

I managed to implement steps 1 and 2 (and I can see in server access logs that requests are made) but on step 3 I'm getting following error:

Error -27653: Attempted read from an unconnected socket ("Connection: close" specified but server-side closure not detected). URL="https://{Env}/chat/poll/" [MsgId: MERR-27653]

Warning -27764: Request "https://{Env}/chat/poll/" failed [issued at Action.c(76)] [MsgId: MWAR-27764]

Can I combine async requests with blocking requests?

My test code is

int done; Action() { int HttpRetCode; int i = 5; // Initialize the global done state variable, and start the async transaction variable done = 0; lr_start_transaction("async-call"); // Define the request to be handled asynchronously // Specify the callback functions that will be called when the response is returned. // The callback functions are defined below. web_reg_async_attributes("ID=Poll_0", "URL=https://{Env}/chat/poll/", "Pattern=LongPoll", "PollIntervalMs=200", "RequestCB=Poll_0_RequestCB", "ResponseBodyBufferCB=Poll_0_ResponseBodyBufferCB", "ResponseCB=Poll_0_ResponseCB", LAST); // now make the async call. // note that the script will not block on this call. processing will continue on past this step while the request is handles asynchronously web_url("Poll_0", "URL=https://{Env}/chat/poll/", "Resource=1", LAST); lr_force_think_time(10); // Send interop message lr_message("Send interop message"); lr_start_transaction("/chat/.POST.201"); web_add_header("X-Session-ID", "sessionA"); web_custom_request("Push interop message", "URL=https://{Env}/chat/", "Method=POST", "Resource=0", "Mode=HTTP", "Body=DJIGURDA", LAST); HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE); if (HttpRetCode != 201) { lr_error_message("Unexpected return code: %d", HttpRetCode); lr_end_transaction("/chat/.POST.201", LR_FAIL); } else {ev lr_end_transaction("/chat/.POST.201", LR_AUTO); } lr_message("Waiting for response"); // To capture the response time of the async call, wait until the callback is called. // Without this, the script would move past and complete the iteration before the callback is called. //web_sync("ParamCreated=ready","RetryIntervalMs=18000","RetryTimeoutMs=3600000",LAST); // To capture the response time of the async call, wait until the callback is called. // Without this, the script would move past and complete the iteration before the callback is called. while (done==0 && i-- > 0) { lr_force_think_time(1); } // once the callback has been called, end the transaction to get the response time. lr_end_transaction("async-call", LR_AUTO); // stop the polling web_stop_async("ID=Poll_0", LAST); return 0; } /* * Callback Implementation * * */ int Poll_0_RequestCB() { //enter your implementation for RequestCB() here lr_message("in Poll_0_RequestCB request callback"); return WEB_ASYNC_CB_RC_OK; } int Poll_0_ResponseBodyBufferCB( const char * aLastBufferStr, int aLastBufferLen, const char * aAccumulatedStr, int aHttpStatusCode) { //enter your implementation for ResponseBodyBufferCB() here // when the response is received, update the global variable done = 1; // print out the response body and length lr_message("in Poll_0_ResponseBodyBufferCB response body callback"); lr_message("in Poll_0_ResponseBodyBufferCB response body callback, lastBufferLen=%d", aLastBufferLen); return WEB_ASYNC_CB_RC_OK; } int Poll_0_ResponseCB( const char * aResponseHeadersStr, int aResponseHeadersLen, const char * aResponseBodyStr, int aResponseBodyLen, int aHttpStatusCode) { //enter your implementation for ResponseCB() here lr_message("in Poll_0_ResponseCB response callback, headerLen=%d, bodyLen=%d", aResponseHeadersLen, aResponseBodyLen); lr_message("in Poll_0_ResponseCB response callback, header=%s", aResponseHeadersStr); lr_message("in Poll_0_ResponseCB response callback, body=%s", aResponseBodyStr); return WEB_ASYNC_CB_RC_OK; }

And the log output is:

Action.c(19): Notify: Transaction "async-call" started. Action.c(25): web_reg_async_attributes started [MsgId: MMSG-26355] Action.c(25): Warning -26318: When "Pattern" is not "Poll", "PollIntervalMs" is ignored [MsgId: MWAR-26318] Action.c(25): web_reg_async_attributes highest severity level was "warning" [MsgId: MMSG-26391] Action.c(36): web_url("Poll_0") started [MsgId: MMSG-26355] Action.c(36): "ID=poll_0" && "Pattern=LongPoll" now applied to URL="https://{Env}/chat/poll/" (RelFrameId=1, Internal ID=3) [MsgId: MMSG-35172] in Poll_0_RequestCB request callback Action.c(36): Retaining cross-step download of URL="https://{Env}/chat/poll/" (RelFrameId=1, Internal ID=3) [MsgId: MMSG-27658] Action.c(36): web_url("Poll_0") was successful, 0 body bytes, 0 header bytes [MsgId: MMSG-26386] Action.c(41): lr_force_think_time: 10.00 seconds. Send interop message Action.c(46): Notify: Transaction "/chat/.POST.201" started. Action.c(48): web_add_header("X-Session-ID") started [MsgId: MMSG-26355] Action.c(48): web_add_header("X-Session-ID") was successful [MsgId: MMSG-26392] Action.c(50): web_custom_request("Push interop message") started [MsgId: MMSG-26355] Action.c(50): Retaining cross-step download of URL="https://{Env}/chat/poll/" (RelFrameId=1, Internal ID=3) [MsgId: MMSG-27658] Action.c(50): Retaining cross-step download of URL="https://{Env}/chat/poll/" (RelFrameId=1, Internal ID=3) [MsgId: MMSG-27658] Action.c(50): Retaining cross-step download of URL="https://{Env}/chat/poll/" (RelFrameId=1, Internal ID=3) [MsgId: MMSG-27658] Action.c(50): web_custom_request("Push interop message") was successful, 0 body bytes, 377 header bytes [MsgId: MMSG-26386] Action.c(58): web_get_int_property started [MsgId: MMSG-26355] Action.c(58): web_get_int_property was successful [MsgId: MMSG-26392] Action.c(64): Notify: Transaction "/chat/.POST.201" ended with "Pass" status (Duration: 1.3904 Wasted Time: 0.0033). Waiting for response Action.c(76): lr_force_think_time: 1.00 seconds. Action.c(76): Error -27653: Attempted read from an unconnected socket ("Connection: close" specified but server-side closure not detected). URL="https://{Env}/chat/poll/" [MsgId: MERR-27653] Action.c(36): Warning -27764: Request "https://{Env}/chat/poll/" failed [issued at Action.c(76)] [MsgId: MWAR-27764] Action.c(76): Notify: Deleting Conversation Information with ID="poll_0" Action.c(76): lr_force_think_time: 1.00 seconds. Action.c(76): lr_force_think_time: 1.00 seconds. Action.c(76): lr_force_think_time: 1.00 seconds. Action.c(76): lr_force_think_time: 1.00 seconds. Action.c(80): Notify: Transaction "async-call" ended with "Pass" status (Duration: 19.0076 Think Time: 16.5943 Wasted Time: 0.0043). Action.c(83): web_stop_async started [MsgId: MMSG-26355] Action.c(83): Warning -26000: Failed to find conversation with ID="poll_0" for stopping [MsgId: MWAR-26000] Action.c(83): web_stop_async highest severity level was "warning" [MsgId: MMSG-26391] Ending action Action.

I'm using VuGen 11.52 and C API

Categories: LoadRunner Lists

How to capture Text from Web object using True client protocol in Loadrunner Vugen?

Wed, 04/13/2016 - 06:57

Need to capture text from Label object into parameter and save it in text file. How to capture text using Javascript in trueclient protocol ?

Categories: LoadRunner Lists

Overloading Load Generators will impact response times of transactions?

Tue, 04/12/2016 - 08:50

I know overloading of load generators will impact execution times and volumes(No.of transactions per hour) but I am not sure whether it will impact response times as well, my hypothesis is it won't impact the response times, if i am wrong please let me know how it will impact response times?

Categories: LoadRunner Lists

LoadRunner 12.50 recording issue

Tue, 04/12/2016 - 06:51

Running 12.50 in a VM under Windows Server 2012 R2 Datacenter with 6gb RAM. Since upgrading from 12.02 to 12.50 (5 days ago) I am unable to get anything to record in the new installation. Using WEB/HTTP protocol, once recorder starts, the IE browser just returns "This page cant be displayed" error. On clicking 'Fix Connection Problems' in the browser display, it just says there are no connection issues. No actual errors are logged in the log file so I have no idea where LR has an issue.

Running scripts that worked under 12.02, I got 404 not found returned, but after faffing around with the proxy settings and set the browser emulation to IE 10 it seemed to fix the re running issues.

Wierd thing is I can connect to the affected URL's outside LoadRunner using IE, so IE seems to work OK but wont connect in record mode.

Update : Set IE version 11 in runtime settings as per LR installation prerequisites. For some reason, was set to 10 by default.

Categories: LoadRunner Lists

How to do load testing?

Fri, 04/08/2016 - 16:47

I have been working on performance testing for a while. I want to ask if there is any difference between running the test for 500 virtual users using the same username and password or should we be using different user for each virtual user. If the test was executed with the same user, will the user data be cached on client or server sides and the results won't be accurate?

Thanks!

Categories: LoadRunner Lists