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

Ogres, onions and layers - story about tests at scale

Ewa
April 17, 2018

Ogres, onions and layers - story about tests at scale

Presentation for TestCon Moscow 2018

Ewa

April 17, 2018
Tweet

More Decks by Ewa

Other Decks in Technology

Transcript

  1. 1

  2. Ogres, onions and layers story about tests at scale Ewa

    Ludwiczak & Kamil Pyć TestCon Moscow 2018
  3. 6 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  4. Web Mobile 7 instant updates ~2 days ~7 days Browsers

    App Store Review Devices Backend Why we bother?
  5. 8 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  6. 10

  7. format obvious rules, lint less trivial run locally after each

    build 15 Problem 1: Cyclomatic complexity Solution: SwiftLint remarks apply to production code and tests use the same versions of formatter & linter
  8. 16 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  9. code coverage says little about test quality not all mutations

    add value use manual mutation in non-trivial test cases 22 Problem 2: Evergreen unit tests Solution: Mutation testing remarks automated mutation testing Problem 2: Evergreen unit tests Solution: Mutation testing https://github.com/mull-project/mull
  10. 23

  11. 24 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  12. 27 Problem 3: Simple mistakes Solution: Snapshot tests in code

    review reference image recorded image diff
  13. value your time involve testers and designers into review 29

    Problem 3: Simple mistakes Solution: Snapshot tests in code review spot visual mistakes on code review level
  14. 30 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  15. Problem 4: Predicting consequences of change Solution: Scheme validation 35

    JSON files JSON scheme Configuration file Backend request Remote validation
  16. Problem 4: Predicting consequences of change Solution: Scheme validation 36

    Configuration file Remote validation JSON file JSON scheme API response
  17. 37 Problem 4: Predicting consequences of change Solution: Functional UI

    tests with mocked API faster, more reliable UI tests relatively slow test coverage progress tests not critical to merge
  18. 38 Problem 4: Predicting consequences of change Solution: UI tests

    improvements More bugs detected 10% comparison of 10 real API vs mocked API UI test runs Less flaky tests 70% comparison of 10 real API vs mocked API UI test runs
  19. 39 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  20. Get as many tester as possible Automate your beta releases

    Highlight what should be checked 43 Problem 5: Late feedback Solution: Continuous delivery
  21. 44 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  22. There are situations you cannot predict Prepare for failure 47

    Remote configuration Problem 6: Testing in laboratory condition Solution: Phased release
  23. 48 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  24. 52

  25. 53 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics
  26. 54 Problem 8: 1 Application release Stable version 2 Comment

    on App Store 3 https://fabric.io/kits/ios/crashlytics
  27. Data-based decisions Bug priority and severity 58 Analyze and plan

    your reaction Problem 8: Decision making Solution: Make use of app analytical data
  28. 59 1. Static analysis 2. Mutation testing 3. Snapshot tests

    4. Functional tests Tests are like onions link_to_presentation 5. Continuous integration 6. Phased release 7. AB Tests 8. Application analytics