Owner: Easy way to perform automated testing URL:http://motevich.blogspot.com Join Date: Sat, 20 Oct 2007 16:29:56 -0500 Rating:0 Site Description: Thoughts on software testing and quality assurance, automated software testing, especially Mercury LoadRunner and QTP - QuickTestPro, process improvements and different ways on how to do more and quicker at a shorter time Site statistics:Click here
LoadRunner visual tutorials 2008-03-01 15:42:26 LoadRunner parameters:Using parameters in Loadrunner VuGen scriptWhat are LoadRunner parameter and parameterization?How to perform basic operations on LoadRunner parameters?How to get LoadRunner iteration number - using LoadRunner parameter?How to get LoadRunner iteration number - using global variable?LoadRunner correlation:Using Correlation in LoadRunner scripts - visual tutorialLoadRunner Correlation - How to capture an array of dynamic data with web_reg_save_param functionHow to select correct boundaries for web_reg_save_param LoadRunner function?Recording:LoadRunner VuGen scripting - How to automatically download file from server and save it to local disk?LoadRunner - How to record a file saving, performed by user from browser page?Controller:How to run LoadRunner Controller from comm
LoadRunner 9.1 (9.10) is coming soon! 2008-02-29 15:10:39 Have you noticed, that HP Knowledge Base contains a new version of LoadRunner - 9.10?Here it is:For the present day (Feb 29th, 2008) HP LoadRunner 9.1 (9.10) is not published yet for downloading.So, we have to wait for HP LoadRunner 9.1 (9.10) release or beta announcement...Well, what's new in the future LoadRunner?Please, see excerpts from HP LoadRunner 9.1 'What's new' file:Version 9.1 expands support for Web 2.0 applications by adding protocol support for Adobe’s popular AMF flash. This, alongside existing support for AJAX makes LoadRunner the solution of choice for Web 2.0 performance validation. In addition, LoadRunner 9.1 has enhanced testing capabilities for SOA and web services, as well as improved reporting for SOA performance metrics.Version 9.1 also adds support for Micr
How to get LoadRunner iteration number - using global variable? 2008-02-26 13:28:52 I continue explaning about LoadRunner iteration number.Well, how to determine the current iteration number?The first way is to use LoadRunner parameter od 'Iteration Number' type.It is described hereThe second way is to use a LoadRunner global variable.I will explain this approach now. Also, you will see how to define and use global variables.Define a global variableYou can add a new variable definition into vuser_init section of LoadRunner script:Then we will add a variable incrementation and usage into Action section of LoadRunner script. For example, like this:Please, note that LoadRunner does not require using of "extern" keyword.And last step is to open LoadRunner Run-time Settings and to set the desired total iteration count. In my example I set it to 3:That's all! Let's start
LoadRunner web_reg_find function - How to verify web page content? 2008-02-25 05:39:13 When you perform load testing, you have to be fully confident, that your application works correctly. It may be very usefull to check UI of application - is it shown correctly or not.This verification can be performed with 2 ways:Using LoadRunner content verification with web_reg_find function
Running LoadRunner GUI Vusers (QTP or WR scripts)The present LoadRunner tutorial describes content verifications with web_reg_find function. I will explain and show a usage of web_reg_find function, its attributes and result.To get additional information about the seconds approach (running LoadRunner GUI Vusers), please read the article How to execute QTP script from LoadRunner?How to add LoadRunner content verification?Let's start with LoadRunner demo Web application - Web Tours.I will show how Read more:verify
How to minimize/maximize QTP window before the QTP script execution? 2007-12-09 14:41:52 This is very useful feature - minimize QTP window before script
execution. It allows to observe a desktop or an application under test wholly.I will show and describe how to minimize (or maximize) QTP window programmatically - i.e. from QTP script.Also, provided approach can be applied to minimize (maximize) any required window - Browser, Notepad, MS Word or Excel, and so on.There are two ways to minimize QTP window: Using Minimize method of Window objectUsing QTP Application object - QuickTest.Application These methods will contain several lines only and I hope that my explanations will be understandable.So, let's explore! Using Minimize method of Window objectYou can use Minimize method of Window object to minimize QTP window (or any other).Let's see two cases - when a wi
QTP - How to get font size/color, background color and other attributes of controls 2007-12-09 14:37:59 Hello,Today I faced with the following task with QTP (QuickTest Professional) - how to get some attributes (such as: font size, font color, background
color and so on) for any control on a web page?Piece of cake! :)Let's see ways how it can be done.The task: get font size, font color, background color and others possible parameters from the gmail.com start page:The solution:First of all, I tried to use GetROProperty method.I selected "Welcome to Gmail" label with QTP object spy and added them to Object Repository:Well, now I know the class of web control - WebElement.Then, I open QuickTest Professional Help, search for "WebElement Identification Properties" and see that there are not needed properties (font name, font color, size, ...).Help reading shown that it is possible to get needed p
QTP - How to set/get system time and date? 2007-12-09 14:35:15 QTP allows running different types of test. And sometimes, it needs perform time and date manipulations on a computer. In this article, I will show and explain - how to get system time/date and change them.Actually, today's lecture consists of two questions:How to get system time and date?How to set system time and date? Let start training right now :)So, the first section is:How to get system time and date?Actually, this is not difficult task! Use the following functions:Now - function returns the current date and time according to the setting of your computer's system date and time.Date - function returns the current system date.Time - function returns a Variant of subtype Date indicating the current system time.So, the code is very simple. I provide it with a screen shot containin
How to get LoadRunner iteration number - using LoadRunner parameter? 2007-12-09 09:27:02 In some cases, you have to know the current iteration number, which is being executed.It would be great to have something like lr_iteration_number() function. Unfortunately, LoadRunner does not provide that function...In the present article, I will describe how to get a current iteration nunber, which is being executed in LoadRunner VuGen or Controller. Actually, I know two ways how to get current LoadRunner iteration number:LoadRunner parameter of 'Iteration Number' typeGlobal variable, which should be incremented each iterationToday, I will describe and explain first approach (parameter of 'Iteration Number' type). The second one (global variable) I will describe in the next article.Well, we are starting:LoadRunner parameter of 'Iteration Number' typeTo insert new parameter into Lo
Using parameters in Loadrunner VuGen script 2007-12-09 09:25:43 Parameterizing is a powerful thing in LoadRunner!Now, I'm going to demonstrate some tips and uses of them.Well, imagine the following situation...Let's we have created VuGen script
, which emulates the one user:The problem: script runs correctly in VuGen for one user, but it fails for several concurrent users. This happens since we recorded the VuGen script for the specific user:I marked "username" and "password" parameters
and values with red lines.Application under test (AUT) does not allow several sessions of the same user.So, if second concurrent VuGen user logs in to application, he gets an error:The solution: to parameterize the VuGen script.Implementation:Right click on a value we want to parameterize (in our case this is a username - "load1") and select "Replace with a parameter" me
How to perform basic operations on LoadRunner parameters? 2007-12-09 09:25:19 LoadRunner functions and scripts, containing in the present article, will be interested for LoadRunner beginners in the first place.I will describe - how to perform
basic mathematical operations on LoadRunner parameters
:How to convert LoadRunner parameter's value to integer number?How to save integer number to LoadRunner parameter?How to perform mathematical operations on LoadRunner parameter?You can use this article as a LoadRunner tutorial on LoadRunner parameter operations.Well... May I start? :) How to convert LoadRunner parameter's value to integer number?Actually, this is not a difficult task. We have to use 'atoi' function.'atoi' function converts a string to an integer value.Please, see the following code:lr_save_string("543210", "prmCounter");lr_output_message("String value
What are LoadRunner parameter and parameterization? 2007-12-09 09:24:31 This is a simple question - what is LoadRunner parameter? I've reread LoadRunner VuGen User's Guide v9, trying to find the exact definition of LoadRunner parameter. That's strange, but LoadRunner Help does not contain the exact answer on this question.In this article, I will answer basic questions, connected to LoadRunner parameters.I think, LR beginners should study this article carefully :)So, I recommend to read it, if you want to know:the definition of LoadRunner parameterLoadRunner parameter functionshow to create parameter in LoadRunner VuGen scriptwhich types of LoadRunner parameter are availablehow LoadRunner processes parameters - gets and sets their valuesother key concepts, connected to LR parameters OK, let's start.I've recorded Web (HTTP/HTML) simple script on Web Tours
LoadRunner Correlation - How to capture an array of dynamic data with web_reg_save_param function 2007-11-28 07:35:14 Imagine, that server returns the following response:(since blogspot.com doesn't show tags correctly, I'm reluctant to show server response as image) .And we have to capture
dynamic values of all IDs (underlined with green lines). These values can be used later - say, for LoadRunner script correlation.As usual, several solutions exist :) Let's see them:Insert five web_reg_save_param function
s using "Ord=1" (2, 3, ...) attribute:web_reg_save_param ("ID1Value", "LB= value=\"", "RB=\"", "Ord=1", LAST);web_reg_save_param ("ID2Value", "LB= value=\"", "RB=\"", "Ord=2", LAST);web_reg_save_param ("ID3Value", "LB= value=\"", "RB=\"", "Ord=3", LAST);web_reg_save_param ("ID4Value", "LB= value=\"", "RB=\"", "Ord=4", LAST);web_reg_save_param ("ID5Value", "LB= value=\"", "RB=\"", "Ord=5", LAST);Tips: Ple
Using Correlation in LoadRunner scripts - visual tutorial 2007-11-24 17:08:24 Today, I will explain - what is LoadRunner correlation and how to perform it.In my humble opinion, correlation is the key concept of LoadRunner. So, strong understanding of correlation is mandatory requirement for any test engineer, if he plans to be LoadRunner professional or even guru :)Example from a real practice:I recorded LoadRunner script for a web server, which contained two special fields - timestamp and checksum:web_submit_data("rms.jsp", "Action=", "Method=POST", "RecContentType=text/html", "Referer=", "Snapshot=t4.inf", "Mode=HTML", ITEMDATA, "Name=TIMESTAMP", "Value=1192177
How to select correct boundaries for web_reg_save_param LoadRunner function? 2007-11-24 16:54:22 I will explain and show - how to select correct boundaries for web_reg_save_param LoadRunner function
.web_reg_save_param is used for LoadRunner script correlation. That's why every load tester should study this function thoroughly, if you wish your scripts work correctly.Imagine that the server returns the following part of HTML page:Note: I will refer to this example later.What boundaries should be used in web_reg_save_param LoadRunner function to capture value of "ID1" (abcde)?The correct left boundary for web_reg_save_param function should be: ID1" value="And right boundary for web_reg_save_param is: "See the solution:Do you know why it is? I will explain in details.To find out the boundaries, we have to see texts located on the left and on the right.What is the text located
Broken links detection - LoadRunner tutorial 2007-11-21 06:54:37 Today, I will describe how to use LoadRunner for broken links
detection.'Broken
' link is 'not valid' link. This link usually returns 404 Error - "Page not found". Another side of broken links is that images other resources are not displayed.Using LoadRunner for broken links detection can be helpful, when you perform load testing of a site and you have to be sure, that all pages, images, applets, and other resources are available during the high server loading.LoadRunner allows broken links detection during:Script recordingScript executionBroken links detection during LoadRunner script recordingYou have to set appropriate recording options. For that, click 'Options...' button from 'Star Recording' dialog:'Recording Options' dialog opens. Here, set 'Add comment to script for HTTP e
resume 2007-11-20 04:02:04 Моё резюме.На русском языкеIn English
LoadRunner - How to record a file saving, performed by user from browser page? 2007-11-01 13:22:45 The problem:This is a frequently asked question - why file downloading from a browser
page (right mouse click, then "Save Target As...") was not recorded in LoadRunner VuGen script?The difference between functional and load testing:Actually, LoadRunner records a file transferring only, not downloading!This is the principal difference between functional and load testing! I will describe it.Functional testing is done from a user's viewpoint.What does a user see? It sees windows, dialogs, UI cotrols.For example, user can see downloaded html-page in a browser, or as plain text in a telnet session.In this case, data transferring is the same (HTTP protocol), while data representation varies (browser or telnet session).LoadRunner performs Load testing, i.e. it records and emulates data transferr
How to execute QTP script from LoadRunner? 2007-11-01 11:08:29 I'm a big fan of LoadRunner! Really. This is a wonderful tool for load and performance testing.Also, I like QTP. Not love it, just like :) It's powerful enough.That's why I decided to use them together - i.e. execute QTP script
from LoadRunner.I recorded simple QTP script - it just opens Google, performs search, then it clicks 'Next' button, and closes browser:QTP script is quite clear, I hope :)But I faced the questions:Should QTP be installed or not?Can several QTP scripts be executed simultaneously on one computer?Is it required special license for QTP and/or LoadRunner?How to do that - hotw to execute QTP script from LoadRunner?and others questions...It's OK :) I will share my experience and help you to answer these questions!Let's sort them out one after another...Should QTP be
LoadRunner - how to convert a plain text to URL format 2007-11-01 04:32:14 The task - How to convert a plain text string to URL-format
in LoadRunner?Several days ago I faced with a simple task - it was needed to convert a passed parameter (which was in a plain text form) to URL-format. In other words, I had to convert:string "ab" to the same string "ab"string "a b" to the string "a%20b"string "a b_c%" to "a%20b%5Fc%25"and so on ...The cause - Why it was needed?LoadRunner script contained parameters, which should be passed to URL directly. Some my parameters contained special characters like spaces (" "), quotes ("), percentage ("%"), asterisks ("*") and others. To be processed correctly by a browser and a web server, these characters should be translated and passed as their hex-codes.For example:a space character (" ") has hex-code 0x20, so it should be passed as
How to organize user-defined functions into LoadRunner library? 2007-10-26 14:19:05 Assume, you work and work in LoadRunner, create and create scripts.Eventually, you face the situation when your code is duplicated in many scripts. This is a wrong way! Take my word for it :)I will show - why it is and how to struggle against it.Duplicated code is an evil, because:If you fix/modify a duplicated code, you have to edit each occurrence of this code.It needs add debug messages into duplicated code, you have to add debug functions into each occurrence of this code.If you decide to change the algorithm, implemented in a duplicated code, you are reluctant to find and edit it in each occurrence of this code. If you have tens or hundreds VuGen tests, containing diplicated code, the support can become a nightmare. Rework will cost too much!!! You must avoid it from the beginning.Wel Read more:defined
, organize
LoadRunner VuGen scripting - How to automatically download file from server and save it to local disk? 2007-10-19 04:09:57 In my previous article, "How to record a file saving, performed by user from browser page?", I shown that user's activities are not recorded by LoadRunner. This is a rule!LoadRunner records file transferring from server
and does not record file saving.What to do, if you have to save transferred file to local disk?Continue reading, and you will get the solution :)So, Let's start.You can download file from a server with the web_url function.See an example:Image downloading:web_url("logo.gif", "URL=", "Resource=1", "RecContentType=image/gif", "Snapshot=t1.inf", LAST);This code downloads Google's logo image:To save this image as file to local disk, we have to perform these ste Read more:scripting
How to detect memory leaks with LoadRunner - visual tutorial 2007-08-21 16:47:48 Today, I plan to share my experience on the memory leaks detecting. This article is a step-by-step instruction on how to use HP/Mercury LoadRunner to perform load testing for the purpose of memory leaks discovering.The task:It needs perform testing of Web server to discover memory leaks.The solution:Create LoadRunner VuGen script for your application (Web server in my script)Let's suppose, we have done it:Actually, I will explain different tricks and features of VuGen scripts in the further posts.Create LoadRunner Controller scenario for your application using the VuGen scripts.Here it is:The next step is to add measurement monitors which are quantitative indicators of resources being monitored (for example, memory usage, CPU usage, handle and thread count, and so on).For that, on "Run" ta
Try to download LoadRunner 9.1... 2008-03-16 11:24:51 ... and be disappointed :(Yes, I tried to download LoadRunner 9.1 and was disappointed. Do you know why I was? OK, I will explain...Some time ago I wrote about new LoadRunner 9.1 - LoadRunner 9.1 (9.10) is coming soon!And two days ago I found, that LoadRunner 9.1 is available for downloading from HP site:It goes without saying, that I click the link 'Download a free 10-Day Trial of LoadRunner' to evaluate new version and share my impressions...Yes, HP uploaded trial LoadRunner 9.1 version:After that I pressed 'I Agree' btn to start downloading and... and I got the following error:It's a pity, that a Leader in Business Technology Optimization (I mean HP) allows such errors...Moreover! I got this error on this Friday (14th March 2008).The same error was present on yesterday (15th March).Noth
How to record QTP script - video tutorial 2008-03-23 18:16:08 Hello, dear readers!I'm glad to introduce my new visual tutorial. This is QTP (QuickTest Pro) video
tutorial and it explains how to record QTP script
s.The present QTP (QuickTest Pro) video tutorial covers the following:How to record QTP script for Web applicationsWhat record and run settings should be used to run and execute QTP scriptHow to replay/execute QTP scriptHow to get results of executed QTP scriptHow to enable capturing screenshots during QTP scipt replayingHow to enable capturing video during QTP scipt replayingHow to record QTP script - video tutorial - Part 1How to record QTP script - video tutorial - Part 2This is my first attempt to create Flash presentation :)In the future I will create video presentations on my favourite automated testing tools - QTP (QuickTest Pro), LR (
QTP - How to capture dynamic text 2008-04-01 16:57:23 This QTP video tutorial explain how to use QTP Text Output to capture
dynamic text.The present QTP (QuickTest Pro) video tutorial covers the following:How to use QTP to capture text from the pageSettings from QTP 'Output Text Value Properties' dialogExplanation for QTP Output valueExplanation for left & right boundariesHow to save QTP Output text value into QTP DataTableDifferences between Global and Local QTP DataTable sheetsHow to read value from QTP DataTableHow to capture dynamic textDear Reader!Do you have comments on this QTP video tutorial?Do you have suggestions for future QTP video tutorials?Do you have interesting thoughts to share with us?Do you have plans on how to cooperate with me and my blog?Do you have bright ideas on automated testing?If your answer is 'Yes', please
LoadRunner regular expressions 2008-04-14 02:39:31 I have a real challenge for LoadRunner specialists, professionals, and gurus.I would like to start new public investigation on LoadRunner regexp (regular
expressions).The reward is $52.25.As you know, LoadRunner supports limited and 'light' regular expressions. These are special text flags of web_reg_save_param function to support 'light' LoadRunner regular expressions:/DIG interprets the pound sign (#) as a wildcard for a single digit.For example, "te##xt" matches for "te23xt", and doesn't match for "text" and "te234xt"./ALNUM interprets the caret sign (^) as a wildcard for a single US–ASCII alphanumeric character.There are three syntaxes: ALNUMIC to ignore case, ALNUMLC to match only lower case, and ALNUMUC to match only upper case.For example, with ALNUMLC flag enabled, "te^^xt" match
[My money] - March 2008 - $52.25 2008-04-13 23:59:00 As you can see, I use AdSense on my blog.Note: AdSense is an ad serving program run by Google.My readers help me to earn money (not so much as I would wish :) ).That's why I think, that I must share the statistics on money I earned on blog.I plan to share the statistics on monthly basis.Please, see the statistics on last month - March
2008:(click to enlarge the image)As you can see, I earned $52.25 during March 2008.How to spend them?I promise to pay this money to person who will be ready to share how to use regular expressions in LoadRunner. So, investigate this question and will earn $52.25!Do you have others ideas on how to use this money? I'm interested to hear your opinion.Please, post your comments to this blog.Thank you in advance--Dmitry Motevich