Getting Started with Browser Based Testing Thursday, August 6th, 2015
Outline Intro Overview of BDD/Behat Getting started (writing our first test) Pitfalls Conclusion
Intro Who am I?
Overview • What is BDD • How? • Why
The Dream
What is Behat? PHP BDD Gerkins Selenium
What is Behat? Converts English to Automated browser tests
How do you use it? Scenario: Seeing a welcome message Given I log in as “teacher” When I follow “My Course” Then I should see “Welcome to My Course”
How does it work? • Let’s look at the code! • Hint: Regular expressions
Getting started Live Demo Running a script Layout of a test Writing a test
Pitfalls Selenium & Firefox versions Do not auto-update FireFox Slow Careful with xpath & hope for 2.9 Discourages UI changes
Conclusion
Related links Moodle’s Acceptance testing docs http://docs.moodle.org/dev/Acceptance_testing KNP Labs BDD/Behat training http://knplabs.com/training/behat
Contact Rex Lorenzo (rex@oid.ucla.edu) Twitter: @rlorenzo Github: https://github.com/rlorenzo Workshop slides http://www.slideshare.net/rexlorenzo/getting- started-with-browser-based-testing

Getting Started with Browser Based Testing

Editor's Notes

  • #4 Rex Lorenzo CCLE Lead Developer at UCLA Size of team. Moodle developer since 2011.
  • #13 Selenium 2.45 100% slower: https://code.google.com/p/selenium/issues/detail?id=8551 FireFox 38 not working with Selenium 2.45.1