SlideShare a Scribd company logo
WIN RUNNER
Features of Winrunner:

Product: Mercury Interactive or Hewlett Packard(HP)

Purpose: Functionality and Regression Testing Tool

Kinds of application: All kinds of application (web Based and Window Based).

Language:Test Script Language

Technology: Object oriented Technology

Object Oriented Technology:

It will recognise each and every control/field present in the application as an object.
Each and every object present in the application has its own properties. The object
and their properties are get stored in the GUI Map File. Map File is the heart of the
winrunner.

Generating Map File:

Rapid Script Wizard:

The RapidTest Script Wizard will "walk through" your application by automatically
opening windows and dialog boxes. It will examine every GUI object (for example,
buttons, lists, and edit fields) and will learn a unique description of each one.

Recording

Context Sensitive:

WinRunner records the operations you perform on the GUI objects in your
application, and inserts the appropriate TSL statements into your test script.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.file->exit
6.stop the recording

Analog:

WinRunner records the operations you perform on your application, including
keyboard input, mouse clicks, and the exact coordinates of the mouse pointer as it
travels across your screen.
1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.file->open order, specify order no, click ok
5.file->fax order ,specify the fax number
6.click the record icon(context->analog)
7.put agent signature.
8. click the record icon(analog->context)
9.click send
10.file->exit
11.stop the recording

GUI Map Editor:

Enables you to view the contents of the GUI Map and to load and maintain GUI Map
files.

    Tools-Gui Map editor
    Open the application
    Use the learn tool to capture the application.

GUISPY:

Opens the GUI Spy, enabling you to view the properties of GUI objects in your
application

Tools->gui spy
Open the application
Use the spy icon to capture the object
press ctrl(L)+f3 to stop capturing.

Merging Map Files:
The GUI Map File Merge Tool enables you to merge multiple GUI map files into a
single GUI map file.

       GUI Map File Manual Merge Tool
       This tool opens after you chose to merge multiple GUI map files into a single
       GUI map file using the Manual Merge merge type.

       Tools->merge Gui map files
       Click ok
       Select merge type as Manual
       Browse the Target and Source File
       Click ok
       Select the object and click copy
       Click close

       GUI Map File Auto Merge Tool
       This tool opens after you tried to merge multiple GUI map files into a single
       GUI map file using the Auto Merge merge type, only if The merge tool found
       conflicts among the source GUI map files being merged.
Tools->merge Gui map files
       Click ok
       Select merge type as Auto
       Browse the Target and Source File
       Click ok

Synchronization Point:

Synchronization points enable you to solve anticipated timing problems between the
test and your application.

Tools->general options->settings->timeout for check point ->5000
1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.file->exit
6.stop the recording
7.Insert->synchronization point->for object/window place the cursor in the object
8.change the value-1 Time-10 and click paste
9.Run the test

CheckPoint:

It is used to compare the expected Result versus Actual Result.

GUI Checkpoint

       For Single Property:

       The property check verifies the value of a single property of a GUI object.

       Insert->gui checkpoint->single property
       Use the hand icon to select the object,
       Change the expected value

       For Object/Window:
       The checkpoint checks a single object or window in your application.

       Insert->gui checkpoint->from object/window
       Use the hand icon to select the object,
       Change the expected values

       For Multiple Objects (Create GUI Checkpoint dialog box):
       The checkpoint checks multiple objects in your application.

       Insert->gui checkpoint->for Multiple objects, click add object
       Use the hand icon to select the object
       Change the expected values
 Get Text
From Object/Window:

The text retrieval statement reads the text displayed in a window or in a
GUI object in your application.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.Insert->get text->from object/window
3.select the static text
4.close the application
5.stop the recording

if (text=="UserName:")
      printf("Valid user");
      else
      printf("InValid user");


From Screen Area:
The text retrieval statement reads the text displayed in a specified area on
your screen.

Bitmap Checkpoint

For Object/Window
Inserts a bitmap checkpoint into your test script. The checkpoint checks a
single object or window in your application.
1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.Help->about
5.Insert->bitmap check point->for object/window
6. Use the hand icon to select the object.
7. Close the application
8.stop recording
9.change the application from flight 4a/4b


For Screen Area:
Inserts a Bitmap checkpoint into your test script. You specify an area on
your screen that the checkpoint will check.
1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.Help->about
5.Insert->bitmap check point->for object/window
6. Draw the region u want to capture
7. Close the application
8.stop recording
9.change the application from flight 4a/4b


Database Checkpoint :

Default Check:

Inserts a database checkpoint into your test script.
Use a default database check to check the entire contents of a database
associated with your application.

Insert->databasecheckpoint->default check
Click ok
Select the dsn (Flight32)->ok
Select the orders table->select the field
Click next
Select order number-> less than equals to->some value (20)
Click next
Sort by order no->next
Finish
Run the test
Double click the end database
Database checkpoint window right click Edit Expected Data change
the value
Run the test
Change it to update mode
Run the test
Change it to Verify mode
Run the test

Custom Check:

Inserts a database checkpoint into your test script. The checkpoint checks
specified properties of the database.
Use a custom check to:

·      check the number of rows in a database

·      check the number of columns in a database

·      check specific information in the database
Insert->databasecheckpoint->Custom check
Select specify sql statement
Click next
Click create
Move to machine data source
Select flight32 dsn
Click ok
Specify the query as
“Select * FROM ORDERS”
Click finish
In the check database
Change the expected value
Run the test

Run Time Record Check:

The Runtime Record Checkpoint wizard, which enables you to insert a
Runtime Database Record checkpoint into your test script. The
checkpoint captures information from your application during the test run
and checks it against the corresponding record(s) in the database.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.Insert->databasecheckpoint->Run time record check
6.Click next
7.Select the dsn (Flight32)->ok
8.Select the orders table->select the field
9.Click next
10.Select order number-> equals to->order number (inserted during
recording)
11.Click next
12.click next
13.Finish
14.Use the hand icon to select the field-.click next
15.perform the above for all the value
16.close the application
17.stop recording
18.run the test.

Data Driver:
Enables you to parameterize lines in your test script so you may run your
test in a loop with different sets of data.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.file->exit
6.stop the recording
7.table->datadriver wizard
8.click next until you reach Agent name->select new column
9.click next. -> Perform the above specified for other field also
10.select show datatable now
11.specify the values.
12.run the test.

Regular Expression:

Regular expressions enable WinRunner to identify objects with varying
names or titles. A regular expression is a string that specifies a complex
search phrase

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.file->fax order->specify fax number->lick send
6. Close the application.
7.stop the recording
8.change the modification !Fax Order No. [0-9]*
9.Tools->Gui map editor->select the object->click modify->change in
both physical and logic description.

Break Point:
Adds or removes a breakpoint to or from the line where the cursor is
currently located.

1.Place the cursor in the regular Expression script
2.Right click->select Toggle Break point.
3.Run from Top
4.To execute from Break point->Run from Arrow

Compiled Modules:
Verify: Checks your application . This mode is relevant only for tests and
is not supported when working with components.

Debug: Debugs your test or component script.

Update: Updates the expected results.

Dialog Boxes:

a=create_input_dialog("Enter the name");
report_msg(a);

b=create_password_dialog("userName","Password",l,
p,1);
report_msg(l);
report_msg(p);

c=create_browse_file_dialog("*.*");
report_msg(c);


 d=create_list_dialog("Welcome to STC","course
Description","CATE+,CATE,ADST,CSTP");
 report_msg(d);

File Handling:

file_open("C:readme.txt",FO_MODE_READ);
file_open("C:readme2.txt",FO_MODE_WRITE);
i=0;
while(file_getline("C:readme.txt",line)==0)
{
i++;
file_printf("C:readme2.txt","%d "&toupper(line),i);
}
file_close("C:readme.txt");
file_close("C:readme2.txt");

User Defined Functions
public function multiple(a,b)
{
auto c;
c=a*b;
return c;
}

file->Test properties->testtype->Compiled Module.

Save the test

load("func1");
x=create_input_dialog("Enter a number");
y=create_input_dialog("Enter a number");
z=multiple(x,y);
report_msg(z);

save the test

Debug options:

Step:

The Step command assists with test script debugging by enabling you to
observe the response of your application as WinRunner executes each test
script line.

Step Into:

Step Into command assists with test script debugging by enabling you to
observe the response of your application as WinRunner executes each test
script line.

Step out:

Step Out command to eliminate the need to execute a called test or
function line-by-line using the Step and Step Into commands.

Step to cursor:
Step to Cursor command assists with test script debugging by letting you
run a pre-defined section of a test script.

Recovery Scenario:

An exception is an interruption occurs while executing the test.
An Interruption may be a window exception and application exception.

To overcome the exception we need to perform some recovery steps

Popup event:

      A specific window that pop ups during test run and interrupts the
      test.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name( less than 4 characters) and password
3.click ok(Error window)
4. specify agent name
5. click ok
6.close the application
7.stop recording
8.comment the line where you click ok in the error window
9.Run the test
10.click pause
11.Tools->recovery Manager.
12.click new
13.select popup->next->specify scenario name->next
14.select the window->next->select the ok button->next-> finish
15.un the test.

TSL event:
     A TSL return value that can cause an interruption in the test run.

1.Rec->start->programs->winrunner->sample applications->flight 4a
2.specify agent name and password
3.click ok
4.insert an order
5.In the script Copy the Fly from Location Line, change the Fly From
Location.(List_Select_item)
6.Run the test.
7.Click ok in the error window
8.Tools->recovery Manager.
9.click new
10.selectTSL event->next->specify scenario name->next
11.select the Tsl function(List_select_item)->error->E_Item_not_found-
>next.
12.click define Recovery function.
13.paste the script.
14.click ok-> click ok-> click finish.
15.save the script
16 open a new script->rightclick paste ->file->test properties->Test type
as Compiled module.
17.save the test
18.load(scriptname)
19.run the test

Watch List:

It enables you to monitor the values of variables, expressions, and arrays
while you debug a test script.

a=create_input_dialog(“Enter a Number”);
b= create_input_dialog(“Enter a Number”);
c=a*b;
d=c*b;
e=d*c;
f=e*d;
report_msg(g);

Watch list Expression: g=a+b+c+d+e+f

Virtual Object:

Tool Might recognise a standard application as a bitmap object.Hence by
using virtual object we can instruct the tool. To Handle the application
has a standard application.

Batch Test:
     It is used to execute Multiple Test in a single Batch Test.

      Call “script1”();
      Call “script2”();
      Call “script3”();

More Related Content

PPTX
Win runner testing tool
PDF
Winrunner
PPT
WinRunner Training
PPTX
Load runner & win runner
PPT
Testing
PPT
Loadrunner presentation
PPT
QTP Training by INFOTECH
PPTX
Load Runner
Win runner testing tool
Winrunner
WinRunner Training
Load runner & win runner
Testing
Loadrunner presentation
QTP Training by INFOTECH
Load Runner

What's hot (19)

PPSX
Test Complete
PPT
Hp Quick Test Professional
PPT
Testing_with_TestComplete
PPTX
Test complete, work done so far
DOCX
Qtp basics
PPTX
Automation Testing with Test Complete
PPT
QTP with Descriptive programming
PDF
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
PPT
Qtp Training
PPT
Qtp Basics
PPTX
Automation Testing with TestComplete
PPT
Ppt Qtp
PPT
First QTP Tutorial
PPT
Qtp 92 Tutorial
PPTX
QTP Power Point Presentation
DOC
LoadTracer
PPT
QTP Slides Presentation.
DOCX
Integrate UFT with Jenkins Guide
Test Complete
Hp Quick Test Professional
Testing_with_TestComplete
Test complete, work done so far
Qtp basics
Automation Testing with Test Complete
QTP with Descriptive programming
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
Qtp Training
Qtp Basics
Automation Testing with TestComplete
Ppt Qtp
First QTP Tutorial
Qtp 92 Tutorial
QTP Power Point Presentation
LoadTracer
QTP Slides Presentation.
Integrate UFT with Jenkins Guide
Ad

Viewers also liked (20)

ODP
Software testing tools
PPTX
Software testing ppt
PPTX
Testing documents: A quick introduction to usability testing for Clarity Inte...
PDF
How to Become a Thought Leader in Your Niche
PPTX
Journey maps: pitfalls and possibilities
PPTX
Forms that work, a workshop organised by UX Australia 2015
DOC
Diff between win runner vs and qtp
PDF
Testing Tools
DOC
Basic Differences Between Winrunner And Qtp
PDF
Инфошкола #3
PDF
Бюллетень "Инфошкола". Выпуск 23
PDF
Журнал "Информационный город", №12
PDF
Презентация городской государственной программы "Информационный город"
PPTX
People Of Egypt
PPTX
РИФ 2014, API Единой мобильной системы
PDF
Agile (mal)Practices Considered Harmful
PDF
1º avaliação do efeito de entulhos reciclados nas propriedades das argamassas...
PDF
Customer experience
PDF
Журнал "Инфогород". Выпуск 9
PDF
SStarcom MediaVest Group, Supermarket UK: A Very Social Christmas
Software testing tools
Software testing ppt
Testing documents: A quick introduction to usability testing for Clarity Inte...
How to Become a Thought Leader in Your Niche
Journey maps: pitfalls and possibilities
Forms that work, a workshop organised by UX Australia 2015
Diff between win runner vs and qtp
Testing Tools
Basic Differences Between Winrunner And Qtp
Инфошкола #3
Бюллетень "Инфошкола". Выпуск 23
Журнал "Информационный город", №12
Презентация городской государственной программы "Информационный город"
People Of Egypt
РИФ 2014, API Единой мобильной системы
Agile (mal)Practices Considered Harmful
1º avaliação do efeito de entulhos reciclados nas propriedades das argamassas...
Customer experience
Журнал "Инфогород". Выпуск 9
SStarcom MediaVest Group, Supermarket UK: A Very Social Christmas
Ad

Similar to Winrunner (20)

DOC
Interview questions in qtp
PDF
Getting started with appium
PPT
Getting started with android dev and test perspective
PPT
Industrial Training in Android Application
PDF
Android Programming Basics
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
PDF
Testing Android applications with Maveryx
DOCX
AppiumSetupConfigurationonWindows
PPT
QTP - 1.ppt automation qtp and guide of q
PPT
Android
PPT
Qtp training
PPT
Qtp training
PPT
Qtp training
DOC
Hp Load Runner Tutorial 1 How Do We Record An Application Using Load Runner
PDF
RFT Tutorial 11 How To Data Drive A Test Script Using Ibm – Rational Function...
PPTX
How to create android applications
PPTX
Mobile Worshop Lab guide
DOC
Qtp interview questions3
DOC
Qtp interview questions3
PPT
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...
Interview questions in qtp
Getting started with appium
Getting started with android dev and test perspective
Industrial Training in Android Application
Android Programming Basics
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
Testing Android applications with Maveryx
AppiumSetupConfigurationonWindows
QTP - 1.ppt automation qtp and guide of q
Android
Qtp training
Qtp training
Qtp training
Hp Load Runner Tutorial 1 How Do We Record An Application Using Load Runner
RFT Tutorial 11 How To Data Drive A Test Script Using Ibm – Rational Function...
How to create android applications
Mobile Worshop Lab guide
Qtp interview questions3
Qtp interview questions3
viWave Study Group - Introduction to Google Android Development - Chapter 23 ...

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet
Microbial disease of the cardiovascular and lymphatic systems
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
102 student loan defaulters named and shamed – Is someone you know on the list?
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
TR - Agricultural Crops Production NC III.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharma ospi slides which help in ospi learning
Complications of Minimal Access Surgery at WLH
Final Presentation General Medicine 03-08-2024.pptx
Supply Chain Operations Speaking Notes -ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Cell Structure & Organelles in detailed.
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
O7-L3 Supply Chain Operations - ICLT Program
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Winrunner

  • 1. WIN RUNNER Features of Winrunner: Product: Mercury Interactive or Hewlett Packard(HP) Purpose: Functionality and Regression Testing Tool Kinds of application: All kinds of application (web Based and Window Based). Language:Test Script Language Technology: Object oriented Technology Object Oriented Technology: It will recognise each and every control/field present in the application as an object. Each and every object present in the application has its own properties. The object and their properties are get stored in the GUI Map File. Map File is the heart of the winrunner. Generating Map File: Rapid Script Wizard: The RapidTest Script Wizard will "walk through" your application by automatically opening windows and dialog boxes. It will examine every GUI object (for example, buttons, lists, and edit fields) and will learn a unique description of each one. Recording Context Sensitive: WinRunner records the operations you perform on the GUI objects in your application, and inserts the appropriate TSL statements into your test script. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.file->exit 6.stop the recording Analog: WinRunner records the operations you perform on your application, including keyboard input, mouse clicks, and the exact coordinates of the mouse pointer as it travels across your screen. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok
  • 2. 4.file->open order, specify order no, click ok 5.file->fax order ,specify the fax number 6.click the record icon(context->analog) 7.put agent signature. 8. click the record icon(analog->context) 9.click send 10.file->exit 11.stop the recording GUI Map Editor: Enables you to view the contents of the GUI Map and to load and maintain GUI Map files.  Tools-Gui Map editor  Open the application  Use the learn tool to capture the application. GUISPY: Opens the GUI Spy, enabling you to view the properties of GUI objects in your application Tools->gui spy Open the application Use the spy icon to capture the object press ctrl(L)+f3 to stop capturing. Merging Map Files: The GUI Map File Merge Tool enables you to merge multiple GUI map files into a single GUI map file. GUI Map File Manual Merge Tool This tool opens after you chose to merge multiple GUI map files into a single GUI map file using the Manual Merge merge type. Tools->merge Gui map files Click ok Select merge type as Manual Browse the Target and Source File Click ok Select the object and click copy Click close GUI Map File Auto Merge Tool This tool opens after you tried to merge multiple GUI map files into a single GUI map file using the Auto Merge merge type, only if The merge tool found conflicts among the source GUI map files being merged.
  • 3. Tools->merge Gui map files Click ok Select merge type as Auto Browse the Target and Source File Click ok Synchronization Point: Synchronization points enable you to solve anticipated timing problems between the test and your application. Tools->general options->settings->timeout for check point ->5000 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.file->exit 6.stop the recording 7.Insert->synchronization point->for object/window place the cursor in the object 8.change the value-1 Time-10 and click paste 9.Run the test CheckPoint: It is used to compare the expected Result versus Actual Result. GUI Checkpoint For Single Property: The property check verifies the value of a single property of a GUI object. Insert->gui checkpoint->single property Use the hand icon to select the object, Change the expected value For Object/Window: The checkpoint checks a single object or window in your application. Insert->gui checkpoint->from object/window Use the hand icon to select the object, Change the expected values For Multiple Objects (Create GUI Checkpoint dialog box): The checkpoint checks multiple objects in your application. Insert->gui checkpoint->for Multiple objects, click add object Use the hand icon to select the object Change the expected values Get Text
  • 4. From Object/Window: The text retrieval statement reads the text displayed in a window or in a GUI object in your application. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.Insert->get text->from object/window 3.select the static text 4.close the application 5.stop the recording if (text=="UserName:") printf("Valid user"); else printf("InValid user"); From Screen Area: The text retrieval statement reads the text displayed in a specified area on your screen. Bitmap Checkpoint For Object/Window Inserts a bitmap checkpoint into your test script. The checkpoint checks a single object or window in your application. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.Help->about 5.Insert->bitmap check point->for object/window 6. Use the hand icon to select the object. 7. Close the application 8.stop recording 9.change the application from flight 4a/4b For Screen Area: Inserts a Bitmap checkpoint into your test script. You specify an area on your screen that the checkpoint will check. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.Help->about 5.Insert->bitmap check point->for object/window 6. Draw the region u want to capture 7. Close the application
  • 5. 8.stop recording 9.change the application from flight 4a/4b Database Checkpoint : Default Check: Inserts a database checkpoint into your test script. Use a default database check to check the entire contents of a database associated with your application. Insert->databasecheckpoint->default check Click ok Select the dsn (Flight32)->ok Select the orders table->select the field Click next Select order number-> less than equals to->some value (20) Click next Sort by order no->next Finish Run the test Double click the end database Database checkpoint window right click Edit Expected Data change the value Run the test Change it to update mode Run the test Change it to Verify mode Run the test Custom Check: Inserts a database checkpoint into your test script. The checkpoint checks specified properties of the database. Use a custom check to: · check the number of rows in a database · check the number of columns in a database · check specific information in the database
  • 6. Insert->databasecheckpoint->Custom check Select specify sql statement Click next Click create Move to machine data source Select flight32 dsn Click ok Specify the query as “Select * FROM ORDERS” Click finish In the check database Change the expected value Run the test Run Time Record Check: The Runtime Record Checkpoint wizard, which enables you to insert a Runtime Database Record checkpoint into your test script. The checkpoint captures information from your application during the test run and checks it against the corresponding record(s) in the database. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.Insert->databasecheckpoint->Run time record check 6.Click next 7.Select the dsn (Flight32)->ok 8.Select the orders table->select the field 9.Click next 10.Select order number-> equals to->order number (inserted during recording) 11.Click next 12.click next 13.Finish 14.Use the hand icon to select the field-.click next 15.perform the above for all the value 16.close the application 17.stop recording 18.run the test. Data Driver:
  • 7. Enables you to parameterize lines in your test script so you may run your test in a loop with different sets of data. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.file->exit 6.stop the recording 7.table->datadriver wizard 8.click next until you reach Agent name->select new column 9.click next. -> Perform the above specified for other field also 10.select show datatable now 11.specify the values. 12.run the test. Regular Expression: Regular expressions enable WinRunner to identify objects with varying names or titles. A regular expression is a string that specifies a complex search phrase 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.file->fax order->specify fax number->lick send 6. Close the application. 7.stop the recording 8.change the modification !Fax Order No. [0-9]* 9.Tools->Gui map editor->select the object->click modify->change in both physical and logic description. Break Point: Adds or removes a breakpoint to or from the line where the cursor is currently located. 1.Place the cursor in the regular Expression script 2.Right click->select Toggle Break point. 3.Run from Top 4.To execute from Break point->Run from Arrow Compiled Modules:
  • 8. Verify: Checks your application . This mode is relevant only for tests and is not supported when working with components. Debug: Debugs your test or component script. Update: Updates the expected results. Dialog Boxes: a=create_input_dialog("Enter the name"); report_msg(a); b=create_password_dialog("userName","Password",l, p,1); report_msg(l); report_msg(p); c=create_browse_file_dialog("*.*"); report_msg(c); d=create_list_dialog("Welcome to STC","course Description","CATE+,CATE,ADST,CSTP"); report_msg(d); File Handling: file_open("C:readme.txt",FO_MODE_READ); file_open("C:readme2.txt",FO_MODE_WRITE); i=0; while(file_getline("C:readme.txt",line)==0) { i++; file_printf("C:readme2.txt","%d "&toupper(line),i); } file_close("C:readme.txt"); file_close("C:readme2.txt"); User Defined Functions
  • 9. public function multiple(a,b) { auto c; c=a*b; return c; } file->Test properties->testtype->Compiled Module. Save the test load("func1"); x=create_input_dialog("Enter a number"); y=create_input_dialog("Enter a number"); z=multiple(x,y); report_msg(z); save the test Debug options: Step: The Step command assists with test script debugging by enabling you to observe the response of your application as WinRunner executes each test script line. Step Into: Step Into command assists with test script debugging by enabling you to observe the response of your application as WinRunner executes each test script line. Step out: Step Out command to eliminate the need to execute a called test or function line-by-line using the Step and Step Into commands. Step to cursor: Step to Cursor command assists with test script debugging by letting you run a pre-defined section of a test script. Recovery Scenario: An exception is an interruption occurs while executing the test.
  • 10. An Interruption may be a window exception and application exception. To overcome the exception we need to perform some recovery steps Popup event: A specific window that pop ups during test run and interrupts the test. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name( less than 4 characters) and password 3.click ok(Error window) 4. specify agent name 5. click ok 6.close the application 7.stop recording 8.comment the line where you click ok in the error window 9.Run the test 10.click pause 11.Tools->recovery Manager. 12.click new 13.select popup->next->specify scenario name->next 14.select the window->next->select the ok button->next-> finish 15.un the test. TSL event: A TSL return value that can cause an interruption in the test run. 1.Rec->start->programs->winrunner->sample applications->flight 4a 2.specify agent name and password 3.click ok 4.insert an order 5.In the script Copy the Fly from Location Line, change the Fly From Location.(List_Select_item) 6.Run the test. 7.Click ok in the error window 8.Tools->recovery Manager. 9.click new 10.selectTSL event->next->specify scenario name->next 11.select the Tsl function(List_select_item)->error->E_Item_not_found- >next. 12.click define Recovery function. 13.paste the script.
  • 11. 14.click ok-> click ok-> click finish. 15.save the script 16 open a new script->rightclick paste ->file->test properties->Test type as Compiled module. 17.save the test 18.load(scriptname) 19.run the test Watch List: It enables you to monitor the values of variables, expressions, and arrays while you debug a test script. a=create_input_dialog(“Enter a Number”); b= create_input_dialog(“Enter a Number”); c=a*b; d=c*b; e=d*c; f=e*d; report_msg(g); Watch list Expression: g=a+b+c+d+e+f Virtual Object: Tool Might recognise a standard application as a bitmap object.Hence by using virtual object we can instruct the tool. To Handle the application has a standard application. Batch Test: It is used to execute Multiple Test in a single Batch Test. Call “script1”(); Call “script2”(); Call “script3”();