Similar presentations:
Step Object
1.
Step Object2.
Tim Sukhachevpassive
developer
of active tests
6+ years in industry
Step Object Demo:
https://github.com/tsuhachev/steppy
3.
Agenda•Intro
•Step Object Layer
•Thucydides
•Generic steps
•Step and Data Logistics
•Step manifesto
4.
BDD / TDDWebDriver
Page Object
Looks like happiness, eh?
5.
My first test ...It's like .. too detailed DSL
Each ''step” is locked in its “page space”
6.
Yes, that's page object7.
And finally … stuckending up with 600+ rows
of similar code
8.
Step Object is already not a page object …And not
behavior yet …
Behavior / Tests
Step Object
Page Object
Element Object
Step Object is in between!
9.
BehaviorGiven, When, Then
Step Object
Act and Verify
Set and GetPage Object
Standard/Custom Elements API
Element Object
10.
Passenger calls taxiDeparture, Epic Feature
Passenger pays driver
Given I arrived to airport
Passenger passes luggage control
Passenger passes gate contol
When I pass luggage and ticket control
Passenger gets the place
Passenger enjoys the flight
Then I’m on board
11.
passenger.atTaxi().paysForShuttle()Airport
Taxi
Local Steps
Departure
Global Leaps
passenger.departs()
Board
12.
13.
Actor packageAll Steps Package
14.
StepsStep Factory
Step Group
15.
Generic Steps16.
populate(WHAT, WHERE)WHAT: E extends Entity
WHERE: P extends PageObject
17.
Generic steps requires:✔
Generic way of getting / setting
element regardless of a tag Basic HTML or any custom
✔
Business object (entity)
✔
Reflection / BeanUtils
18.
Data Estafette19.
No need to know ticket number …Just hand it over!
I don't need to remember passport details
I just show it!
20.
Data hand over principles21.
Step Manifesto•Act on behalf
•Align local steps across feature, and global
- across application
•Be generic
•Let your steps operate data