Skip to content

refactor: replace runner xctestrun XML regex parsing with shared iOS XML helper #360

@thymikee

Description

@thymikee

Summary

src/platforms/ios/runner-xctestrun.ts still uses regex-based plist/XML extraction in the fallback path for reading:

  • ProductPaths
  • DependentProductPaths
  • TestHostPath
  • TestBundlePath
  • UITargetAppPath

We recently added src/platforms/ios/xml.ts and already use it in the iOS perf path and plist fallback path. The remaining regex parsing in runner-xctestrun.ts should be moved to the same shared helper so we stop maintaining multiple XML/plist parsing approaches.

Why

  • Reduce duplicated XML parsing logic across iOS platform code.
  • Remove brittle regex parsing for plist/XML structures.
  • Keep the shared XML handling centered in one small helper.
  • Make future parsing fixes apply consistently across perf, plist, and xctestrun code paths.

Scope

  • Replace extractPlistStringValues and extractPlistArrayStringValues in src/platforms/ios/runner-xctestrun.ts with traversal built on src/platforms/ios/xml.ts.
  • Preserve the current best-effort fallback behavior.
  • Keep the change scoped to the runner/xctestrun path.
  • Add or update focused tests around fallback extraction behavior.

Notes

This is intentionally separate from PR #358 so the iOS device perf work stays focused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions