3. “Management DO NOT fully trust the
data and analytics on which they are
basing their decisions”
Dr. Thomas Erwin, KPMG
4. B2C Analytics
• Convert first time users to long term
customers
• Provide customer with product they
desire
5. Why should I care?
• Analytics is everywhere – Google,
Facebook, Amazon…
• Companies make smart decisions base on
analytics data
• QA is being left behind
6. Manual Testing is Time Consuming
• Manual testing of Mobile clients is
somewhat cumbersome and requires
proxy tool as Charles.
• It is hard to test since data thrown off to
an Anytics server is not human readable
• Sometimes sent in batches, not per event
thus hard to catch duplication
8. Manual Test Cycle for Mobile Apps
1. Open Charles Proxy
2. Launch simulator
3. Perform user actions
4. Check analytics events being fired during
session
10. What is XCTest/XCUITest?
• Integral framework in Xcode
• Exists since Xcode 7
• Part of XCTest library with extra classes for
UI tests
• Still evolving – parallel testing only
introduced in Xcode 10
11. Pros of XCUITest
• Apple’s native framework
• Easy to learn, no additional installations or
components required (to Xcode)
• Xcode Test Recorder (for XCUITest)
• Faster than many other popular functional
(and cross-platform) test frameworks
• Works with both Swift and Objective-C
12. Ambassador
How to Automate iOS Analytics?
lightweight HTTP server written in swift
https://github.com/envoy/Ambassador
13. Automation Test Cycle
• App is configured to hit lightweight http server
on localhost
• Automated Test perform action that should fire
particular analytics' event
• Upon event fired, we intercepted with
Amabassador and compare fired event with
expected json template
• Check for order of events fired and duplicates