For test automation frameworks - TestCon Moscow · For test automation frameworks @craftingtester ....
Transcript of For test automation frameworks - TestCon Moscow · For test automation frameworks @craftingtester ....
ArchitectureFor test automation
frameworks
@craftingtester
@craftingtester
Sven Kroell
Testing Toolsmith
8 years in Testing
5 Years in Automation
Mentoring new Testers Creating tailored solutions
Traveller and Hiker
@craftingtester
End to End
Integration
Unit
The pyramid
4
@craftingtester
5
Why automate?
© Michal Parzuchowski
@craftingtester
6Record and play
© Robert Lischka
@craftingtester
7
@craftingtester
© Markus spieske
8
Do it yourself@craftingtester
@craftingtester
1 0
Time flows by@craftingtester
© Sven Kroell
1 1
Repairing on the fly@craftingtester
© Fancycrave
1 2
How to do it better?@craftingtester
© Sven Kroell
1 3
Building a framework@craftingtester
© Sven Kroell
➡ Separation of concerns ➡ Build a domain language ➡ Keeping the checks simple ➡ Reusable components
Why a framework
@craftingtester
What went wrong?Locators
Testdata
Userflows
Repetitions
Magic code
Sleeps
@craftingtester
@craftingtester
Think in layers
Checks
Framework
Driver
Application
@craftingtester
Checks@craftingtester
© Gerd Altman
Layers of the FrameworkChecks
Driver
Repositories Workflows
Page Objects
Data Generators
DataAccess Objects
@craftingtester
Repositories
© Pexels
Repositories@craftingtester
@craftingtester
➡ Centralised data generation ➡ Single point of change ➡ Checks don’t need to know data rules
Why repositories?
@craftingtester
Workflows@craftingtester
2 4
@craftingtester
➡ Decouple flows from checks ➡ Checks get cleaner ➡ Using a DSL makes it easier for new
joiners to get up to speed
Why workflows?
@craftingtester
Page Objects@craftingtester
2 7
@craftingtester
➡ Hides complexity of the DOM from workflows
➡ Single point of change for identifiers
Why Page Objects?
@craftingtester
Lets have a small demo
@craftingtester
Remarks
Pitfalls@craftingtester
© Sven Kroell
➡ Creating checks is software development
➡ Clean code is very important ➡ A good architecture helps while
refactoring ➡ Developers become more engaged
Final thoughts
@craftingtester
3 2
Questions@craftingtester
© Sven Kroell