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

sub-second-acceptance-tests-seleniumconf-2018.pdf

Aslak Hellesøy
October 24, 2018
810

 sub-second-acceptance-tests-seleniumconf-2018.pdf

Programmer flow is only possible when all the tests run in less than 10 seconds. Each test must run in less than a second.

Acceptance tests can run in milliseconds when you decouple your tests from the application as well as decoupling the layers of the application itself.

Aslak Hellesøy

October 24, 2018
Tweet

Transcript

  1. View Slide

  2. Aslak Hellesøy

    [email protected]
    Programmer since 1998
    Open Source since 1999

    Agile since 2000

    BDD since 2003

    Created Cucumber in 2008
    Cucumber Book in 2010
    Co-founded Cucumber Ltd in 2013
    Professional services (Training)
    Professional tooling (Cucumber Pro)

    Cucumber maintenance

    View Slide

  3. the zone
    https://www.flickr.com/photos/w4nd3rl0st/12491208355

    View Slide

  4. Immediate feedback

    Feeling that you have the
    potential to succeed

    Feeling so engrossed in
    the experience, that other
    needs become negligible

    View Slide

  5. Intense concentration

    Merging of action and awareness

    Loss of reflective self-
    consciousness

    Sense of personal control or agency

    Distortion of temporal experience

    Autotelic experience

    View Slide

  6. 3 time limits to
    keep in mind
    when optimising
    application
    performance

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. https://martinfowler.com/bliki/TestPyramid.html
    “Testing through the UI
    like this is slow,
    increasing build times”
    “Tests that run end-to-
    end through the UI are:
    - brittle

    - expensive to write
    - time consuming to run”

    View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. 10s

    View Slide

  19. 1s

    View Slide

  20. 100ms

    View Slide

  21. 10ms

    View Slide

  22. 1ms

    View Slide

  23. 1ms
    1ms

    View Slide

  24. Integration confidence Functionality confidence
    Slow Fast
    Few Many
    10s
    1s
    100ms
    10ms
    1ms
    1ms

    View Slide

  25. Scenario: Breaker joins Maker's 5 letter game
    Given Molly has started a game with the secret "steak"
    When Benny joins Molly's game
    Then Benny must guess a word with 5 letters

    View Slide

  26. View Slide

  27. Domain-specific

    Commands
    Domain-specific

    Test Views
    Assertions

    on Test Views
    getGuessList() => [
    { word: “steak”}, 

    { word: “stake”}
    ]
    guess({ word: “steak”})

    View Slide

  28. View Slide

  29. https://github.com/subsecondtdd/codebreaker-js
    https://github.com/subsecondtdd/assembly-diagrams
    Nat Pryce CukeUp 2017: 

    https://www.youtube.com/watch?v=Fk4rCn4YLLU

    View Slide

  30. View Slide