mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-21 12:20:48 +02:00
feat(ios-qa): add XCUITest execution-plan module
Standalone planner that turns the IOSQAFlow JSON contract into an xcodebuild XCUITest invocation for simulator or physical device, using semantic selectors (identifier/role/label) and no coordinate taps. Pure plan generation; covered by 7 unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a84a6e233d
commit
466b1ec744
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bun
|
||||
import { readFileSync } from 'fs';
|
||||
import { buildXCUITestPlan } from './xcuitest-plan';
|
||||
import type { IOSQAFlow, IOSQATarget, XCUITestRunnerConfig } from './contract';
|
||||
|
||||
function usage(): never {
|
||||
console.error('usage: bun ios-qa/executor/cli.ts <flow.json> <target.json> <runner.json>');
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
const [, , flowPath, targetPath, runnerPath] = process.argv;
|
||||
if (!flowPath || !targetPath || !runnerPath) usage();
|
||||
|
||||
try {
|
||||
const flow = JSON.parse(readFileSync(flowPath, 'utf8')) as IOSQAFlow;
|
||||
const target = JSON.parse(readFileSync(targetPath, 'utf8')) as IOSQATarget;
|
||||
const runner = JSON.parse(readFileSync(runnerPath, 'utf8')) as XCUITestRunnerConfig;
|
||||
const result = buildXCUITestPlan(flow, target, runner, flowPath);
|
||||
console.log(JSON.stringify(result, null, 2));
|
||||
if (result.status !== 'ready') process.exitCode = 1;
|
||||
} catch (error) {
|
||||
console.error(JSON.stringify({ status: 'blocked', reason: error instanceof Error ? error.message : String(error) }));
|
||||
process.exitCode = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user