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

Automation Tests at Babylon

Automation Tests at Babylon

Ilya Puchka

October 03, 2018
Tweet

More Decks by Ilya Puchka

Other Decks in Programming

Transcript

  1. What we will talk about: — What issues do we

    face in UI tests — How do we solve them — BDD-style UI tests — Tooling
  2. What issues do we face? — unexpected failures — performance

    — scenarios hard to automate & hard to test manually
  3. Performance Repeated test steps — register new user — open

    Appointments tab — enter your symptoms — book an appointment — add payment method — confirm payment
  4. Control the World** — Control the network — Control the

    initial state of the app ** C. Montgomery Burns' Handbook of World Domination By Matt Groening.
  5. How to control the network — from inside the app

    — from inside the test runner
  6. From inside the app - in-app stubs — straightforward ✅

    — integrates in application code — not very flexible ❌
  7. From inside test runner - local web server — harder

    to setup ❌ — integrates in test runner ✅ — very flexible ✅
  8. Local server setup In the test: — web server implementation

    (Ambassador, GCDWebServer, swifter, Kitura, SwiftNIO, ...) — request interception
  9. Local server setup In the test: — web server implementation

    (Ambassador, GCDWebServer, swifter, Kitura, SwiftNIO, ...) — request interception
  10. Local server edge cases — Parallel testing — Absolute urls

    in responses — Overriding response size
  11. Network session recording — Record and replay using mock URLSession

    (Vinyl, DVR) — detect recording mode — configure matching strategy — create URLSession mock
  12. Network session recording — Record random test input — match

    full request — record random body data in a file
  13. Mocked backend — mock everything ❌ — a lot of

    boilerplate code to write — total control ✅
  14. Tests performance API calls from tests — to register a

    new user — to add a family member — to book an appointment — etc
  15. Links Web servers envoy/Ambassador httpswift/swifter swisspol/GCDWebServer Snapshots Velhotes/Vinyl venmo/DVR BDD

    tests net-a-porter-mobile/XCTest-Gherkin Ahmed-Ali/Cucumberish Other tools TitouanVanBelle/XCTestHTMLReport