Thursday 3 May 2018

Page Validation using Load Runner - Part1- Chapter11



  • Page validation is nothing but verifying, that the expected web page is loaded or not.
  • This can be achieved using load runner function "web_reg_find".
  • If expected text is not found in the response body of the request or in webpage, then it will fail the transaction and stop the script run.
  • web_reg_find function should be placed before web requests.
  • The important attributes of web_reg_find are "Text=", "SaveCount=", "Fail=", "Search=" and "RealFrameID".
    • "Text=" : In this attribute, we will keep the particular text from the web page which should be validated. Example: web_reg_find("Text =Welcome Yasir"
    • "SaveCount=" : SaveCount plays a vital role in page validation. The notable thing is, if the SaveCount attribute is specified in web_reg_find, though the expected text is not found, the transaction will pass and the script will run till the end of line. If the log is enable run time settings, then the number of occurances of the expected text will be printed in output under save count parameter name. Example: "web_reg_find("Text=Welcome Yasir", "SaveCount=TxtChk_Login"  where TxtChk_Login is a user-defined text to store the number of occurances of the expected text "Welcome Yasir".
    • "Search=": In this attribute, we will specify that the search should be made on body or request header or response headers or ALL. Example: web_reg_save_param("Text=Welcome Yasir", "SaveCount=TxtChk_Login, "Search=Body",LAST"). LAST is the load runner default attribute which denotes till last line of the request, the search should be made.
    • "RealFrameID=": RealFrame id attributes are used if the expected text is not able to find by just keeping "Text=Welcome Yasir". We can check the response body and check for the RealFrameID, in which the particular text is exist and then we can specify the same. Important thing to not about RealFrameID is as per load runner limitation, RealFrameID is not supported in GUI level scripts. The minimum/default value is 1 and  zero is not permitted. If you are not aware on which frame the expected text exists, you can keep attribute value as "ALL". Example.web_reg_find("Text=Welcome Yasir", "SaveCount=TxtChk_Login", "RealFrameID=ALL", LAST);
    • "Fail=" : This attribute can be used to check two different conditions.
      • If the expected text is found, then pass/faill transactions
      • If the expected text is notfound, then pass/fail the transactions. 
        • Example: web_reg_find("Text=Welcome Yasir", "SaveCount=TxtChk_Login", "Search=Body", "Fail=NotFound", LAST);
        • Example: web_reg_find("Text=Welcome Yasir", "SaveCount=TxtChk_Login", "Search=Body", "Fail=Found", LAST);
      • "Fail=Found" can be used to check if any error message or error code is received from the server response, and the respective transaction can be made to fail.
        • Example: web_reg_find("Text=HTTP Internal Server Error 500", "SaveCount=TxtChk_Login", "Search=Body", "Fail=Found", LAST);
    • Stay tuned for more learnings.

Run Time/Replay Settings - Load Runner - Part_3 - Chapter10



  • In Part2, we have covered, General -->Additional Attribute, Miscellaneous, Browser settings and Network. And Now, we will continue covering other run time settings.
    • Internet Protocol:
      • Content Check: If this is enabled, page validation concepts can be enabled.
      • Proxy: 
        • No Proxy: If selected, proxy would be disabled
        • Use default browser's proxy settings: If selected, our script will use same proxy configured in browser.
        • Use Custom Proxy: If selected, we can specify proxy url or proxy ip address so that the script will replay with proxy enabled.
        • Authentication: This is were we will pass-on our proxy authentication credentials with domain. example: office\yasir.
    • Preferences:
      • In this section ,we have different runtime settings, in which let me list out only useful/important settings.
      • Advanced : checkbox "Use wininet replay instead of socket", this option should be selected if the script is recorded with WINET recording options. The above option will helps to get successful replay many times. Particularly in web services scripts.
      • HTTP: HTTP requests, replay timeout settings can be configured here.
      • General: Step download timeout can be increased if received replay errors that exceeds step download timed out.
      • Authentication: Enable/disable below options helps us in successful replay.
        • Integrated authentication mode 
        • Use the native Windows NTML implementation
        • Override credentials in a Windows native NTML implementation
      • JavaScript: Enable javascript to capture response time of java script function time.
    • Download Filters:
      • This feature helps us in including/excluding requests/url's implicitly.
    • Data Format Extension:
      • Enabling this will helps is formatting complex data.
  • Stay tuned for more learnings. :-)

Correlation Using Load Runner - Part1 - Chapter13

Correlation General Description : Capturing Dynamic values from the preceding requests and substituting in the post request.  Exam...