1 / 9

Making BDD fun with Ruby and Cucumber

Making BDD fun with Ruby and Cucumber. Andrei Marfievici. Content. What is BDD? Why Ruby and Cucumber Live Demo Conclusions. What is BDD?. Inspired from TDD and complements DDD It’s NOT unit testing where: Unit test tools are written mainly for developers Tests are methods names

sivan
Télécharger la présentation

Making BDD fun with Ruby and Cucumber

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Making BDD fun with Ruby and Cucumber Andrei Marfievici

  2. Content • What is BDD? • Why Ruby and Cucumber • Live Demo • Conclusions

  3. What is BDD? • Inspired from TDD and complements DDD • It’s NOT unit testing where: • Unit test tools are written mainly for developers • Tests are methods names • It does a great job for object/module testing • It takes a technical person to understand the assertions and failures • It takes a lot of time to gain domain knowledge

  4. What is BDD? • Story testing approach • Complex interactions between ALL the people involved in a project • Functionalities trigger the development process • Specs  Features  Behavior  Scenarios • DDD defines the vocabulary (the words) whilst BDD defines the sentences to put the words in

  5. What is BDD? • A functionality describes a feature • As a Role • I request a Feature • To gain a Benefit • Example: • Feature: Search for music data • As a Last.fm user • I want to be able to search data • So that I can listen to my favorite music

  6. Why Ruby and Cucumber? • Describe features in plain text through scenarios • Cucumber understands Gherkin language • GWT approach for writing scenarios: • Scenario: Basic Search • Given I navigate to http://www.last.fm • When I search for “ac/dc” • Then I get results back

  7. Why Ruby and Cucumber? • Wrap code inside steps

  8. Why Ruby and Cucumber? • Can be used as a scripting language • Powerful Lightweight OOP language • Size of the project • Multi-platform • Easy to integrate with CI servers • Great support on ruby gems • IRB debugging and on-the-fly development • A minus for serialization

  9. Conclusions • Unified SDLC through feature files • Outside-in approach • Feature coverage • Brings people together (“help me to help you”) • The power of concrete examples  creativity • Great documentation for the project • Validation comes first

More Related