Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

KassiOS: a Kaspresso-style layer for XCUITest, tested against a broken bank

说明与用途

KassiOS 是一个基于 XCUITest 的 Kaspresso 风格层,集中处理等待、重试和报告,并在故意出现错误的 iOS 应用 ChaosBank 上得到验证。

问题

XCUITest lacks built‑in waiting, retries, screen objects and reporting, leading to fragile tests.

结果

KassiOS reduced test code verbosity, centralized waiting logic, and uncovered hidden defects in both the app and the framework itself when run against ChaosBank.

工作流

  • 1. Define screen objects as subclasses of KassScreen with lazy elements and onLoad arrays.
  • 2. Write tests using onScreen blocks that perform actions and assertions.
  • 3. KassiOS automatically waits for elements, retries within a time budget, scrolls, dismisses keyboard, and verifies state changes.
  • 4. On failure, KassiOS captures a screenshot, accessibility tree, and a helpful message.
  • 5. Run tests against ChaosBank, a deliberately buggy app, to validate defect detection.

证据

XCUITest gives you primitives and leaves waiting, retries, screen objects and reporting to you.

来源

KassiOS checks the elements in onLoad. If the app ended up on a different screen, the test fails right there, in the "On LoginScreen" step, instead of on whichever field it happened to touch first.

来源

When something does fail, the report gets a screenshot of the screen at that moment and the full accessibility tree, and the message tries to say why: KassiOS: text 'welcom' — assertVisible failed: does not exist ↳ element not found in the current hierarchy ↳ did you mean: 'welcome', 'Welcome!'?

来源

The first full run had 34 tests (Xcode 27.1, iPhone 17 simulator, M1 Max), and it was humbling: test_portfolio_showsTotalAndPnl stayed green with every defect on, including one that shows a loss as a gain.

来源

  • 记录日期: 2026-11-02T05:44:02.679Z