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

Ogres, onions, layers - story about test at scale

Ewa
September 04, 2018

Ogres, onions, layers - story about test at scale

Ewa

September 04, 2018
Tweet

More Decks by Ewa

Other Decks in Technology

Transcript

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

    Ludwiczak & Aleksander Grzyb iOSDevUK 2018
  2. 4 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery 6. Laboratory conditions Phased release 7. Decision making A/B tests 8. How users use our app? Usability tests Problem - test solution
  3. respect modular architecture format obvious rules, lint less trivial use

    the same versions of formatter & linter run locally after each build apply to production code and tests 16 Problem 1: Code formatting SwiftFormat + SwiftLint
  4. 17 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing Problem - test solution
  5. code coverage says little about test quality not all mutations

    add value use manual mutation in non-trivial test cases 25 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
  6. 26

  7. 27 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests Problem - test solution
  8. and for a bigger view, one test can take over

    1 second 41 Problem 3: Testing views Snapshot tests overhead
  9. 43 Problem 3: Testing views Snapshot tests remarks longer test

    execution test dynamic type quickly verify view layout preview of changes during code review
  10. 44 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests Problem - test solution
  11. 46 Problem 4: Predicting consequences of change Solution: End-to-end UI

    tests LISTING OFFER HOME ... CART ALLEGRO SEARCH
  12. 47 Problem 4: Predicting consequences of change Solution: End-to-end UI

    tests remarks KIF framework separate test target flaky tests
  13. 48 Problem 4: Predicting consequences of change Solution: UI tests

    with mocked API LISTING OFFER HOME ... CART ALLEGRO SEARCH
  14. Problem 4: Predicting consequences of change Solution: Scheme validation 50

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

    Configuration file Remote validation JSON file JSON scheme API response
  16. 52 Problem 4: Predicting consequences of change Solution: UI tests

    with mocked API remarks faster, more reliable UI tests relatively slow test coverage progress tests not critical to merge
  17. 54 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery Problem - test solution
  18. 57 Problem 5: Is our release candidate working? Release branch

    is created Release branch is created App deployed to App Store
  19. 59 Problem 5: Is our release candidate working? main branch

    is always deployable deploy habit user trust
  20. 65 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery 6. Laboratory conditions Phased release Problem - test solution
  21. 68 Problem 6: Testing in laboratory condition ENG “After latest

    release application crashes” “Nid yw'r cais yn gweithio”
  22. 70 Problem 6: Testing in laboratory condition Solution: Phased release

    https://www.smithsonianmag.com/smart-news/story-real-canary-coal-mine-180961570/
  23. 71 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery 6. Laboratory conditions Phased release 7. Decision making A/B tests Problem - test solution
  24. 77 Problem 7: Decision making Firebase is linked to main

    app OFFER COMPARISON LISTING SEARCH OFFER ... HOME ALLEGRO A/B test runs in Offer module
  25. 78 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery 6. Laboratory conditions Phased release 7. Decision making A/B tests 8. How users use our app? Usability tests Problem - test solution
  26. 79 Problem 8: Do we have the right product? “This

    app is a toy. I have nothing to say...” Elton Johny Tejlor Swift “Tegan yw hwn. Nid oes gennyf ddim i'w ddweud...” “Very bad. After updates it’s only worse not better...” “Drwg iawn. Ar ôl diweddariadau, dim ond yn waeth na fydd yn well...”
  27. 80 Problem 8: Does the user know how to use

    our app? Solution: Usability testing One-way mirror
  28. 82 Problem 8: Does the user know how to use

    our app? Solution: Usability testing One-way mirror
  29. 83 Problem 8: Does the user know how to use

    our app? Solution: Usability testing One-way mirror One-way mirror
  30. 84 Problem 8: Does the user know how to use

    our app? Solution: Usability testing One-way mirror
  31. 85 Problem 8: Does the user know how to use

    our app? Solution: Usability testing One-way mirror One-way mirror
  32. 86 1. Code formatting Static analysis 2. Evergreen unit test

    Mutation testing 3. Testing views Snapshot tests 4. Change management Functional tests 5. Is RC is working? Continuous delivery 6. Laboratory conditions Phased release 7. Decision making A/B tests 8. How users use our app? Usability tests Problem - test solution
  33. 87 Thank you for your attention! Ewa Ludwiczak Senior Software

    Test Engineer [email protected] @ewabielskapoz Aleksander Grzyb iOS Developer [email protected] @aleksandergrzyb