Posts

Showing posts from June, 2016

Deep Description on Runlogic

Image
Types of Action files Vuser_init Action Vuser_end Vuser_init This is the first action that is executed by the vuser and it comes under the  init  section of the script. It is executed only once in the life cycle of a vuser. By life cycle we mean the time between the start and the stop of a vuser. Even if the vuser has multiple iterations to execute, the set of steps incorporated within this action file is executed only once. We cannot disable/delete vuser_init. Even if it does not contain any steps to execute, it has to be present. We can put those steps in vuser_init that need to be executed only once. E.g. a script that logs in the same user to an application and performs certain tasks, since the same user is logging in every time, login steps can be put in vuser_init. But it also depends on the business requirement whether we should include launch and login in vuser_init. If launch and login is to be observed for its performance then including them in vuser_init is no

Error -27492: "HttpSendRequest" failed, Windows error code=12057 (certificate revoked) and retry limit (0) exceeded for URL="

This error occurs when using WinInet replay instead of sockets with Integrated Authentication enabled in run-time settings. The purpose of this was to allow vusers to use SSO with SPNEGO authentication in an IBM WebSEAL environment. After spending some time with the mystical HP level 3 support, they identified an undocumented flag which helps out significantly in this. So, instead of using the WinInet replay engine (which is not encouraged by HP) you should do something similar to the following. vuser_init() {             // Preferred run-time settings             // Browser -> Browser Emulation        // [ ] Simulate a new user on each iteration        // Preferences -> Options        // Enable Integration Authentication [Yes]             web_set_sockets_option("INITIAL_BASIC_AUTH","1");             web_set_user("DOMAIN.LOCAL\\username",                         "password",                         "s

CHECK POINTS or FUNCTIONS or VALIDATIONS:

Check Points: To validate the data on a web page use the below 2 types of check points in LOAD RUNNER script. 1.        Text Check Point 2.        Image Check Point Text Check Point : To validate the text on a web page, we use the below type of text check points. i)                     web_reg_find( ) : It verifies the given text on a web page and it returns the count of the given text using a SaveCount argument. Syntax:          Web_reg_find(“Text=Username”, “SaveCount=Test1”, LAST); Web_url(“…………………………………………..                         …………………………………………                         …………………………………………”); Web_find(“Textcheck”,                         “What=(Required text to be find, Here eg: Username)”,                         LAST); i)                     web_find( ) : It verifies the given text on a web page. Syntax:                              Web_find(“Textcheck”,                         “What=(Required text to be find, Here eg: Username)”,

Writing data in to a file

Char * file1="c://documentd//t1.txt";  // declaring the file path long f1; f1=fopen(file1, "a");  // opening the file in apend mode fprintf(f1,"stored value is:%d", lr_eval_string("{param}"));  // writing data in to the file fclose(f1);  // close the file

Lr Advance Param Function In Loadrunner With Example

This function is not recorded during recording. We manually insert this function whenever there is a need of it. lr_advance_param works depends upon the settings we give in parameter list (ctrl+L). lr_advance_param is like update value on each occurrence. Whenever we want to update a parameter value in the same iteration we use lr_advance_param. For example when we want to use two parameters Google and Bing in one Iteration. Usually the Vugen takes the first value google and if we want to use the second value in the same iteration we use  update value on each occurrence  in the parameter settings. We can do the same using lr_advance_param function. Example: I have set following settings in Parameter Select Next Row:  Sequential Update value on:  Each Iteration If we want to take the next value in the pramater list we use lr_advance_param as shown below. Parameter Name:  DomainName Google Bing Yahoo Ask Vugen Script: Action () { web_u

Working with web services Protocol

Image
Web Services: Web Services in loadrunner: We can do web services scripting in two ways: 1.        By using Web Services Protocol. (Need additional License) 2.        By using Web Protocol. Scripting Using Web Services Protocol: I have taken weather web service as example shown in this   link. Steps: 1.        First open the vugen and select Web Services protocol. 2.        Click on Manage Services on top nav bar and Click on Import and give the WSDL URL which is usually ends with wsdl http://www.webservicex.net/globalweather.asmx?WSDL. Now Click on Add Web Service Call on top nav bar. Give the Input Arguments and Leave the out put arguments empty. And click on ok. As shown in the following image. It will create a script in loadrunner as shown below. You can perform the steps one by one in this way for all the web services steps. You can use lr_xml_find and lr_xml_get_values to validate the page. web_service_call (  " StepName = GetCitiesB

IP Spoofing and Adding Multiple IP Addresses To Host

Image
IP Spoofing and Adding Multiple IP Addresses To Host IP Spoofing: When you run a scenario, the Vusers on each host machine use the host’s IP address. You can define multiple IP addresses on a host machine to emulate a real- life situation where users sit on different machines. About Multiple IP Addresses: Application servers and network devices use IP addresses to identify clients. The application server often caches information about clients coming from the same machine. Network routers try to cache source and destination information to optimize throughput. If many users have the same IP address, both the server and the routers try to optimize. Since Vusers on the same host machine have the same IP address, server and router optimizations do not reflect real- life situations. (real life Network Traffic) LoadRunner’s multiple IP address feature enables Vusers running on a single machine to be identified by many IP addresses. The server and router recognize the Vusers as