Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

Issue: Asynchronous Calls (Push) and Proxy

$
0
0

Hi All,

 

I have a loadrunner script sending multiple asynchronous calls by using web_reg_async_attributes function with Push type conversation. In the ResponseCB im implementing the following logic to validate the content of the response:

 

-----------------------------------------------

 

int Push_01_ResponseCB(
    const char *    aResponseHeadersStr,
    int                aResponseHeadersLen,
    const char *    aResponseBodyStr,
    int                aResponseBodyLen,
    int                aHttpStatusCode)
{
    //Enter your implementation for ResponseCB() here.
    

     //Checking if the String is found inside the ResponseBodyStr and saving the position.

    char * position = (char *)strstr(aResponseBodyStr,"Login Sucessfull");

 

    //If Position is Null means string was not found, so is not a valid response 
    if(position == NULL)
    {
        lr_end_transaction("Login",LR_FAIL);
        lr_exit(LR_EXIT_ITERATION_AND_CONTINUE, LR_FAIL);
    }else{
        lr_save_string("OK","Login_Flag");
    }
    return WEB_ASYNC_CB_RC_OK;
}

 

-----------------------------------------------

 

The application im testing is under a Proxy and im struggling handling how the communication is happening with the proxy because Load Runner is actually making 2 calls for each push request im sending:

 

1.- First is connecting via Proxy: Which responds only with header "Connection Established", and no Response Body:

 

dashboard.c(117):     CONNECT xxxxxx.xxx.xxx.com:443 HTTP/1.1\r\n
dashboard.c(117):     User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0\r\n
dashboard.c(117):     Host: xxxxx.xxx.xxxx.com\r\n
dashboard.c(117):     Proxy-Connection: Keep-Alive\r\n
dashboard.c(117):     Content-Length: 0\r\n
dashboard.c(117):     Pragma: No-Cache\r\n
dashboard.c(117):     \r\n
dashboard.c(85): t=6381ms: 39-byte response headers for "https://xxxx.xxx.xxxxx.com/xxx/x/xxxx/" (RelFrameId=1, Internal ID=12)   [issued at dashboard.c(117)]
dashboard.c(117):     HTTP/1.1 200 Connection established\r\n
dashboard.c(117):     \r\n

dashboard.c(117): Warning -26000: Push conversation terminated due to end-of-response for URL="https://xxxx.xxx.xxxxx.com/xxx/x/xxxx"  [MsgId: MWAR-26000]

dashboard.c(117): Notify: Deleting Conversation Information with ID="push_01"

 

2.- After connection established is received, Load Runner sends the actual Push Request, which receives the response headers and body correctly:

 

dashboard.c(85): t=6424ms: 1767-byte request headers for "https://xxxx.xxx.xxxxx.com/xxx/x/xxxx" (RelFrameId=1, Internal ID=12)   [issued at dashboard.c(117)]
dashboard.c(117):     POST /xxxxxl/xxxx/sxxxx/xx/ HTTP/1.1\r\n
dashboard.c(117):     Content-Type: application/x-www-form-urlencoded\r\n
dashboard.c(117):     Referer: https://xxxx.xxx.xxxxx.com/xxx/x/xxxx/\r\n
dashboard.c(117):     User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0\r\n
dashboard.c(117):     Accept-Encoding: gzip, deflate\r\n
dashboard.c(117):     Accept-Language: en-US,en;q=0.5\r\n
dashboard.c(117):     Accept: */*\r\n

....

....

dashboard.c(85): t=6426ms: 31-byte request body for...

....

....

dashboard.c(85): t=7232ms: 1981-byte response headers for...

....

....

dashboard.c(85): t=7238ms: 125-byte DECODED response body for

....

Login Sucessfull

.... 

....

 

Theissue

Script is failing while trying to execute the ResponseCB validation because is taking the first call response header: Connection established as the response for the push call, and then terminating the Push conversation due to end of response. However, the second call's response is the actual response i want to make the validations and im not sure how to to that.

 

 

On the other Hand:

Im trying Concurrent tags option and implementing response validations using function web_reg_find("Text=Login Sucessfull",LAST); which is working perfectly fine. The Connection Established messages are still comming but using this function as validation is not taking that as a actual response and keeps waiting for the response body, so script passes. Im not able to use web_reg_find function to make validations on Async calls approach.

 

Im interested in mesuring transaction response time for some sub-groups inside the complete concurrent group, which as far as i know is not possible using concurrency tags and this is the reason im going for the async option.

 

Any help/comments will be appriciated!

Thanks!


Viewing all articles
Browse latest Browse all 3978

Trending Articles