Top Banner
Getting Started with Browser Based Testing Thursday, August 6 th , 2015
15
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting Started with Browser Based Testing

Getting Started with Browser Based Testing

Thursday, August 6th, 2015

Page 2: Getting Started with Browser Based Testing

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

Page 3: Getting Started with Browser Based Testing

IntroWho am I?

Page 4: Getting Started with Browser Based Testing

Overview• What is BDD• How?• Why

Page 5: Getting Started with Browser Based Testing

The Dream

Page 6: Getting Started with Browser Based Testing

What is Behat?PHPBDDGerkinsSelenium

Page 7: Getting Started with Browser Based Testing

What is Behat?Converts English to Automated browser tests

Page 8: Getting Started with Browser Based Testing

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”

Page 9: Getting Started with Browser Based Testing

How does it work?• Let’s look at the code!• Hint: Regular expressions

Page 10: Getting Started with Browser Based Testing

Getting startedLive Demo

Running a scriptLayout of a testWriting a test

Page 11: Getting Started with Browser Based Testing
Page 12: Getting Started with Browser Based Testing

PitfallsSelenium & Firefox versions

Do not auto-update FireFox

SlowCareful with xpath & hope for 2.9

Discourages UI changes

Page 13: Getting Started with Browser Based Testing

Conclusion

Page 14: Getting Started with Browser Based Testing

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

Page 15: Getting Started with Browser Based Testing

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

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