GUI Frameworks - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

GUI Frameworks

Description:

GUI Frameworks – PowerPoint PPT presentation

Number of Views:71
Avg rating:3.0/5.0
Slides: 18
Provided by: toddp3
Category:
Tags: gui | frameworks | in | peeing | public

less

Transcript and Presenter's Notes

Title: GUI Frameworks


1
Test Automation GUI Frameworks
Todd Pasley K. J. Ross Associates Pty. Ltd. PO
Box 131, West Burleigh, 4219 Ph 07 5522 5131
Fax 07 5522 5232 toddp_at_kjross.com.au http//www.kj
ross.com.au
2
Overview
  • GUI Test Automation
  • What is different about testing via GUIs?
  • Methods of GUI automation
  • Tools
  • Key Framework Elements
  • Our Approach
  • Complexity Issues
  • Future Work

3
Example System Architecture
Client
Web
.NET
Interface
Interface
HTTP/S
Web Tier
Servlet
Engine
SOAP
XML
Application Tier
Application
Server
ODBC/SQL
Database Tier
Database
4
Common Automation Choices
Client
Web
.NET
GUI Harness
Interface
Interface
HTTP/S
Web Tier
Servlet
Engine
SOAP
XML
Application Tier
Application
Server
ODBC/SQL
Database Tier
Database
5
Types of GUI Automation Tools
  • Analogue
  • Hooks into keyboard and mouse events
  • Playback occurs by co-ordinates
  • Any GUI change results in script change
  • Object Recognition
  • Playback occurs based on objects
  • Not positional dependant
  • Greater allowance for GUI change
  • Difficult to automatically detect all types of
    objects

6
GUI Testing Tools
  • Abbot http//abbot.sourceforge.net/
  • IBM Rational Robot http//www.ibm.com/
  • WinRunner http//www.mercury.com/
  • SAFS http//safsdev.sourceforge.net/
  • QARun http//www.compuware.com/
  • Xrunner http//www.mercury.com/
  • TestQuest http//www.testquest.com/
  • Others http//testingfaqs.org/t-gui.html

7
Action Word Approach
Actions
GUI Map
Steps
Target System
8
Key Framework Elements
  • GUIMap
  • Used represent objects which can be verified or
    have actions performed on
  • Actions
  • Used to define how actions are performed on
    objects
  • Assertions
  • Used to assert the state or value of a object
  • Test Scripts
  • Specify what actions to perform
  • Specify what to assert

9
Example GUI Map
  • ltmapgt
  • ltitem id"APP" name"SampleMarketApplication"
    type"Window"gt
  •     ltitem id"APP-0" name"ContractInfo"
    type"MSFlexGrid" /gt
  •   ltitem id"APP-1" name"Contract"
    type"ComboBox" /gt
  •     ltitem id"APP-2" name"Tab" type"TabStrip"
    /gt
  •     ltitem id"APP-3" name"Options" type"Option"
    /gt
  •     ltitem id"APP-4" name"Futures" type"Option"
    /gt
  •     ltitem id"APP-5" name"Exchange"
    type"ComboBox" /gt
  • lt/itemgt
  • lt/mapgt

10
Example Actions
  • ltactiongt
  • ltsetfocusgt
  • ltitem typename"gtAPPLICATIONNAMElt/itemgt
  • lt/setfocusgt
  • ltclickmenugtMENUlt/clickmenugt
  • lt/actiongt
  • ltactiongt
  • ltsettextgt
  • ltitem typename"gtTEXTBOXNAMElt/itemgt
  • lttextgtNEWTEXTlt/textgt
  • lt/settextgt
  • lt/actiongt

11
Example Assertions
  • ltassertiongt
  • ltverifygridelementgt
  • ltitem type"name"gtGRIDNAMElt/itemgt
  • ltgridelementgt
  • ltrowgtROWlt/rowgt
  • ltcolumngtCOLlt/columngt
  • lt/gridelementgt
  • ltgridvaluegtGRIDVALUElt/gridvaluegt
  • lt/verifygridelementgt
  • lt/assertiongt
  • ltassertiongt
  • ltverifytextgt
  • ltitem typename"gtTEXTBOXNAMElt/itemgt
  • lttextgtTEXTVALUElt/textgt
  • lt/verifytextgt
  • lt/assertiongt

12
Example Test Script
  • Test Case TC-SFT-01 - Launching Calculator
  • \TC-SFT-01, WinGUIAction,launch,Launch
    Calculator,APPcalc.exe,MAPcalc
  • Test Case TC-SFT-02 - Change view from
    standard to scientific mode
  • \TC-SFT-02, WinGUIAction,clickmenu,View in
    Scientific Mode,MENUampView-gtampScientific
  • Test Case TC-SFT-03 - Send Keys attempting to
    divide by 0
  • \TC-SFT-03, WinGUIAction,sendkeys,Attempt to
    divide by 0,KEYS3/0
  • Test Case TC-SFT-04 - Click the equals button
  • \TC-SFT-04, WinGUIAction,clickbutton,Click the
    'equals' button,BUTTONNAME\
  • Test Case TC-SFT-05 - Send Keys attempting to
    divide by 0
  • \TC-SFT-05,WinGUIAssert,verifytext,Check for
    error,TEXTBOXResultBox,TEXTVALUECannot divide
    by zero.

13
Action Words Architecture
Keyword
analyser
Test
scripts
Config
Database
files
Utility
Transactions
Variable
storage and
Test case
retrieval
statistics
Launch
SetText
..
VerifyText
Playback Engine
(Agent)
TCP/IP
GUIMap
Application specific
WIN32 Module
Other Perl Libraries
Templates
Framework
14
WIN32 Common Controls
  • Common Controls
  • Textbox, CommandButton, ComboButton etc
  • MS developed public functionality to ensure
    compatibility with 3.11
  • Very simple to verify and perform actions
  • Various resources available

15
Non-Common Controls
  • Custom controls
  • Win32 API will not be available
  • Developers of custom controls can provide
  • Copies of objects
  • Hooks into objects (possible address space
    issues)
  • OLE/COM server
  • Standard non-common controls
  • E.g. MSFlexGrid
  • Requires strong understanding of WIN32
    Architecture
  • DLL injection to counteract address space issue
  • Function interception
  • VTable modification
  • GDI hooking Repaint

16
Action Words Architecture
Keyword
analyser
Test
scripts
Config
Database
files
Utility
Transactions
Variable
storage and
Test case
retrieval
Advanced Object
statistics
Libraries
Launch
SetText
..
VerifyText
Playback Engine
(Agent)
TCP/IP
Application specific
GUIMap
WIN32 Module
Other Perl Libraries
Templates
Framework
Both
17
Further Work
  • Capture component
  • Generic approach for non-common controls
  • Extensibility improvements
  • nUnit Forms Integration
  • X-Windows
Write a Comment
User Comments (0)
About PowerShow.com