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

Error in web_reg_async_attributes

$
0
0

Hi!

I'm currently scripting an authentication application. The authentication is performed by using an electonic ID on a mobile device (e.g. an iPhone). The users enters his/her ID-number on a web page and then opens the ID security application on the mobile device and enters a pin-code. During this time the web page continuosley polls the server for status of the authentication.

 

I've recorded this flow using LR 11.52, and LR successfully records the poll and adds a web_reg_async_attributes step to the script. But when I try to replay (with added parameters) the replay fails with an error that is unknown to me.

 

Below is the code for the poll recorded by LR (web_add_header and web_sync steps added manually):

 

web_reg_async_attributes("ID=Poll_0"
        "Pattern=Poll"
        "URL=https://XXXXXX/login/ajax/poll"
        "PollIntervalMs=1600"
        "RequestCB=Poll_0_RequestCB"
        "ResponseCB=Poll_0_ResponseCB"
        LAST);

    web_add_header("X-CSRF-TOKEN"lr_eval_string("{CSRF}"));
    web_add_header("Accept""application/json");
    web_add_header("X-Requested-With""XMLHttpRequest");
    web_add_header("Accept-Language""sv");
    web_add_header("Connection""Keep-Alive");
    
    web_custom_request("poll"
        "URL=https://XXXXXX/login/ajax/poll"
        "Method=POST"
        "TargetFrame="
        "Resource=0"
        "RecContentType=application/json"
        "Referer=https://XXXXXX/login/poll"
        "Snapshot=t9.inf"
        "Mode=HTML"
        "EncType=application/json"
        LAST);
    
    web_sync("ParamCreated=authStatus""RetryIntervalMs=800""RetryTimeoutMs=60"LAST);
    web_stop_async("ID=Poll_0"LAST);

 

During replay the scipt fails with the following error message

 

AH_Testverktyg.c(136): Warning -26499: Internal Error - Invalid mptTaskItem=073B8C00 / _ptConversInfoItem=00000000 / Pattern=[Invalid] (NOT repetitive) / ID="" (IsValid=0) / UrlCrack IsValid=1 for URL="https://XXXXXX.se/login/ajax/poll" in RequestToRepeat CTOR for this=06666C60 [MsgId: MWAR-26499]

 

AH_Testverktyg.c(136): Error -35050: Parameter 'authStatus' was not defined and the time to wait for it has elapsed. This timeout can be set by passing argument 'RetryTimeoutMs' or by changing 'web_sync retry timeout' in Run-Time Settings. [MsgId: MERR-35050]

 

Notable is that the first poll works.

 

Also, when I modify the script and use a for-loop instead, the script works fine, so I don't think there is any problem with the actual request being sent. In this case it works fine with the for-loop since nothing needs to be executed during the poll, but I think the LR-poll function is a more neat solution :-)

 

Has anyone encounter this and managed to get it to work?

 

Best Regards!
Robert

 

 

 

P.S. This thread has been moved from Performance Center Support and News Forum to LoadRunner Support Forum. - Hp Forum Moderator


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>