0

I have recorded the scipt and there is one web_custom_request() in that script which is sending the request but do not wait for the response and Vugen hits the next request. Due to which next step of the script are failing.

I have done all corelation also if sometime the response come in within the time that response is ok.

This is one search request which is hit and n return it gives the result of that search,.

How can i make this step wait until it get the actual response. Below is the code:

 web_custom_request("saw.dll_8",
  "URL={URL}",
  "Method=POST",
  "TargetFrame=",
  "Resource=0",
  "RecContentType=text/plain",
  "Referer={URL}",
  "Snapshot=t345.inf",
  "Mode=HTML",
  "Body=ViewState={ViewState_1}&Done=Dashboard%26PortalPath%3D%252Fshared%252FPayment%2520Search%252F_portal%252FPayment%2520Search%2520Tool%26Page%3DSearch%2520Page%26ViewState%3D{ViewState_1}&ClientStateXml=%3Csawst%3AenvState%20xmlns%3Asawst%3D%22com.siebel.analytics.web%2Fstate%2Fv1%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xmlVersion%3D%22200811100%22%3E%3Csawst%3Acontainer%20cid%3D%22d%3Adashboard%22%20xsi%3Atype%3D%22sawst%3AtopLevelStateContainer%22%20persistPageState%3D%22true%22%20links%3D%22fd%22%3E%3Csawst%3Acontainer%20cid%3D%22p%3A{CorrelationParameter}%22%20xsi%3Atype%3D%22sawst%3Apage%22%20firstVisit%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_1}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22g%3A{CorrelationParameter_2}%22%20xsi%3Atype%3D%22sawst%3Adashprompt%22%20links%3D%22-%22%20promptAutoCompleteState%3D%22off%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22"
  "r%3A{CorrelationParameter_3}%22%20xsi%3Atype%3D%22sawst%3Areport%22%20links%3D%22fd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_4}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20itemName%3D%22Search%20output%22%2F%3E%3Csawst%3Acontainer%20cid%3D%22f%3Adpstate%22%20xsi%3Atype%3D%22sawst%3Adashpromptstate%22%20statepoolId%3D%22{CorrelationParameter_12}%22%2F%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_6}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22n%3Acondition%22%20xsi%3Atype%3D%22sawst%3Anavigation%22%20conditionId%3D%22{CorrelationParameter_13}%22%20conditionEvalStatus%3D%22complete%22%20conditionMet%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22r%3A{CorrelationParameter_8}%22%20xsi%3Atype%3D%22sawst%3A{CorrelationParameter_8}%22%20links%3D%22bfd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_14}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20it"
  "emName%3D%22Condition_noprompt_set%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_10}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%3E%3Csawst%3Acontainer%20cid%3D%22n%3Acondition%22%20xsi%3Atype%3D%22sawst%3Anavigation%22%20conditionId%3D%22{CorrelationParameter_13}%22%20conditionEvalStatus%3D%22complete%22%20conditionMet%3D%22false%22%3E%3Csawst%3Acontainer%20cid%3D%22r%3A{CorrelationParameter_8}%22%20xsi%3Atype%3D%22sawst%3A{CorrelationParameter_8}%22%20links%3D%22bfd%22%20defaultView%3D%22compoundView!1%22%20searchId%3D%22{CorrelationParameter_14}%22%20folder%3D%22%2Fshared%2FPayment%20Search%2FReports%22%20itemName%3D%22Condition_noprompt_set%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3Csawst%3Acontainer%20cid%3D%22s%3A{CorrelationParameter_11}%22%20xsi%3Atype%3D%22sawst%3Asection%22%20rendered%3D%22true%22%2F%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3Acontainer%3E%3C%2Fsawst%3AenvState%3E&fmapId={"
  "fmapId}&reloadTargets=d%3Adashboard~p%3A{CorrelationParameter}~r%3A{CorrelationParameter_3}&DashboardCaption=Payment%20Search%20Tool&Page=Search%20Page&PageDelayedState=NotDelayed&PortalPath=%2Fshared%2FPayment%20Search%2F_portal%2FPayment%20Search%20Tool&Action=&ViewID=&IgnoreBypassCacheOption=ignoreBypassCache&_scid=&icharset=utf-8",
  EXTRARES,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttopdf_ena.png", "Referer={URL}", ENDITEM,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttoppt_ena.png", "Referer={URL}", ENDITEM,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttomhtml_ena.png", "Referer={URL}", ENDITEM,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttocsv_ena.png", "Referer={URL}", ENDITEM,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/common/menurtarrow.gif", "Referer={URL}", ENDITEM,
  "URL=res/v-qTiUEGoCy*s/sk_Alta/catalog/exporttoxml_ena.png", "Referer={URL}", ENDITEM,
  "URL=saw.dll?loadViewMenuModel", "Referer={URL}", ENDITEM,
  "URL=saw.dll/views/pivot/obips.gridview.xml?fmapId={fmapId}", "Referer={URL}", ENDITEM,
  LAST);

Thanks and Regards

Nikhil Kamboj

Nikhil
  • 393
  • 1
  • 6
  • 25
  • 1
    Could you please put the failing step code in the question. As far as I know it will always wait until the response is received. – Buzzy Apr 24 '18 at 09:51
  • Hi Buzzy I have pasted a peice of code where i am facing this issue. The exact issue is it dont wait for the full response once it get partial respone it the request switch to next step. – Nikhil Apr 24 '18 at 10:21
  • It is impossible for web_custom_request to return unless everything was done. Perhaps there are some resources that were taken from cache. Your problem is probably something else. – Buzzy Apr 24 '18 at 12:32
  • Unless this request is covered by an Asynch type request model then LoadRunner will always way for the response up to the request timeout - the default of which is 120 seconds. – James Pulley Apr 24 '18 at 12:52
  • @Buzzy -yes there are some resources and that are taken from cache What do you suggest in this case? @ James- You mean to say do i need to put this request under Async if yes can you suggest me how, i haven't did this before. – Nikhil Apr 24 '18 at 13:25
  • Your current request is synchronous in nature, not asynchronous. As such, LoadRunner will wait for the end of response, up to 120 seconds. So, if as little as a single byte was sent once every 119.9 seconds, LoadRunner would just sit and wait. The question, why is your app signaling the end of the data. – James Pulley Apr 24 '18 at 14:11

2 Answers2

0

Just to make this a bit easier to read...I am counting over a dozen correlated entities. Are you checking for expected results on each and every step of your script (testing 101 concept)? If not, then it would be very easy for this script to come off of the rails with so many correlations. All it would take is just one value to be off due to an unexpected result which was not handled and this request would likely respond inappropriately,

What is your depth of experience with Siebel and LR? This is a non trivial interface to test

web_custom_request("saw.dll_8",
        "URL={URL}",
        "Method=POST",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=text/plain",
        "Referer={URL}",
        "Snapshot=t345.inf",
        "Mode=HTML",
        "Body=ViewState={ViewState_1}
        &Done=Dashboard
        &PortalPath=/shared/Payment Search/_portal/Payment Search Tool
        &Page=Search Page&ViewState={ViewState_1}
        &ClientStateXml=
            <sawst:envState 
                xmlns:sawst="com.siebel.analytics.web/state/v1" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xmlVersion="200811100">
            <sawst:container 
                cid="d:dashboard" 
                xsi:type="sawst:topLevelStateContainer" 
                persistPageState="true" 
                links="fd">
            <sawst:container 
                cid="p:{CorrelationParameter}" 
                xsi:type="sawst:page" 
                firstVisit="true">
            <sawst:container 
                cid="s:{CorrelationParameter_1}" 
                xsi:type="sawst:section" 
                rendered="true">
            <sawst:container 
                cid="g:{CorrelationParameter_2}" 
                xsi:type="sawst:dashprompt" 
                links="-" promptAutoCompleteState="off"/>
            </sawst:container>
            <sawst:container 
                cid="r:{CorrelationParameter_3}" 
                xsi:type="sawst:report" 
                links="fd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_4}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Search output"/>
            <sawst:container 
                cid="f:dpstate" 
                xsi:type="sawst:dashpromptstate" 
                statepoolId="{CorrelationParameter_12}"/>
            <sawst:container 
                cid="s:{CorrelationParameter_6}" 
                xsi:type="sawst:section" 
                rendered="true">
            <sawst:container 
                cid="n:condition" 
                xsi:type="sawst:navigation" 
                conditionId="{CorrelationParameter_13}" 
                conditionEvalStatus="complete" 
                conditionMet="true">
            <sawst:container 
                cid="r:{CorrelationParameter_8}" 
                xsi:type="sawst:{CorrelationParameter_8}" 
                links="bfd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_14}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Condition_noprompt_set"/>
            </sawst:container></sawst:container>
            <sawst:container 
                cid="s:{CorrelationParameter_10}" 
                xsi:type="sawst:section"    
                rendered="true">
            <sawst:container 
                cid="n:condition" 
                xsi:type="sawst:navigation" 
                conditionId="{CorrelationParameter_13}" 
                conditionEvalStatus="complete" conditionMet="false">
                <sawst:container cid="r:{CorrelationParameter_8}" 
                xsi:type="sawst:{CorrelationParameter_8}" 
                links="bfd" 
                defaultView="compoundView!1" 
                searchId="{CorrelationParameter_14}" 
                folder="/shared/Payment Search/Reports" 
                itemName="Condition_noprompt_set"/>
            </sawst:container></sawst:container>
            <sawst:container 
                cid="s:{CorrelationParameter_11}" 
                xsi:type="sawst:section" 
                rendered="true"/>
            </sawst:container></sawst:container>
            </sawst:envState>
        &fmapId={fmapId}
        &reloadTargets=d:dashboard~p:{CorrelationParameter}~r:{CorrelationParameter_3}
        &DashboardCaption=Payment Search Tool
        &Page=Search Page
        &PageDelayedState=NotDelayed
        &PortalPath=/shared/Payment Search/_portal/Payment Search Tool
        &Action=
        &ViewID=
        &IgnoreBypassCacheOption=ignoreBypassCache
        &_scid=
        &icharset=utf-8",
        EXTRARES,
        /**/
        LAST);
James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Thanks James for your response. I can explain this. If i put the think time of 20 sec before this step the we are getting proper response as expected. But that would not be good approach to run the load test as there could be some users who would take more or less time then this and their response time will mismatch. – Nikhil Apr 24 '18 at 13:30
  • think time is time between user and chair, not time between user and server – James Pulley Apr 24 '18 at 14:09
  • Correct and I meant to explain that when we give think time before the request in that time the response comes. That means if the previous request send the request and wait for sometime the response got load and response get capture in this request – Nikhil Apr 24 '18 at 14:48
  • Think time is only processed after the end of the previous request/response set. Adding think time does not extend the amount of time a request waits for a response. Timeout is from the last byte sent, so if 1 byte is sent every 119 seconds of a 100 byte response, then the response time will be 11,900 seconds ( 3 hours, 18 minutes, 20 seconds ) – James Pulley Apr 24 '18 at 16:30
0

Have you tried re-executing the same request until you got the desired response. Something like below:

x:
web_reg_find("Text=<Some Response>",SaveCount=count);
web_custom_request("saw.dll_8",
.., LAST);
i = atoi(lr_eval_string("{count}"));
if (i == 0)
    goto x;
else
    continue;

*Provide if same web_custom_request can be executed multiple times.

S.ai
  • 61
  • 3
  • 17
  • yes i tried this and working fine but problem is when i do this it will hit this multiple time and request goes multiple time to the server will that overload the server? And I observed that request It is like: Request is hit and wait for 20sec and request is passed although there is not valid resonse and after 20sec that same request is hit and this continues till the accurate response is recieved and if i put think time of 20sec between the loop that can impact in results as if the response came in say 10 sec but the response time will be 20 sec. – Nikhil Apr 28 '18 at 21:57
  • Are these are asynchronous request and can be handled by web_reg_async_attributes? – Nikhil Apr 28 '18 at 22:04