+ All Categories
Transcript

Getting Started with Browser Based Testing

Thursday, August 6th, 2015

OutlineIntroOverview of BDD/BehatGetting started (writing our first test)PitfallsConclusion

IntroWho am I?

Overview• What is BDD• How?• Why

The Dream

What is Behat?PHPBDDGerkinsSelenium

What is Behat?Converts English to Automated browser tests

How do you use it?Scenario: Seeing a welcome messageGiven 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 startedLive Demo

Running a scriptLayout of a testWriting a test

PitfallsSelenium & Firefox versions

Do not auto-update FireFox

SlowCareful with xpath & hope for 2.9

Discourages UI changes

Conclusion

Related linksMoodle’s Acceptance testing docshttp://docs.moodle.org/dev/Acceptance_testingKNP Labs BDD/Behat traininghttp://knplabs.com/training/behat

ContactRex Lorenzo ([email protected])Twitter: @rlorenzoGithub: https://github.com/rlorenzo

Workshop slideshttp://www.slideshare.net/rexlorenzo/getting-started-with-browser-based-testing


Top Related