How queryid is generated in xas request

0
HI Team ,   We were trying to automate the load testing for an Mendix App using JMeter , where we were automated xas request response . But after each deployement query Id is changed for xas request for filter data .  {action: "retrieve",…} action :  "retrieve" changes :  {} objects :  [{attributes: {Keyword: {value: null}, MyFirstModule.ParentEntity_DomainValue: {value: null}},…}] 0 :  {attributes: {Keyword: {value: null}, MyFirstModule.ParentEntity_DomainValue: {value: null}},…} attributes :  {Keyword: {value: null}, MyFirstModule.ParentEntity_DomainValue: {value: null}} guid :  "562949953421317" hash :  "8AEPaKZ5M9mh8lMt2PZzZA6R+tCPDXUn8hoa4WcTFFM=" objectType :  "MyFirstModule.ParentEntity" params :  {queryId: "QbTV1Q9yAkWNkrsfgHrUUQ", params: {ParentEntity: {guid: "562949953421317"}}, options: {}} options :  {} params :  {ParentEntity: {guid: "562949953421317"}} queryId :  "QbTV1Q9yAkWNkrsfgHrUUQ" profiledata :  {1680199238494-16: 18}   we are looking for a solution how we can automate these request to pass the filter parameters. 
asked
2 answers
0

Hi Anita,
I have faced with that issue on Hp Load Runner. Each time, when I run my load test scenario,  there was an error to not finding query id inside the created load test script.
To handle that problem, at the beginning of the created script, I found the id, keep it with a built-in function on Load Runner inside. Then I used it parametically when /xas call .

I hope that helps. If you need more information, I can provide some on weekdays.

Best wishes 

answered
0


web_set_sockets_option("SSL_VERSION", "TLS1.2"); 

web_add_cookie("originURI=/login-with-user-password.html; DOMAIN=XXX.com"); 
web_set_user("XXX.com.tr\\{Users}", "{Pass}", "YOUR_IP:PORT");

 

lr_output_message("Value is %s",lr_eval_string("{Users}"));
lr_output_message("Value is %s",lr_eval_string("{Pass}")); 

 

web_url("login-with-user-password.html", 
    "URL=https://XXX.com/login-with-user-password.html", 
    "Resource=0", 
    "RecContentType=text/html", 
    "Referer=", 
    "Snapshot=t125.inf", 
    "Mode=HTTP", 
    LAST); 

 

//Keep the csrf token at beginning of the script

web_reg_save_param_ex(
    "ParamName=csrf_token","LB={\"csrftoken\":\"",
    "RB=\"",
    SEARCH_FILTERS,
    "Scope=BODY",
    LAST);
    
//Used whereever you want, especially right before calling /xas url , the keeped csrf token value as parametically    
web_add_auto_header("x-csrf-token","{csrf_token}");
web_add_auto_header("accept","application/json");      

answered