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

Need for Speed (GTAC 2016)

emanuil
November 16, 2016

Need for Speed (GTAC 2016)

This is the shorter version of the presentation given at VelocityConf Amsterdam 2016

emanuil

November 16, 2016
Tweet

More Decks by emanuil

Other Decks in Programming

Transcript

  1. The time needed to create data for one test: And

    then the test starts Call 12 API endpoints Modify data in 11 tables Takes about 1.2 seconds
  2. +Some More STUB STUB STUB STUB STUB STUB STUB Stub

    all external dependencies Core API
  3. Transparent Fake SSL certs Dynamic Responses Local Storage Return Binary

    Data Regex URL match Existing Tools (March 2016) Stubby4J WireMock Wilma soapUI MockServer mounteback Hoverfly Mirage We created project Nagual, open source soon.
  4. 4 6 8 10 12 14 16 Time to execute

    12 9 7 5 8 12 17 The Sweet Spot
  5. 180 123 89 65 104 61 46 Execution Time in

    Minutes 5 Run in Parallel
  6. 180 123 89 65 104 61 46 5 Execution Time

    in Minutes 3 Equal Batches Run in Parallel Don’t delete test data Run Databases in Memory Using Containers Stub Dependencies Empty Databases New Environment
  7. The tests are slow The tests are unreliable The tests

    can’t exactly pinpoint the problem High Level Tests Problems 3 Minutes No external dependencies It’s cheap to run all tests after every change
  8. In a couple of years, running all your automated tests,

    after every code change, for less than 3 minutes, will be standard development practice.
  9. Slide #, Photo Credits 1. https://www.flickr.com/photos/thomashawk 5. https://www.flickr.com/photos/100497095@N02 7. https://www.flickr.com/photos/andrewmalone

    10. https://www.flickr.com/photos/astrablog 14. https://www.flickr.com/photos/foilman 16. https://www.flickr.com/photos/missusdoubleyou 18. https://www.flickr.com/photos/canonsnapper 20. https://www.flickr.com/photos/anotherangle 23. https://www.flickr.com/photos/-aismist