test automation - principles and practices
TRANSCRIPT
![Page 1: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/1.jpg)
TEST AUTOMATION – PRINCIPLES & PRACTICES
Anand Bagmar
Test Practice Lead
![Page 2: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/2.jpg)
@BagmarAnand
about.me/anand.bagmar
essenceoftesting.blogspot.com
ABOUT ME
![Page 3: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/3.jpg)
What is Testing?
![Page 4: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/4.jpg)
4
![Page 5: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/5.jpg)
5
![Page 6: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/6.jpg)
What does this mean?
![Page 7: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/7.jpg)
LEARNING
¨ Test each part thoroughly
¨ Unit
¨ Test ways of working together
¨ Component Integration
¨ Test how it all comes together
¨ Functional
This is how the parts becomes a Pen!
7
![Page 8: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/8.jpg)
But …. what about the things you do not see?
![Page 9: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/9.jpg)
LEARNING CONTINUES …
¨ Test the Non Functionals
¨ NFRs
¨ Test the 3rd-party integration / interactions
¨ Integration
9
![Page 10: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/10.jpg)
How does this apply to Software?
![Page 11: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/11.jpg)
11
![Page 12: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/12.jpg)
Flight Search
Search Results
Flight Details
Passenger Info Payment Confirmation
Application Server
DB
![Page 13: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/13.jpg)
LEARNING CONTINUES …
¨ Test each part thoroughly
¨ Test ways of working together
¨ Test how it all comes together
¨ Test the Non Functionals
¨ Test the 3rd-party integration / interactions
¨ Understand Architecture – system & components
¨ Build Quality-in by Testing early
13
![Page 14: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/14.jpg)
Practices
![Page 15: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/15.jpg)
Test Automation
A PRACTICE THAT MAKES TEAMS SUCCESSFUL?
![Page 16: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/16.jpg)
Test Automation
A PRACTICE THAT MAKES TEAMS UNSUCCESSFUL?
![Page 17: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/17.jpg)
Why do we do Test Automation?
![Page 18: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/18.jpg)
QUICK FEEDBACK
![Page 19: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/19.jpg)
How to get quick feedback from
Test Automation?
![Page 20: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/20.jpg)
• “Succeeding with Agile” – Mike Cohn
• Martin Fowler – Test Pyramid
martinfowler.com/bliki/TestPyramid.html
THE TEST PYRAMID
![Page 21: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/21.jpg)
TEST PYRAMID
Unit (xUnit / JavaScript)
Manual / Exploratory
Component
Integration
View
Web Service
UI
Cost
Impact
Time
Business- facing Tests
Technology- facing Tests
![Page 22: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/22.jpg)
TEST PYRAMID … INCLUDES NFRS
Unit (xUnit / JavaScript)
Component
Integration
View
Web Service
UI
Performance
Security
Accessibility
Manual / Exploratory
![Page 23: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/23.jpg)
REALITY
![Page 24: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/24.jpg)
ICE-CREAM CONE ANTI PATTERN
Manual / Exploratory
UI
Web Service
View
JavaScript
Integration
Unit
![Page 25: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/25.jpg)
Web Service
View
JavaScript
Integration
Unit
Developers Test Pyramid QA Team Test Pyramid
DUAL TEST PYRAMID ANTI-PATTERN
Manual / Exploratory
UI
Web Service
![Page 26: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/26.jpg)
CUP-CAKE ANTI-PATTERN
![Page 27: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/27.jpg)
Is that enough?
![Page 28: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/28.jpg)
Continuous Integration (CI)
![Page 29: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/29.jpg)
CONTINUOUS INTEGRATION (CI)
”… is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible…."
- Martin Fowler, ThoughtWorks Chief Scientist
Ø http://www.thoughtworks.com/continuous-integration
![Page 30: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/30.jpg)
CI PROCESS
![Page 31: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/31.jpg)
TEST AUTOMATION FRAMEWORK DESIGN CRITERIA
Maintainable
Scalable
Browser / Device support
Support features of Product-under-test
Easy to Use
Different Environments
Parallel Execution
Tool support
Reports & Metrics
Support the types of testing required
Operating System & Database support
Run locally & remotely
Language / tool restrictions
![Page 32: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/32.jpg)
PRINCIPLES FOR TEST AUTOMATION FRAMEWORK
Design Patterns
Abstraction Layers
Headless executing
Evolve
Code Quality
Take Screenshots
Refactor
Tools & Utilities
Extensible
Run via CI
Logging
Video Recording
Test Data
![Page 33: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/33.jpg)
Understandthesystem(s)/product(s)youneedtotest!!
HOW DO YOU DECIDE WHICH PRACTICE TO USE?
![Page 34: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/34.jpg)
Sample Test Automation Framework Architecture
![Page 35: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/35.jpg)
FRAMEWORK ABSTRACTION LAYERS
![Page 36: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/36.jpg)
Summary - Test Automation Framework
“Best” Practices
![Page 37: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/37.jpg)
Assertions & Validations In Business Layer
Model Test Data
Proper abstraction layers
Pages as Dummy objects
Evolve
Programming practices
OOPs Design Patterns
Identify intent in business terminology
Build Tools & Utilities
![Page 38: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/38.jpg)
REFERENCES
Page Objects – Google
https://code.google.com/p/selenium/wiki/PageObjects
Page Objects – Martin Fowler
http://martinfowler.com/bliki/PageObject.html
Perils of Page-Object Pattern – Anand Bagmar
http://essenceoftesting.blogspot.in/2014/09/perils-of-page-object-pattern.html
Test Design Consideration
http://docs.seleniumhq.org/docs/06_test_design_considerations.jsp
![Page 39: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/39.jpg)
Evolve as you Learn
![Page 40: Test Automation - Principles and Practices](https://reader031.vdocuments.net/reader031/viewer/2022033107/58705d551a28aba2118b6eb7/html5/thumbnails/40.jpg)
@BagmarAnand
about.me/anand.bagmar
essenceoftesting.blogspot.com
THANK YOU