Natural Language UI Testing                   Using        Behavior-Driven Development                          With Pavlo...
What is BehaviorDriven Development?       (BDD)
“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder,multiple-scale, high-automation, agilemethodolog...
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 field label when the field has focus.  ...
Let’s Write Some Code!
Demo
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: emd@trifecta.com...
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit
Upcoming SlideShare
Loading in …5
×

Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit

5,676 views

Published on

Slides from my talk at jQuery Conference: San Francisco Bay Area 2011 (http://spkr8.com/t/7239)

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,676
On SlideShare
0
From Embeds
0
Number of Embeds
213
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide
  • \n
  • Who writes tests for their JavaScript?\n\nAny Ruby programmers? Ever use RSpec?\n
  • I don’t know what that means...\n\nBDD is a test-driven-development methodology. \n\nWrite tests.\nWrite code to pass the tests.\nThat’s it.\n\nRed, Green, Refactor.\n\nMake sure it fails first, if it doesn’t how will you know if it’s a good test? (Red Step)\n\nWrite only enough code to make it pass. (Green Step)\n\nLater, if you need more functionality, refactor, and make sure all of your old tests still pass.\n
  • Anybody heard of it?\n
  • Inspired by Screw.Unit and RSpec but with QUnit compatibility (so you can use it with QUnit’s existing support for JsTestDriver and TestSwarm)\n\nMIT License\n\n
  • Build a small login form for a web application, the kind with labels in the text boxes that disappear on focus\n\nIt should work without JavaScript enabled, but if we do have it we’ll take advantage of it\n\nMarkup and concept roughly based on Making Compact Forms More Accessible by Mike Brittain from A List Apart\n\nConvert this Spec into a test suite\n\n\n
  • \n
  • \n
  • isLessThan20ButGreaterThan10\n\nTestSwarm\nJsTestDriver\n\n\n
  • In-progress refactor to be testing-framework neutral, coming soon YUI2 and YUI3\navailable in the framework-agnostic branch on GitHub. \n\nWill retain backwards compatibility.\n\n\n\n\n\n\n\n
  • \n
  • Natural Language UI Testing using Behavior Driven Development with Pavlov and QUnit

    1. 1. Natural Language UI Testing Using Behavior-Driven Development With Pavlov and QUnitEric DeLabarSolutions Architect at Trifecta Technologieshttp://www.trifecta.com/
    2. 2. What is BehaviorDriven Development? (BDD)
    3. 3. “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.”
    4. 4. What is Pavlov?
    5. 5. Behavioral API over QUnit by Michael Monteleonehttp://github.com/mmonteleone/pavlov
    6. 6. The Goal:The login form should progressively enhance a form by id. should hide a field label when the field has focus. should show a field label when the field is empty when the cursor leaves. should keep a field label hidden when the field is not empty when the cursor leaves. should validate that the email field 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.
    7. 7. Let’s Write Some Code!
    8. 8. Demo
    9. 9. Other Features• Custom Assertions• Expected Exceptions• Doesn’t Pollute the Global Scope• Run from Command Line or CI Server
    10. 10. Future of Pavlov• Testing-framework-neutral refactor in-progress
    11. 11. Materials • Source on GitHub: • Slides on SlideShare:Questions/Comments • Twitter: @edelabar • Email: emd@trifecta.com • SpeakerRate: http://spkr8.com/s/11957

    ×