SlideShare a Scribd company logo
1 of 30
Download to read offline
#expoQA23
MADRID 31st of May to 1st of June 2023
Gaspar Nagy
RAMP up your testing solution:
test automation patterns
ExpoQA 2023, Madrid
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Gáspár Nagy
coach, trainer and bdd addict
creator of SpecFlow
gaspar@specsolutions.eu
https://specsolutions.eu
@gasparnagy
Find them on Amazon & Leanpub through http://bddbooks.com!
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Today
• About design patterns
• Challenges of test automation today
• Benefits of using design patterns for test automation solutions
• Characteristics of test automation design patterns
• Documenting test automation design patterns
Copyright © Gaspar Nagy
Design Patterns
recognized construct that works
Why design patterns?
Source: Wikipedia
Better
Faster
Easier collaboration
Copyright © Gaspar Nagy
Challenges of Test
Automation
Why to build a good quality test automation
Photo by Denys Nevozhai on Unsplash
$$$
$$
$
Tests automation as “first class citizen”
Photo by Gaspar Nagy
Coding standards
Reviews
Tests
…
Test automation is difficult
Source: NASA
Test automation is difficult
Source: NASA
Requires “smart” solutions
Needs time and efforts
Involves expertise, research & collaboration
Copyright © Gaspar Nagy
How could patterns
help?
Tests are mostly composed of “usual tasks”
Columbia TriStar Film Distributors International
Reset database to a baseline
Perform an action and capture result
Query state to verify expectations
“Design patterns” can be used & reused!
Photo by Markus Spiske on Unsplash
• Patterns for “Reset database to a baseline”
1. Restore baseline database backup
2. Create an empty database and insert base data records
3. Use in-memory database
4. Use file-based database and copy baseline file
5. Wrap test to a DB transaction & cancel
6. Truncate (empty) tables used by the tests
7. Track data changes and undo
8. Detect read-only tests and skip reset after them
RAMP up your testing solution
Photo by Erik Brolin on Unsplash
Reusability
Abstraction
Maintainability
Performance
Copyright © Gaspar Nagy
Test Automation
Design Patterns
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
The UI analogy
Hexagonal: Butzin, Bjorn & Golatowski, Frank & Timmermann, Dirk. (2016). Microservices approach for the internet of things. 1-6. 10.1109/ETFA.2016.7733707.
Onion: Basic Rules for effective Onion Architecture by Bran Lim
Hexagonal Architecture Onion Architecture
Hexagonal Architecture Onion Architecture
The UI analogy
Hexagonal: Butzin, Bjorn & Golatowski, Frank & Timmermann, Dirk. (2016). Microservices approach for the internet of things. 1-6. 10.1109/ETFA.2016.7733707.
Onion: Basic Rules for effective Onion Architecture by Bran Lim
Both
• represent an external interface of the application
• are active (click on a button <> perform action on SUT)
• are event-based, async and responsive (display data as arrives <> verify result as
becomes available)
• have simple structure: sequence, containment (e.g. no recursion)
• contain repeating needs (controls <> usual test tasks)
• include a mix of concerns (view/controller <> test-description/actions)
Generic & project-specific patterns
Photo by christian erra on Unsplash
The high level of reusability encourages teams to think about discovering project-
specific patterns.
• Easier to develop (more specific context)
• Easier to document (sometimes the example in the code is enough)
Some test automation patterns are usable in broader context
• They can become part of the tool-belt of the test automation experts
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Project-specific pattern discovery process
identify repeating task develop pattern for the task
identify solution to be repeated
(feel the need to copy-paste)
probe pattern for other usage
increase abstraction if needed
document pattern apply pattern
extract pattern
&
Patterns
apply develop
Copyright © Gaspar Nagy
Documenting Test
Automation Design
Patterns
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
The book project
How to document the patterns?
• Name & Intent – short summary
• Motivation – situation example
• Applicability – list of useful contexts
• Structure – diagram
• Participants & Collaborations – abstract description of
the pattern
• Consequences – benefits, trade-offs
• Implementation & Sample – implementation notes &
concrete example
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
The Layering Problem
Test Goals Test Actions Auto
Infra
SUT
External
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Samples
Copyright © Gaspar Nagy
Wrap-up
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Wrap-up
• Design patterns are powerful tools
• Only good tests make sense
• Tests should really be first class citizens
• Tests composed of “usual tasks”, so design patterns are super-powerful
• You can discover project-specific patterns – this also helps dev-test collaboration
• But many patterns are even more broadly usable
• Think of “UI analogy” and test layers
Copyright © Gaspar Nagy
#expoQA23
MADRID 31st of May to 1st of June 2023
Watch for recurring problems.
Take the time to develop a pattern for them.
(invite devs)
Apply pattern.
Repeat.
#expoQA23
MADRID 31st of May to 1st of June 2023
THANK YOU FOR ATTENDING

More Related Content

Similar to Ramp up your testing solution, ExpoQA 2023

ICCCBE2014-YuHsiang
ICCCBE2014-YuHsiangICCCBE2014-YuHsiang
ICCCBE2014-YuHsiang
Vincent Wen
 
Phrases for resume and interview start Mar31
Phrases for resume and interview  start Mar31Phrases for resume and interview  start Mar31
Phrases for resume and interview start Mar31
Sander Stepanov
 
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
Edge AI and Vision Alliance
 

Similar to Ramp up your testing solution, ExpoQA 2023 (20)

Towards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle SoftwareTowards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle Software
 
Engaging Tech Students Past Traditional Hands On
Engaging Tech Students Past Traditional Hands OnEngaging Tech Students Past Traditional Hands On
Engaging Tech Students Past Traditional Hands On
 
ICCCBE2014-YuHsiang
ICCCBE2014-YuHsiangICCCBE2014-YuHsiang
ICCCBE2014-YuHsiang
 
Design and Development of Hybrid Storage Shelf
Design and Development of Hybrid Storage ShelfDesign and Development of Hybrid Storage Shelf
Design and Development of Hybrid Storage Shelf
 
SICOMORO
SICOMOROSICOMORO
SICOMORO
 
OpenACC and Open Hackathons Monthly Highlights May 2023.pdf
OpenACC and Open Hackathons Monthly Highlights May  2023.pdfOpenACC and Open Hackathons Monthly Highlights May  2023.pdf
OpenACC and Open Hackathons Monthly Highlights May 2023.pdf
 
Resume
ResumeResume
Resume
 
Role of artificial intellligence in construction engg &amp; management
Role of artificial intellligence in construction engg &amp; managementRole of artificial intellligence in construction engg &amp; management
Role of artificial intellligence in construction engg &amp; management
 
Project definition workshop #disummit 2019
Project definition workshop #disummit 2019Project definition workshop #disummit 2019
Project definition workshop #disummit 2019
 
LOKI TECHNICAL SEMINAR not final-1.pptx
LOKI TECHNICAL SEMINAR  not final-1.pptxLOKI TECHNICAL SEMINAR  not final-1.pptx
LOKI TECHNICAL SEMINAR not final-1.pptx
 
Graph Gurus 15: Introducing TigerGraph 2.4
Graph Gurus 15: Introducing TigerGraph 2.4 Graph Gurus 15: Introducing TigerGraph 2.4
Graph Gurus 15: Introducing TigerGraph 2.4
 
Ramzi omar design portfolio
Ramzi omar   design portfolioRamzi omar   design portfolio
Ramzi omar design portfolio
 
Phrases for resume and interview start Mar31
Phrases for resume and interview  start Mar31Phrases for resume and interview  start Mar31
Phrases for resume and interview start Mar31
 
Parents
ParentsParents
Parents
 
Engineering Large Scale Cyber-Physical Systems
Engineering Large Scale Cyber-Physical SystemsEngineering Large Scale Cyber-Physical Systems
Engineering Large Scale Cyber-Physical Systems
 
Simpda 2014 - A living story: measuring quality of developments in a large in...
Simpda 2014 - A living story: measuring quality of developments in a large in...Simpda 2014 - A living story: measuring quality of developments in a large in...
Simpda 2014 - A living story: measuring quality of developments in a large in...
 
Pydata Chicago - work hard once
Pydata Chicago - work hard oncePydata Chicago - work hard once
Pydata Chicago - work hard once
 
Should I Bug You? Identifying Domain Experts in Software Projects Using Code...
 Should I Bug You? Identifying Domain Experts in Software Projects Using Code... Should I Bug You? Identifying Domain Experts in Software Projects Using Code...
Should I Bug You? Identifying Domain Experts in Software Projects Using Code...
 
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
“How to Select, Train, Optimize and Deploy Edge Vision AI Models in Three Day...
 
QuSandbox+NVIDIA Rapids
QuSandbox+NVIDIA RapidsQuSandbox+NVIDIA Rapids
QuSandbox+NVIDIA Rapids
 

More from Gáspár Nagy

BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
Gáspár Nagy
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 

More from Gáspár Nagy (19)

BDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing StrategyBDD Scenarios in a Testing Strategy
BDD Scenarios in a Testing Strategy
 
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)
 
Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)Fighting against technical debt (CukenFest 2020)
Fighting against technical debt (CukenFest 2020)
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
 
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
Continuous Behavior - BDD in Continuous Delivery (CoDers Who Test, Gothenburg...
 
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
We are sinking: Hitting the testing iceberg (CukenFest London, 2018)
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
 
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
Scaffolding a legacy app with BDD scenario (Agile in the City Bristol 2017)
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...
 
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
 
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
 
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
 
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
 

Recently uploaded

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

Ramp up your testing solution, ExpoQA 2023

  • 1. #expoQA23 MADRID 31st of May to 1st of June 2023 Gaspar Nagy RAMP up your testing solution: test automation patterns ExpoQA 2023, Madrid
  • 2. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Gáspár Nagy coach, trainer and bdd addict creator of SpecFlow gaspar@specsolutions.eu https://specsolutions.eu @gasparnagy Find them on Amazon & Leanpub through http://bddbooks.com!
  • 3. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023
  • 4. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Today • About design patterns • Challenges of test automation today • Benefits of using design patterns for test automation solutions • Characteristics of test automation design patterns • Documenting test automation design patterns
  • 5. Copyright © Gaspar Nagy Design Patterns recognized construct that works
  • 6. Why design patterns? Source: Wikipedia Better Faster Easier collaboration
  • 7. Copyright © Gaspar Nagy Challenges of Test Automation
  • 8. Why to build a good quality test automation Photo by Denys Nevozhai on Unsplash $$$ $$ $
  • 9. Tests automation as “first class citizen” Photo by Gaspar Nagy Coding standards Reviews Tests …
  • 10. Test automation is difficult Source: NASA
  • 11. Test automation is difficult Source: NASA Requires “smart” solutions Needs time and efforts Involves expertise, research & collaboration
  • 12. Copyright © Gaspar Nagy How could patterns help?
  • 13. Tests are mostly composed of “usual tasks” Columbia TriStar Film Distributors International Reset database to a baseline Perform an action and capture result Query state to verify expectations
  • 14. “Design patterns” can be used & reused! Photo by Markus Spiske on Unsplash • Patterns for “Reset database to a baseline” 1. Restore baseline database backup 2. Create an empty database and insert base data records 3. Use in-memory database 4. Use file-based database and copy baseline file 5. Wrap test to a DB transaction & cancel 6. Truncate (empty) tables used by the tests 7. Track data changes and undo 8. Detect read-only tests and skip reset after them
  • 15. RAMP up your testing solution Photo by Erik Brolin on Unsplash Reusability Abstraction Maintainability Performance
  • 16. Copyright © Gaspar Nagy Test Automation Design Patterns
  • 17. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 The UI analogy Hexagonal: Butzin, Bjorn & Golatowski, Frank & Timmermann, Dirk. (2016). Microservices approach for the internet of things. 1-6. 10.1109/ETFA.2016.7733707. Onion: Basic Rules for effective Onion Architecture by Bran Lim Hexagonal Architecture Onion Architecture
  • 18. Hexagonal Architecture Onion Architecture The UI analogy Hexagonal: Butzin, Bjorn & Golatowski, Frank & Timmermann, Dirk. (2016). Microservices approach for the internet of things. 1-6. 10.1109/ETFA.2016.7733707. Onion: Basic Rules for effective Onion Architecture by Bran Lim Both • represent an external interface of the application • are active (click on a button <> perform action on SUT) • are event-based, async and responsive (display data as arrives <> verify result as becomes available) • have simple structure: sequence, containment (e.g. no recursion) • contain repeating needs (controls <> usual test tasks) • include a mix of concerns (view/controller <> test-description/actions)
  • 19. Generic & project-specific patterns Photo by christian erra on Unsplash The high level of reusability encourages teams to think about discovering project- specific patterns. • Easier to develop (more specific context) • Easier to document (sometimes the example in the code is enough) Some test automation patterns are usable in broader context • They can become part of the tool-belt of the test automation experts
  • 20. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Project-specific pattern discovery process identify repeating task develop pattern for the task identify solution to be repeated (feel the need to copy-paste) probe pattern for other usage increase abstraction if needed document pattern apply pattern extract pattern
  • 22. Copyright © Gaspar Nagy Documenting Test Automation Design Patterns
  • 23. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 The book project
  • 24. How to document the patterns? • Name & Intent – short summary • Motivation – situation example • Applicability – list of useful contexts • Structure – diagram • Participants & Collaborations – abstract description of the pattern • Consequences – benefits, trade-offs • Implementation & Sample – implementation notes & concrete example
  • 25. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 The Layering Problem Test Goals Test Actions Auto Infra SUT External
  • 26. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Samples
  • 27. Copyright © Gaspar Nagy Wrap-up
  • 28. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Wrap-up • Design patterns are powerful tools • Only good tests make sense • Tests should really be first class citizens • Tests composed of “usual tasks”, so design patterns are super-powerful • You can discover project-specific patterns – this also helps dev-test collaboration • But many patterns are even more broadly usable • Think of “UI analogy” and test layers
  • 29. Copyright © Gaspar Nagy #expoQA23 MADRID 31st of May to 1st of June 2023 Watch for recurring problems. Take the time to develop a pattern for them. (invite devs) Apply pattern. Repeat.
  • 30. #expoQA23 MADRID 31st of May to 1st of June 2023 THANK YOU FOR ATTENDING