際際滷

際際滷Share a Scribd company logo
Test Automation
Using
Serenitys Screen Play Design Pattern
About Me
What do I mean by test
automation
?
End to End
Test Automation
 Why End to EndTest Automation ?
 To reduce manual efforts ??? Really
 Is it making you slow ?
 Minimal journey
 Continuous integration pipeline
 Pattern in Test automation ?
 https://abhigets.blogspot.in/2017/08/pattern-in-test-automation.html
 Most popular design patter
 Page object pattern
Page object pattern
If page is too complex ??
SOLID
S : Single Responsibility
O : Open Close Principle
L : Liskov substitution
I : Interface segregation
D: Dependency inversion
Single Responsibility
Open Close Principle
Page object pattern
Is there any pattern ?
Assertions
Behaviours/Actions
Locators
Apply SOLID principle To POM
1. Single responsibility
2. Open close principle
Assertions Behaviours
/Actions
Locators
AT High level
Questions
Task UI
ScreenPlay Design Pattern
 How to strike right balance
 Too many fragments [Test becomes too noisy]
 Too big component [Loose flexibility]
 How to define a task and how to make sure we build a building blocks ?
 Dont define action
 Define behaviour / Goal
 Frequency of Behaviour to change is very less and is business driven.
Some Learnings till date
Some Tips
Look at application design
UI components the way they are coupled
Setup Screenplay
1. Generate Project
a. $ mvn archetype:generate -Dfilter=screenplay
i. Enter 1 and select a version
ii. 'groupId': : net.serenitybdd.tutorials
iii. 'artifactId': : todomvctests
iv. 'package': net.serenitybdd.tutorials
2. Run Test
a. mvn clean verify
References
https://www.toptal.com/software/single-responsibility-principle
https://www.codeproject.com/Articles/1185933/Single-Responsibility-Principle-on-
Different-Level
https://www.lego.com/en-us/classic/products
http://mozaicworks.com/blog/open-closed-principle/
http://serenity-bdd.info/docs/articles/screenplay-tutorial.html
http://serenity-bdd.info/docs/articles/screenplay-tutorial.html
Questions ??

More Related Content

Serenity's Screen Play Design Pattern