acceptance testing with pageobjects

Download Acceptance Testing with PageObjects

If you can't read please download the document

Upload: niels-braczek

Post on 17-Feb-2017

167 views

Category:

Internet


5 download

TRANSCRIPT

Acceptance TestingwithPageObjects

About me

Niels Braczek (nibra) @hiPHPie

Developer since 1983

Mainframes, Amiga, PCs

PHP since 1999

Joomla! since 2004 (Mambo)

Software Quality Consultant

Clean Code Evangelist

Pages

Tests

Authenticate

Pages

Tests

Acceptance Tests are fragile.

Image Courtesy Heurtelions, 2007

Every small change in the markupof a single pagerequires all related teststo be modified.

Image Courtesy Heurtelions, 2007

What's wrong?

No encapsulation

No Separation of Concerns

Violation of the DRY principle

Dependency on implementation details

Tight coupling

The Cure: PageObjects.

Image Courtesy Heurtelions, 2007

Pages

PageObjects

Tests

PageObjects Summary

The public methods represent the services that the page offers

Try not to expose the internals of the page

Generally don't make assertions

Methods return other PageObjects

Need not represent an entire page

Different results for the same action are modelled as different methods

Questions?

Image Courtesy Heurtelions, 2007

Thank you!

Image Courtesy Heurtelions, 2007