3.8 KiB
SportsTime UI Test Prompt (Paste Into Claude)
Use this when you want Claude to pick and implement the 3 easiest UI tests from QA IDs/names you provide.
Replace the INPUT section, then paste the whole prompt.
You are an iOS UI test engineer working in the SportsTime repo.
Mission
From the provided QA cases (IDs/names from docs/SportsTime_QA_Test_Plan.xlsx), pick the 3 easiest, lowest-flake cases and implement solid UI tests for them using the existing SportsTime UI test architecture.
Non-Negotiable Rules
- Do not reinvent the test framework.
- Reuse existing architecture:
SportsTimeUITests/Framework/BaseUITestCase.swiftSportsTimeUITests/Framework/Screens.swift- existing
TestFlowshelpers - existing suites under
SportsTimeUITests/Tests/
- Prefer updating existing suites over creating new ones.
- Use stable accessibility IDs already used in the app/tests (
home.*,wizard.*,tripOptions.*,tripDetail.*,schedule.*,settings.*,progress.*, etc.). - Prefer robust waits (
waitForExistenceOrFail,waitUntilHittable) and page-object methods. - Avoid
sleepunless there is no reliable alternative; if used, justify it. - Keep tests deterministic with current local test data.
- Follow naming conventions (
testF###_...,testP###_..., etc.). - Do not change product code unless absolutely required for testability (and explain why).
- Change only what is needed for these 3 tests.
Required Reading Before Coding
AGENTS.mdXCUITest-Authoring.md- Existing tests in
SportsTimeUITests/Tests/for patterns and style
Selection Strategy (Pick Exactly 3)
Choose the 3 easiest cases using this priority order:
- Already mostly covered by existing screen objects/flows.
- Requires minimal or no new selectors.
- No unstable backend/timing dependency.
- No complex multi-screen setup unless reusable via existing
TestFlows. - Highest confidence of passing consistently on current simulator baseline.
If a candidate looks flaky/high-risk, skip it and explain why.
Implementation Workflow
- Evaluate all candidate QA cases.
- Output a short ranked list with reason for each.
- Confirm the chosen 3.
- Implement tests:
- Put tests in existing or appropriate suite(s) in
SportsTimeUITests/Tests/. - Add page-object helpers in
Screens.swiftonly when reusable. - Keep assertions behavior-focused and explicit.
- Capture screenshots at key checkpoints for longer flows.
- Put tests in existing or appropriate suite(s) in
- Run only the 3 selected tests first.
- Fix failures.
- Re-run each selected test at least 2 times to catch flake.
- Stop only when all 3 are green and stable, or clearly blocked.
Validation Commands
Use this destination:
-destination 'platform=iOS Simulator,name=iPhone 17,OS=latest'
Run each selected test explicitly:
xcodebuild test-without-building -project SportsTime.xcodeproj -scheme SportsTime -parallel-testing-enabled NO -only-testing:SportsTimeUITests/<SuiteName>/test<ID>_<Name> <destination>
If needed, run selected suite only:
xcodebuild test-without-building -project SportsTime.xcodeproj -scheme SportsTime -parallel-testing-enabled NO -only-testing:SportsTimeUITests/<SuiteName> <destination>
Do not run the full suite unless I ask.
Output Contract
Return:
- Chosen 3 QA cases and why they were selected.
- Files changed and what changed in each.
- Exact commands run.
- Test results for each selected test (including repeat runs).
- Any residual risk or blocker.
- Optional next 2-3 QA cases to implement next (ranked by ease/confidence).
INPUT (Replace This Block)
Candidate QA cases from docs/SportsTime_QA_Test_Plan.xlsx:
- [F-___]
- [F-___]
- [F-___]
- [F-___]
- [F-___]
Extra constraints:
- [Example: Do not edit
SportsTimeUITests/Tests/TripSavingTests.swift] - [Example: Only use existing
TestFlows]