Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Specification by Example

Fernando Perales
July 05, 2018
32

Specification by Example

Fernando Perales

July 05, 2018
Tweet

Transcript

  1. @FerPeralesM #TestingTalks
    Specification by
    example
    Fernando Perales

    View Slide

  2. @FerPeralesM #TestingTalks

    View Slide

  3. @FerPeralesM #TestingTalks
    Senior Software Engineer @ michelada.io

    FLOSS Advocate

    I ❤ and 

    Host the RubyGDL community

    Co-founder @ Railsbridge México

    In Gregory Sallust I trust

    View Slide

  4. @FerPeralesM #TestingTalks

    View Slide

  5. @FerPeralesM #TestingTalks

    View Slide

  6. @FerPeralesM #TestingTalks
    What is the purpose of
    software development?

    View Slide

  7. @FerPeralesM #TestingTalks
    R: Solve the right problem*
    What is the purpose of
    software development?

    View Slide

  8. @FerPeralesM #TestingTalks
    R: Solve the right problem*
    What is the purpose of
    software development?
    * IMHO

    View Slide

  9. @FerPeralesM #TestingTalks
    How to solve the right
    problem?

    View Slide

  10. @FerPeralesM #TestingTalks

    View Slide

  11. @FerPeralesM #TestingTalks
    What Specification by
    Example brings to the
    table?

    View Slide

  12. @FerPeralesM #TestingTalks
    A way to define
    requirements and business-
    oriented functional tests

    View Slide

  13. @FerPeralesM #TestingTalks
    A development
    methodology:
    A-TDD

    View Slide

  14. @FerPeralesM #TestingTalks
    A language to define our
    requirements:
    Gherkin

    View Slide

  15. @FerPeralesM #TestingTalks
    Example:

    View Slide

  16. @FerPeralesM #TestingTalks

    View Slide

  17. @FerPeralesM #TestingTalks
    I want a feature to
    know if a person is
    old enough to be
    considered a legal
    adult in Mexico

    View Slide

  18. @FerPeralesM #TestingTalks
    Translated into
    Gherkin

    View Slide

  19. @FerPeralesM #TestingTalks

    View Slide

  20. @FerPeralesM #TestingTalks

    View Slide

  21. @FerPeralesM #TestingTalks

    View Slide

  22. @FerPeralesM #TestingTalks
    There are tools that allow
    us to translate Gherkin
    into code

    View Slide

  23. @FerPeralesM #TestingTalks

    View Slide

  24. @FerPeralesM #TestingTalks
    gem install cucumber

    View Slide

  25. @FerPeralesM #TestingTalks
    cucumber —init

    View Slide

  26. @FerPeralesM #TestingTalks

    View Slide

  27. @FerPeralesM #TestingTalks

    View Slide

  28. @FerPeralesM #TestingTalks

    View Slide

  29. @FerPeralesM #TestingTalks

    View Slide

  30. @FerPeralesM #TestingTalks

    View Slide

  31. @FerPeralesM #TestingTalks

    View Slide

  32. @FerPeralesM #TestingTalks

    View Slide

  33. @FerPeralesM #TestingTalks

    View Slide

  34. @FerPeralesM #TestingTalks

    View Slide

  35. @FerPeralesM #TestingTalks

    View Slide

  36. @FerPeralesM #TestingTalks
    Thanks!
    [email protected]

    View Slide