Автоматизация регрессии аналитики

Автоматизация регрессии аналитики

Talk by Andrii Rogulin

Андрей расскажет нам об автоматизации регрессии аналитики, а именно:
- Как упростить жизнь Data Analytics и QA.
- Как (почти) избавиться от Charles при проверке аналитики
- Как подружить UI тесты, сбор и проверку аналитики
- Решения и инструменты

This talk was made for CocoaFriday #4 ( https://cocoaheads.org.ua/cocoafriday/4) which took place June 14, 2019

Video: https://youtu.be/jwsohbSNZ2M

Db84cf61fdada06b63f43f310b68b462?s=128

CocoaHeads Ukraine

June 14, 2019
Tweet

Transcript

  1. 2.

    – Arthur C. Nielsen, Market Researcher & Founder of ACNielsen

    The price of light is less than the cost of darkness.
  2. 5.
  3. 8.
  4. 9.
  5. 10.
  6. 11.

    - But what can we do? - Automate it! -

    But what will we get? Reduced time for analytics testing CI-driven analytics checks Reduced risk of human-driven mistakes Avoid breaks in analytics during refactoring
  7. 13.

    Setup Homebrew Node+npm Maven (or Gradle) Appium Appium Desktop (optional)

    Appium Doctor (optional but recommended) System variables: - JAVA_HOME - M2_HOME - M2 Java libs selenium-java TestNG Appium Allure ...
  8. 14.

    Selenium
 (Open-Source lib) Web Driver Agent iOS Simulator Your Application

    Appium
 Server Your
 UI tests code TestNG + Maven + Java How it works
  9. 21.
  10. 23.

    Setting up profiles (for Maven) pom.xml <profile> <id>My-UItests=Profile-12.1</id> <properties> <hub.url>http://127.0.0.1:4723/wd/hub</hub.url>

    <directory>project.xml</directory> <app.path>${project.basedir}/../Project.ipa</app.path> <language>en</language> </properties> </profile> TestNG xml path to your .ipa file
  11. 25.
  12. 27.

    Unit tests - Tests will vary depending on application’s architecture

    - Tests will be different on each platform (iOS, Android, etc)
  13. 32.

    File rolling by: - file size - time - session

    Multiple files management - number of files File reuse policy
  14. 33.

    How things are going… generally You’re likely to have such

    code somewhere regardless to your app architecture
  15. 36.

    Couple words about CI What actually happens: 1) Cleaning build

    folder 2) Updating dependencies 3) Build for simulator 4) Wrapping .app to .ipa
  16. 37.

    Couple words about CI 5) Pulling Automation tests repo to

    subfolder 6) Checking out needed automation tests branch 7) Starting Appium 8) Running UI tests 9) Killing Appium after all
  17. 41.
  18. 42.

    Bonus - Handy analytics log to be passed as a

    new expected result to automation tests - On-device autonomous analytics testing DON’T FORGET TO REMOVE IT IN THE APP STORE BUILDS
  19. 43.
  20. 44.

    Results - Analytics regression tests that can be run on

    CI - Analytics log file to be passed around - Time economy for manual tests - Handy real-time analytics logging for manual tests - Autonomous analytics on-device testing and sharing - Reduced chance of human-driven mistakes while doing routine analytics checks - Platform and architectural independent tests and Analytics in NOT the only thing you can log and share with your 
 UI tests ;)