Post on 06-Feb-2018
© Synopsys 2013 1
Does GUI Test Automation Float Your Boat?
A GUI Test Automation Case Study
Brian McGrathTest Lead
October 2013
© Synopsys 2013 2
Goal
• Provide introduction to GUI test automation • Share experience
GUI Test Automation – Brian McGrath
© Synopsys 2013 3
Who I Am
GUI Test Automation – Brian McGrath
© Synopsys 2013 4
Past
GUI Test Automation – Brian McGrath
© Synopsys 2013 5
Past
GUI Test Automation – Brian McGrath
© Synopsys 2013 6
Problem
Efficient to
Automate
Customer Value
Risk of Regression
GUI Test Automation – Brian McGrath
© Synopsys 2013 7
What We Want
Efficient to Automate
Customer Value
Risk of Regression
GUI Test Automation – Brian McGrath
© Synopsys 2013 8
What We Want
GUI Test Automation – Brian McGrath
do nothingmanual,unit
manual
automate
Efficient toAutomate
Risk ofRegression
CustomerValue
automate
automate
© Synopsys 2013 9
Plan
GUI Test Automation – Brian McGrath
Start With The Surmountable
© Synopsys 2013 10
Plan
GUI Test Automation – Brian McGrath
Get a Tool
InspectSpy++DebuggerSource Control
© Synopsys 2013 11
Plan
GUI Test Automation – Brian McGrath
• AutoIT is a GUI automation tool that has a simple scripting language and is relatively easy to use
• It’s free• Excellent help file• Strong community - forum and blogs (>850,000 posts)• Short and useful video tutorials • Large function library (>400 functions)• Scripts can be compiled as an executable and run on hosts that do not
have AutoIT installed (or not)
Get a Tool
© Synopsys 2013 12
Plan
GUI Test Automation – Brian McGrath
Chart The Course
FunctionsAssertsLogsControl IDsExecution/results
© Synopsys 2013 13
Plan
GUI Test Automation – Brian McGrath
Get Some Help
Roles (architect, testers, supporters)Development best practicesDevelopment assistance for testabilityCode reviewsCommunity
© Synopsys 2013 14
• Refactoring• Debugability (separate branch, traceability)• Source Control• Better code (avoid blind sends/“mouseClick”, set focus
where needed, wait for controls to be available)• Control IDs
Hurdles Overcome - Stability
GUI Test Automation – Brian McGrath
© Synopsys 2013 15
• Use development best practices– Fix bugs rather than implement kludges– Coding standards– Code reviews (not just with testers)– No recording– No sleeps– Code reuse
• Ask Developers to help troubleshoot• Ask Developers to change application for testability
Hurdles Overcome – Knowledge Transfer
GUI Test Automation – Brian McGrath
© Synopsys 2013 16
• Bugs found• Replace low-yield manual tests with automation• Extend to other applications• Familiarity• Solve a sticky problem• No insurmountable issues
Hurdles Overcome – Sustainability
GUI Test Automation – Brian McGrath
© Synopsys 2013 17
• Stable execution• Stable results• Refactoring proven• Found bugs• Replaced low-return manual tests (leaving more energy
for the high-return stuff)• Development changed product for testability• Others used the infrastructure built by the architect• Test suite growing• Extended to other applications
In The End (or is it the beginning?)
GUI Test Automation – Brian McGrath
© Synopsys 2013 18
Screenshots
GUI Test Automation – Brian McGrath
© Synopsys 2013 19
Function
GUI Test Automation – Brian McGrath
© Synopsys 2013 20
Call Functions
GUI Test Automation – Brian McGrath
© Synopsys 2013 21
Control Interaction
GUI Test Automation – Brian McGrath
© Synopsys 2013 22
Control IDs
GUI Test Automation – Brian McGrath
© Synopsys 2013 23
Built-in Functions
GUI Test Automation – Brian McGrath
© Synopsys 2013 24
Asserts/Logs
GUI Test Automation – Brian McGrath
© Synopsys 2013 25
Execution/Results
GUI Test Automation – Brian McGrath
© Synopsys 2013 26
Thank You