Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Slides from my talk at jQuery Conference: San Francisco Bay Area 2011 (http://spkr8.com/t/7239)
Published on: Mar 3, 2016
Transcripts - Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing Using Behavior-Driven Development With Pavlov and QUnitEric DeLabarSolutions Architect at Trifecta Technologieshttp://www.trifecta.com/
What is BehaviorDriven Development? (BDD)
“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder,multiple-scale, high-automation, agilemethodology. It describes a cycle ofinteractions with well-defined outputs,resulting in the delivery of working,tested software that matters.”
What is Pavlov?
Behavioral API over QUnit by Michael Monteleonehttp://github.com/mmonteleone/pavlov
The Goal:The login form should progressively enhance a form by id. should hide a ﬁeld label when the ﬁeld has focus. should show a ﬁeld label when the ﬁeld is empty when the cursor leaves. should keep a ﬁeld label hidden when the ﬁeld is not empty when the cursor leaves. should validate that the email ﬁeld is valid when the cursor leaves. should submit the form when the user clicks the Join button. should submit to the action URL of the form with an AJAX POST. should hide the form if the user credentials are ok.
Let’s Write Some Code!
Other Features• Custom Assertions• Expected Exceptions• Doesn’t Pollute the Global Scope• Run from Command Line or CI Server
Future of Pavlov• Testing-framework-neutral refactor in-progress
Materials • Source on GitHub: • Slides on SlideShare:Questions/Comments • Twitter: @edelabar • Email: firstname.lastname@example.org • SpeakerRate: http://spkr8.com/s/11957