Blog
Categories
- Agile
- Best Practices
- Center of Excellence
- Cloud
- Featured
- Functional Testing and Automation
- Giveaway
- Healthcare IT
- HP
- HP Discover Conference
- HP Software Patches
- Latest News
- LoadRunner
- Methodology
- Mobile
- Northway Navigator Club News
- Operating Systems
- Performance Testing and Automation
- Quality Assurance
- Security
- Service Virtualization
- SiteScope
- Training
- TweakLR
- Uncategorized
- VuGen Code
Archives
- April 2019
- September 2018
- July 2018
- June 2018
- October 2017
- August 2016
- April 2015
- February 2015
- September 2014
- August 2014
- May 2014
- April 2014
- March 2014
- October 2013
- September 2013
- August 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- February 2011
- July 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- September 2007
- August 2007
- July 2007
- October 2006
- April 2006
- March 2005
- October 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- April 2003
-
Vugen: Read A File Stream For Validation
Posted on July 30, 2012 by Admin
In this example we are running tasklist.exe in windows to check the existence of a process by looking at the first 13 characters in the file.
checkprocess()
{
char command[1024];
int i, total = 0;
char buffer[12], ch;
char *filename = lr_eval_string(“C:\\tasklist_{pTime}.txt”);
long file_stream;//Run a system command to open up a DOS prompt and tasklist
//Save it to a filesprintf(command, “tasklist /FI \”IMAGENAME eq MobileEngine.exe\”
/FI \”STATUS eq running\” /FO TABLE /NH > %s”, filename);
sys Read Entire Entry -
Vugen: strcmp Example
Posted on July 25, 2012 by Admin
I was asked to post a simple strcmp example for use in Vugen scripting. Here it is:
if (strcmp(lr_eval_string(“{pParameter}”), “”) == 0)
{
lr_error_message(“No parameter value captured. Ending iteration.”);
return 0;
}
else{
lr_output_message(“The parameter value is %s”,
lr_eval_string(“{pParameter}”));
};
Anyone care to elaborate in the comments section as to what this code is doing? Read Entire Entry -
Vugen: Replace Any String With Another
Posted on July 23, 2012 by Admin
Here is an easy way to replace anything with anything in a captured string in your LoadRunner Vugen script. It is a function called “string_replace”. Place this in the top of your action section, right after the include but before the main section begins:
char *string_replace(char *input_string,
char *substring_to_be_replaced,
char *substitution_string){
// strstr function declaration
char *strstr(const char *s1, const char *s2);// newstring variable the new string to be returned
// increase the buffer size if needed. Read Entire Entry -
ALM 11.5 Installation – Step by Step, Single Server Deployment
Posted on July 19, 2012 by Admin
During HP Discover, HP announced on June 5th, 2012 the official release of HP ALM (Application Lifecycle Management) 11.5 (formerly known as Quality Center). I am going to outline the new installation process for a single server deployment on a Windows 2008 64-bit server. This guide assumes that all prerequisites have been met and MS SQL Server 2008 R2 (or another supported database server) has been installed or is readily available.
Update: We recently covered what’s new in ALM 11.5. Make sure the installation environment meet Read Entire Entry -
Vugen: HTML and URL Recording Options Compared
Posted on July 18, 2012 by Admin
In LoadRunner Vugen, there are two general modes of recording: HTML and URL.
HTML (Context Sensitive) is usually preferred for several reasons. Firstly, because it is “context sensitive” , i.e. each mouse click recorded in the script is made in the context of the previous step/page. In order to maintain context it looks through the previous page to make sure the current operation is available. This adds extra overhead because it is performed by a background utility called the run-time parser. Although the parser uses extra overhead Read Entire Entry
-
Vugen: Using LAST Value For web_reg_save_param_ex
Posted on July 16, 2012 by Admin
Whenever the ORD=ALL attribute is used with the web_reg_save_param_ex function, VuGen creates an array containing the number of instances that are actually captured. It also stores the total count for the number of instances automatically. This count can be referenced by getting the value of “_count”. For example, if the parameter name is ParamName, a separate parameter ParamName_count will be available with number of times the value was captured. This can also serve as index for last values captured. Use the sample code below to Read Entire Entry
-
Service Test 11: How To Set HTTP Request Headers & Get HTTP Response Headers
Posted on July 13, 2012 by Admin
Recently one of our clients asked if it was possible to set HTTP Request Headers and retrieve HTTP Response Headers in Service Test 11 for REST and SOAP activities. The test case began by executing an activity to authenticate and retrieve an authentication token, and that token had to be passed in an authentication header for every remaining activity. This is all possible in Service Test 11.20 – let’s take a look at how it’s done.
Setting HTTP Request Headers
SOAP ActivitiesFor SOAP activities, C# code can be added to e Read Entire Entry
-
LoadRunner 11: Capturing text using the Citrix Agent on XenApp 6.5 SOLVED
Posted on July 13, 2012 by Admin
Recently at one of our clients, they had an issue with not being able to capture text with the ctrx_get_text function using the 64-Bit version of the Citrix Agent for LoadRunner 11. Read the steps here that finally fixed the issue for them. This is based on XenApp 6.5. The client was running Windows 2008 RS SP1. This resolution references Win2008R2, but it still worked. Notice it is for version 11 Patch 2 of the Citrix Agent (not Patch 2 of LoadRunner as a whole). Patch 3 version of the Citrix agent had issues with the Read Entire Entry
-
Vugen: Simulate Various Browser Behaviors
Posted on July 12, 2012 by Admin
Let’s discuss the various Browser Emulation settings in Vugen’s Run-Time Settings.
The “Simulate browser cache” option tells LoadRunner to “pretend” that it has a cache stored in the current session, and to keep track of the resources it has already downloaded. If a resource is in the cache and it is requested again by a new step in the Vugen script, it will not request this resource again from the server for that session. This is how a browser would typically behave unless the user has altered the browser cache settings. -
Service Test 11: Programmatically Set and Get Test Variable Values
Posted on July 11, 2012 by Admin
Test Variables in Service Test 11 are global variables that can be accessed later in the test script, either by linking to the variable in the GUI (Link to a Data Source) or by setting the variable in the GUI (Set Test Variable activity). Both can also be done programmatically using C#. For example, it may be necessary to set a Test Variable inside an activity Event (instead of using the Set Test Variable activity). In this post, we cover the methods available within Service Test to set and retrieve Test Variables.
Create Read Entire Entry -