SlideShare a Scribd company logo
Complementing GUI Testing Scripts
with Smart Monkey Testing
Dr. Pekka Aho
Open University of the Netherlands
Automated GUI testing scripts
Traditionally GUI testing scripts are…
• designed manually
• captured with C&R tools, or
• manually written test scripts
• static until maintenance required
• maintained manually
• for regression testing
• checking the correctness of a selected
set of functionality and properties
2
Test step 1
Check detail A
Check detail B
Test step 2
Check detail C
Monkey testing
In monkey testing, the tests are…
• generated during run-time
• no test scripts to maintain
• dynamic, randomness often included
• multiple executions could yield different
results
• closer to robustness testing than
functional testing
• trying to find incorrectness anywhere in
the system under testing
3
Monkey testing complements scripts
GUI testing scripts and monkey testing…
• find different kind of failures
• cover different parts of code
4
Tool New bugs Known
bugs
Selenium 2 high 1 high
TESTAR 2 high
4 low
-
Tool % IC % LC % MC
Espresso 43,9 43,4 45,9
TESTAR 41,0 40,7 40,8
combined 52,3 52,1 52,3
Monkey testing complements scripts
5
GUI
testing
scripts Monkey
testing
Random monkey
testing with only
the default TESTAR
test oracles can be
surprisingly
efficient…
Cap Gemini/ProRail
• Academia/industry cooperation
• Web application: Java based (JEE6)
with 12,263 LOC
• System for managing the assignment
of train platforms
• Existing test approach: manual with
100 test cases.
• After a change in the application: all
100 test cases were executed as
regression tests
TESTAR Manual
Preparation 44 hour 43 hour
Testing (51 hour) 6 hour
Post testing 5 hour 2 hour
Critical faults 4 0
Functional
coverage
80% 73%
How to make the monkey smarter
The monkey testing tool can be enhanced with…
• a memory (model) to remember where it has
been and what it has done
• pre-defined information about the SUT
• how to reach in every part of the SUT (e.g., login)
• SUT-specific test inputs or test oracles
• improved action selection algorithms
• AI or ML to learn how to reach a certain goal
• using the memory (model) to systematically explore
• self-coordinating parallel GUI exploration
8
Open source TESTAR tool
• https://testar.org/
• https://github.com/TESTARtool/TESTAR_dev/
• Many ongoing research projects with
industrial collaboration
TESTAR - How does it work
6. Wait for the GUI to update
5. Execute the selected action
4. Select an action to execute using an algorithm
3. Derive possible actions that the end user could do
2. Check the test oracles on the state to find failures
1. Detect the current state of the GUI
1. Detect the current state of the GUI
11
TESTAR uses a widget tree as the state of the GUI,
including all widgets + their properties.
Requires programmatical access to the GUI information:
• Accessibility API for Windows apps (UIAutomation)
• Webdriver for web applications
• Appium for mobile apps
1. Detect the current state of the GUI
Oracles
Mechanism to determine whether a
failure was found (or not)
In TESTAR:
• Oracles give verdicts about each
state of the GUI
2. Check the test oracles on the state to find failures
What kind of errors can be found with TESTAR?
100% Automated implicit oracles
• Crashes (unexpected close of the SUT)
• Hangs (SUT becomes unresponsive)
15
• Oracles for suspicious text and outputs
• Easy to specify using a regular expression
.*[eE]rror.*|.*[eE]xcepti[o?]n.*
16
TESTAR provides a Java interface for implementing other
oracles, for example:
• Checking results from a database or other external source
• Triggering specific oracles in a specific GUI state
• Implementing platform specific error checking
• E.g. checking JavaScript console for error messages
2. Derive actions
• .
• .
• .
3. Derive possible actions that the end user could do
• Click and type (text, ‘Find what’-field)
• Click and type (text, ‘Replace with’-field)
• Click (Find next)
• Click (Replace)
• Click (Replace all)
• Click (Cancel)
• Click (Match case)
• Click (Wrap round)
• (Close X is filtered, shown with a grey dot)
By default, TESTAR derives the following GUI actions:
• Left mouse click
• Left mouse click and type text
• Move scrollbar
But other actions, like right mouse clicks, double clicks, drag and drop, etc, are also supported
3. Select an action using an
algorithm
4. Select an action to execute using an algorithm
TESTAR supports various action selection algorithms:
• Random selection
• Random with various prioritization algorithms
• Various machine learning algorithms (Q learning,
SARSA, etc)
• State model learning with systematic random-order
GUI exploration
TESTAR provides a Java interface to implement new
action selection algorithms.
oracles • Click (OK)
• Click(File)
• Click(Edit)
• Click(Format)
• Click (View)
• Click (Help)
• lick (☐)
5. Execute the selected action
6. Wait for the GUI to update
By default, TESTAR executes the GUI actions using system mouse and keyboard
• Testing from the end user perspective, including the GUI
• For Windows apps, TESTAR monitors the SUT process
• For web and mobile apps, Webdriver and Appium are used
• email: pekka.aho@ou.nl
• web: http://www.testar.org/
• github.com/TESTARtool/TESTAR_dev
Any questions?

More Related Content

PDF
Mika Mäntylä Beyond_Grepping_out - Testing Assembly 2022.pdf
PDF
Kari_Kakkonen_TestingAssembly_BecomingMultiTalentedTester - Testing Assembly ...
PDF
Pekka Marjamäki & Jani Grönman you don’t know what you know until you find ou...
PDF
Concepts of Real time Systems (RTS)
PPT
LEGACY SYSTEM In Software Engineering By NADEEM AHMED
PPT
Design Concepts & Principles
PDF
Use Case diagram-UML diagram-1
PDF
Software Engineering Patterns for Machine Learning Applications
Mika Mäntylä Beyond_Grepping_out - Testing Assembly 2022.pdf
Kari_Kakkonen_TestingAssembly_BecomingMultiTalentedTester - Testing Assembly ...
Pekka Marjamäki & Jani Grönman you don’t know what you know until you find ou...
Concepts of Real time Systems (RTS)
LEGACY SYSTEM In Software Engineering By NADEEM AHMED
Design Concepts & Principles
Use Case diagram-UML diagram-1
Software Engineering Patterns for Machine Learning Applications

What's hot (20)

PPS
Requirements Management
PDF
Need for automation testing
PPTX
White box testing
PPTX
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
PPTX
1.milling and drilling operations
PPT
Software Development Life Cycle Model
PPT
Design Documentation
PDF
Unit 5- Architectural Design in software engineering
PPT
Software Engineering (Metrics for Process and Projects)
PDF
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
PDF
How to test an AI application
PPT
Software product quality
PDF
Getting to Senior in UX
PPT
Unified Modeling Language
PDF
Design and Fabrication Multi Spindle Drilling Machine
PPTX
Iterative Incremental development
PDF
Software testing methods, levels and types
PPT
Braoching Operation
PPT
5.state diagrams
 
PPTX
Combinatorial testing ppt
Requirements Management
Need for automation testing
White box testing
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
1.milling and drilling operations
Software Development Life Cycle Model
Design Documentation
Unit 5- Architectural Design in software engineering
Software Engineering (Metrics for Process and Projects)
Software Engineering-Unit 3 "System Modelling" by Adi.pdf
How to test an AI application
Software product quality
Getting to Senior in UX
Unified Modeling Language
Design and Fabrication Multi Spindle Drilling Machine
Iterative Incremental development
Software testing methods, levels and types
Braoching Operation
5.state diagrams
 
Combinatorial testing ppt
Ad

Similar to Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf (20)

PDF
Gui path oriented test generation algorithms paper
PPT
2.5 gui
PDF
Geoff & Emily Bache - Specification By Example With GUI Tests-How Could That ...
PDF
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
PDF
A distinct approach for xmotif application gui test automation
PPTX
User interface testing By Priyanka Chauhan
PDF
ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...
PDF
Automated GUI-Testing of Android Apps: From Research to Practice
PPT
Automated Software Testing Framework Training by Quontra Solutions
PPT
20051019 automating regression testing for evolving gui software
PDF
Test automation - Building effective solutions
PDF
Testar2014 presentation
PPTX
Automated Testing on Web Applications
PDF
Esem2014 presentation
PPTX
Java script unit testing
PDF
Introduction to Test Automation
PDF
Top Automated UI Testing Tools 2023.pdf
PPTX
User Interface Testing Presentation spm.pptx
PDF
[Presentation] Automated Model-Based Android GUI Testing using Multi-Level GU...
PPT
Test automation principles, terminologies and implementations
Gui path oriented test generation algorithms paper
2.5 gui
Geoff & Emily Bache - Specification By Example With GUI Tests-How Could That ...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
A distinct approach for xmotif application gui test automation
User interface testing By Priyanka Chauhan
ICSE17Tech Briefing - Automated GUI Testing of Android Apps: From Research to...
Automated GUI-Testing of Android Apps: From Research to Practice
Automated Software Testing Framework Training by Quontra Solutions
20051019 automating regression testing for evolving gui software
Test automation - Building effective solutions
Testar2014 presentation
Automated Testing on Web Applications
Esem2014 presentation
Java script unit testing
Introduction to Test Automation
Top Automated UI Testing Tools 2023.pdf
User Interface Testing Presentation spm.pptx
[Presentation] Automated Model-Based Android GUI Testing using Multi-Level GU...
Test automation principles, terminologies and implementations
Ad

More from FiSTB (6)

PDF
Martin Varela Anomaly Detection - Testing Assembly 2022.pdf
PDF
Nina Perta How to strive as - Testing Assembly 2022.pdf
PDF
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
PDF
Ru_Cindrea_Mobile_Automation_for_Unity_Games - Testing Assembly 2022.pdf
PDF
Huib Schoots Testing in modern times - a story about Quality and Value - Test...
PDF
Juha Pomppu & Arto Stenberg Mitä olemme oppineet ohjelmistolaadusta 50 vuodes...
Martin Varela Anomaly Detection - Testing Assembly 2022.pdf
Nina Perta How to strive as - Testing Assembly 2022.pdf
Maaret_Pyhäjärvi_Talk - Testing Assembly 2022.pdf
Ru_Cindrea_Mobile_Automation_for_Unity_Games - Testing Assembly 2022.pdf
Huib Schoots Testing in modern times - a story about Quality and Value - Test...
Juha Pomppu & Arto Stenberg Mitä olemme oppineet ohjelmistolaadusta 50 vuodes...

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
System and Network Administration Chapter 2
PDF
System and Network Administraation Chapter 3
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
top salesforce developer skills in 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPT
Introduction Database Management System for Course Database
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
history of c programming in notes for students .pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
medical staffing services at VALiNTRY
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
System and Network Administration Chapter 2
System and Network Administraation Chapter 3
Odoo Companies in India – Driving Business Transformation.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Operating system designcfffgfgggggggvggggggggg
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
top salesforce developer skills in 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Introduction Database Management System for Course Database
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
medical staffing services at VALiNTRY
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

Pekka_Aho_Complementing GUI Testing Scripts - Testing Assembly 2022.pdf

  • 1. Complementing GUI Testing Scripts with Smart Monkey Testing Dr. Pekka Aho Open University of the Netherlands
  • 2. Automated GUI testing scripts Traditionally GUI testing scripts are… • designed manually • captured with C&R tools, or • manually written test scripts • static until maintenance required • maintained manually • for regression testing • checking the correctness of a selected set of functionality and properties 2 Test step 1 Check detail A Check detail B Test step 2 Check detail C
  • 3. Monkey testing In monkey testing, the tests are… • generated during run-time • no test scripts to maintain • dynamic, randomness often included • multiple executions could yield different results • closer to robustness testing than functional testing • trying to find incorrectness anywhere in the system under testing 3
  • 4. Monkey testing complements scripts GUI testing scripts and monkey testing… • find different kind of failures • cover different parts of code 4 Tool New bugs Known bugs Selenium 2 high 1 high TESTAR 2 high 4 low - Tool % IC % LC % MC Espresso 43,9 43,4 45,9 TESTAR 41,0 40,7 40,8 combined 52,3 52,1 52,3
  • 5. Monkey testing complements scripts 5 GUI testing scripts Monkey testing
  • 6. Random monkey testing with only the default TESTAR test oracles can be surprisingly efficient…
  • 7. Cap Gemini/ProRail • Academia/industry cooperation • Web application: Java based (JEE6) with 12,263 LOC • System for managing the assignment of train platforms • Existing test approach: manual with 100 test cases. • After a change in the application: all 100 test cases were executed as regression tests TESTAR Manual Preparation 44 hour 43 hour Testing (51 hour) 6 hour Post testing 5 hour 2 hour Critical faults 4 0 Functional coverage 80% 73%
  • 8. How to make the monkey smarter The monkey testing tool can be enhanced with… • a memory (model) to remember where it has been and what it has done • pre-defined information about the SUT • how to reach in every part of the SUT (e.g., login) • SUT-specific test inputs or test oracles • improved action selection algorithms • AI or ML to learn how to reach a certain goal • using the memory (model) to systematically explore • self-coordinating parallel GUI exploration 8
  • 9. Open source TESTAR tool • https://testar.org/ • https://github.com/TESTARtool/TESTAR_dev/ • Many ongoing research projects with industrial collaboration
  • 10. TESTAR - How does it work 6. Wait for the GUI to update 5. Execute the selected action 4. Select an action to execute using an algorithm 3. Derive possible actions that the end user could do 2. Check the test oracles on the state to find failures 1. Detect the current state of the GUI
  • 11. 1. Detect the current state of the GUI 11 TESTAR uses a widget tree as the state of the GUI, including all widgets + their properties. Requires programmatical access to the GUI information: • Accessibility API for Windows apps (UIAutomation) • Webdriver for web applications • Appium for mobile apps 1. Detect the current state of the GUI
  • 12. Oracles Mechanism to determine whether a failure was found (or not) In TESTAR: • Oracles give verdicts about each state of the GUI 2. Check the test oracles on the state to find failures
  • 13. What kind of errors can be found with TESTAR?
  • 14. 100% Automated implicit oracles • Crashes (unexpected close of the SUT) • Hangs (SUT becomes unresponsive)
  • 15. 15 • Oracles for suspicious text and outputs • Easy to specify using a regular expression .*[eE]rror.*|.*[eE]xcepti[o?]n.*
  • 16. 16 TESTAR provides a Java interface for implementing other oracles, for example: • Checking results from a database or other external source • Triggering specific oracles in a specific GUI state • Implementing platform specific error checking • E.g. checking JavaScript console for error messages
  • 17. 2. Derive actions • . • . • . 3. Derive possible actions that the end user could do • Click and type (text, ‘Find what’-field) • Click and type (text, ‘Replace with’-field) • Click (Find next) • Click (Replace) • Click (Replace all) • Click (Cancel) • Click (Match case) • Click (Wrap round) • (Close X is filtered, shown with a grey dot) By default, TESTAR derives the following GUI actions: • Left mouse click • Left mouse click and type text • Move scrollbar But other actions, like right mouse clicks, double clicks, drag and drop, etc, are also supported
  • 18. 3. Select an action using an algorithm 4. Select an action to execute using an algorithm TESTAR supports various action selection algorithms: • Random selection • Random with various prioritization algorithms • Various machine learning algorithms (Q learning, SARSA, etc) • State model learning with systematic random-order GUI exploration TESTAR provides a Java interface to implement new action selection algorithms.
  • 19. oracles • Click (OK) • Click(File) • Click(Edit) • Click(Format) • Click (View) • Click (Help) • lick (☐) 5. Execute the selected action 6. Wait for the GUI to update By default, TESTAR executes the GUI actions using system mouse and keyboard • Testing from the end user perspective, including the GUI • For Windows apps, TESTAR monitors the SUT process • For web and mobile apps, Webdriver and Appium are used
  • 20. • email: pekka.aho@ou.nl • web: http://www.testar.org/ • github.com/TESTARtool/TESTAR_dev Any questions?