and BDDWhat’s in it for me?
John Ferguson Smart
Consultant Trainer Mentor Author Speaker Coder
»TDD is not about writing tests»TDD is a design strategy:
»Write better-designed code»Have more confidence in our code»Make changes more easily»Write code that meets user requirements more accurately»(and incidentally...) »Build up a comprehensive set of automated tests
Test Driven Development
TDD
Behaviour Driven Development
BDD
Lambdas
java.time
Functional interfaces
StreamsType inference
Collections API
Dates and Times
Create date constants more easily
Date arithmetic that works
Works fine with Hamcrest asserts
Lambda Expressions
Conventional for loop
Use lambdas for more expressive expectations
Using a predicate
Lambda expressions +
Streams
Retrieve the event locations
Convert directly to a Set
Java 8 and Page Objects
Start off with the business objectives
Business requirements
Describe the business flow
Business flow
Describe the page interactions
Page interactions
Page implementation details
HTML details go here
Business Rules
Business Flow
Page/Component interac8ons
Page/Component details
Good automated acceptance tests have layers
Retrieve a list of word definitions
Convert WebDriver WebElements to text form
Retrieve a list of word definitions
The same thing with streams
Retrieve a list of word definitions
Use parallel streams for more optimal WebDriver page querying
Thank You
John Ferguson Smart
wakaleo
http://www.wakaleo.com