Professional Documents
Culture Documents
Introduction
Techniques
Implementation
Results
Conclusion
GUI Testing
• Graphic User Interface(GUI) testing is defined as the process of testing the
system's Graphical User Interface of the Application Under Test.
• GUI testing involves checking the screens with the controls like menus, buttons,
icons, and all types of bars - toolbar, menu bar, dialog boxes and windows, etc.
• GUI testing is the most critical part of any software testing
• In the back decade, this test performs manually, so after each new revision of
software all the tests have to perform again if the complete functionality check is
the requirement for the project and which is or should be in most of the cases.
• Manual testing affects in product delay and increase in cost and work and can
also have human errors and imperfect results. So in modern days automation
tools are used to check software functionality.
These automated tools should have some basic factors to perform GUI
testing which are
Record and play feature to record users contribution
Capturing values and images from screen and ability to compare or
store it or know their properties
Compile and execute script and after successfully running ability to
display result neatly
GUI Automation tools
• UFT
• Selenium
• TestComplete
• Ranorex
• Telerik Test Studio
• Tosca TestSuite
• Watir
All the testing tool give good response on software which are based on java,
oracle, Delphi, WPF, Web etc. But when it comes to VC++ based software
testing tools detects this as normal windows box so they captures only the
primary factors like width and height of box, Window style, etc. They are not
able to capture runtime properties (Native properties of object) so the testing
of these product becomes very difficult and some major issue/difficulties
arises during testing.
In this paper we will try to eliminate most of the problems using techniques
which can be used on windows based application. To understand the
problems we are going to use demo application which is based on VC++.
Some of the techniques are not only useful for Windows based application,
but they are also helpful in application which are based on other platforms
(Some are mentioned above). So we will look one by one to the problems
their solution and implementation of the solution on demo application.
Solution Explorer
Solution Explorer shows all the components associated with a test in a
hierarchical manner. To see this pane, go to View > Solution Explorer.
Menu Bar
It contains all the menu links.
Properties window
It shows the test details like author , created by, Test add ins, Description and
facilitates addition and modifications of new settings. To view this pane, choose
View > Properties.
Tool Box
The tool box conatains the list if library and local functions and object
repository and allows user to drag and drop the same. To view this pane,
choose View > ToolBox.
Output Tab
Output tab allows user to view the run time output. To view this
pane, choose View > Output.
Data Tab
The data tab shows data related to test in a spreadsheet. To view this
pane, choose View > Data.
Error Pane
The error pane shows all detected errors. To view this pane, choose
View > Errors.
Testing Process in UFT
•Debug
Run •Execute Tests
Object Repository
• An object repository is a storehouse or hub for the test objects and properties used
in the test.
• During recording process under test, all objects and its properties records,
automatically.
• These objects and properties play a vital role in UFT, without these two things
UFT could not play back the scripts.
• Run time objects are stored representations objects values and properties, used by
UFT to run the test
• There are 2 Types of Object Repository (OR)
Shared OR
Local OR
Types of Object Repository
Shared object repositories. Test objects that store in this repositories
used by multiple actions.
This flexibility makes it the ideal repository type for storing and
preserving test objects.
When we involve shared object repository with an action, the test
objects of the repository automatically gets involve with that particular
action. When any changes we do with an object of a shared object
repository, will automatically reflect to all steps of the action to which
object is associated
Types of Object Repository
Local object repositories-Test objects that
store in this repositories used in one specific
action.
The objects stored in this type of repository
cannot be used in any other action.
The repository is useful for backing up your
test objects, or for learning new objects.
Object Spy
Object Spy is a utility/option used to add
objects to the Object Repository.
Object Spy can be retrieved from the tool bar
Once user clicks on the Object Spy icon, the
Object Spy Dialog box opens
Keyword and Expert View
Scripts can be displayed in UFT in two ways either as a Visual Basic Script (VB Script)
program (expert view), or as a sequence of steps labeled by icons (keyword view).
Expert View
• Expert view facilitates user write code in a VB Script, User can generate code, debug
and run it.
• User has to write a code in VB script
• User can choose keyword view from View >Editor.
Keyword View
• Keyword view facilitates user to enter and view code in a tabular format, User can
generate steps, add parameters and perform operations.
• User can easily add steps and understand the flow.
• Does not require any coding skill.
• User can choose keyword view from View >Keyword View
Record and Play Back
Record and playback is a functionality which allows user to record user
actions and play them back.
The first and simple test formation technique in UFT is record and
playback.
During the functional testing of the application, Record function records
the user actions of the application to automatically generate the scripts that
can be played back later.
Using record function, users can automation build scripts without knowledge
of any scripting language.
For the web based testing, recording is supported on Internet Explorer
both 32 and 64 bit version and even on Apple safari (on Remote Mac
computer).
Modes of Recording
Normal Recording : This is the default Recording mode that records
the objects and the operations performed on the application under test.
Analog Recording : This records not only the keyboard actions but also
the mouse movements relative to the screen or the application window.
Low-Level Recording : This records the exact co-ordinates of the objects
independent of the fact whether UFT recognizes the object or NOT. It
just records the co-ordinates, hence does NOT record mouse
movements.
Insight Recording : UFT records operation based on its appearance and
NOT based on its native properties.
Test Results
This window shows the test summary after each execution of test.
It consist of the following
Test Summary
Test passed and Test Failed
Graph Results
The test results can be exported following file formats
Pdf
HTML file
We can configure the test to take screen shots in case of errors and warnings
We can also configure defect tracking tool to report defects upon error.
Test Status Summary
Check Point
Checkpoint refers to the validation point that compares the actual properties of object
with expected value.
There are several checkpoints available in UFT
Checkpoint Property
1 Error Handling Methods Using QTP Test settings, Errors can be handled in QTP.
2 Synchronization Matches the AUT and automation script time by adding wait or adding
synchronization points.
3 On error method On error method is used to handle any runtime errors and decide the
flow of the test, Eg: On Error resume next.
4 Recovery Scenarios Recovery Scenarios handle the unexpected errors which occur at run
time.
5 Reporter Objects Reporter Object helps us to report an event to the run results. It helps us
to identify if the concerned action/step is pass/fail.
6 Using Err object Err objects are used for storing errors generated at run time.
7 Conditional statements If else statements can be used to write conditions to handle errors.
Recovery Scenarios
Recovery Scenarios handle the unexpected errors which occur at run time.
Recovery scenario consists of
Trigger Event - The action or event which interrupts the application.
For E.g.: Pop Up.
Recovery Operations - The operation which helps to recover from that scenario.
E.g. : Closing the pop up.
Post Recovery Test Run – The instruction on how the rest of the test should run and
continue.
Eg: Repeating the test or skipping it etc.
Recovery scenarios are saved in recovery scenario files having the extension .rs.
A recovery scenario file is a logical collection of recovery scenarios, grouped
according to your own specific requirements
Advantage and Disadvantage ofUFT
Advantages
• Freely Combined with Test Management Tool (HP-ALM) which allows easy scheduling
and Monitoring.
• Very simple and easy to use and understand, very easy to navigate, provides very user-
friendly results validation and Report generation process.
• Ithas become very significant for Mobile Application Testing.
• Although, it is a HPproduct, HPprovides it full support in any manner.
• Development process of UFT automation testing uses VBScript language which comes
with very much skilled and easy code as compare to any other object oriented
programming languages.
Advantage and Disadvantage ofUFT
Disadvantages
• Although, it is a commercial tool, very costly to purchase its
license.
• UFT scripting process takes less time, but execution process takes
relatively more time and increases load on CPU& RAM.
• UFT does not work with all browsers’ versions, testers are always
depend on patch file of the browser particular version.
• UFT works only on Windows OS.
Techniques And Their Implementation
Moving Vertical Text Recognition Technique
Finding Part of Text for Windows based Application
Working with Excel and Datatable
Finding Useful Data in Excel Dynamically
Simplified Results
Global Accessible Database
Image Text Recognition Technique
Image Based Testing using Insight Object for Windows Based
Application
Handling Changes in Software Structure
RESULTS AND CONCLUSION
In this paper, GUI testing techniques are explained for windows based
application using automation tool UFT (QTP). Some of the techniques
like Handling changes in software structure, Global accessible
database, Finding data in excel, Simplified result can be implemented
on most of the ob- ject.This paper is helpful for project which needs to
store database globally, having result in in simplified excel sheet and
UFT doesn’t recognizing all objects in application.