Klarna Sep 7, 2023

Native End-to-End Testing for Mobile Apps

Article Summary

Joana Melo from Klarna turned a 6-month diversity program into company-wide impact by solving a pain point that had defeated multiple engineering teams before her.

As part of Klarna's Senior Engineering Program for Women, Melo tackled native end-to-end testing for mobile apps. The challenge: replace manual release testing across iOS and Android with automated E2E tests, something previous attempts had failed to deliver.

Key Takeaways

Critical Insight

Klarna now has working E2E tests in native feature apps with efficient runs, eliminating weekly manual release testing and catching bugs before production.

The technical debt she uncovered around sub-dependencies and naming conventions reveals common pitfalls in monorepo architectures that most teams face.

About This Article

Problem

Klarna's monorepo had a TypeScript globals collision where Jest and jQuery definitions conflicted with Mocha and Appium syntax like 'expect' and '$'. This blocked native E2E test implementation across multiple products.

Solution

Joana Melo excluded Appium test folders from the global tsconfig and created local tsconfig files for each feature's tests. These local files extended the Appium tooling config. She also established naming conventions using the '__appium__' namespace for test discoverability.

Impact

Features can now own their tests through test collocation. This pattern is being applied to migrate Klarna's central Cypress tests and has saved core teams significant implementation time.

Recent from Klarna

Related Articles