3. Agenda
● What is Clean Code
● Demo App (AUT)
● Test Code
● Identify Code Smells
● Iteratively Refactor
4. Clean Code
“Clean code is simple and direct. Clean code
reads like well-written prose.”
- Grady Booch
Mentioned in Book “Clean Code: A Handbook of Agile Software Craftsmanship”
by Robert C. Martin
13. Pros of Returning Page Objects
● Method conveys correctly what changes
happened on UI
● Allows us to do method chaining
14. Cons of Returning Page Objects
● Pages are tightly coupled
● Special handling is required if same
function have to return different pages
● Duplication of this information as it is
present in both test and page
Page Objects: You're Doing It Wrong by Titus Fortner - https://www.youtube.com/watch?v=vg8um4bYQXI
31. Test Code - https://github.com/bitweft/book_information_e2e_tests
Book Information Demo App Code (which includes Espresso tests demo) -
https://github.com/bitweft/book_information_espresso_demo
Clean Code book by Robert C Martin - https://www.amazon.in/Clean-Code-
Robert-C-Martin/dp/8131773388
Page Objects: You're Doing It Wrong by Titus Fortner -
https://www.youtube.com/watch?v=vg8um4bYQXI
Patterns of a “good” Test Automation Framework by Anand Bagmar -
https://www.youtube.com/watch?v=mNSJuVVq26I
References & Links