@ihyeon/flow-qa 0.9.6 → 0.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli.js +8 -9
- package/dist/src/engine.js +6 -3
- package/dist/src/mobile-runtime.js +26 -0
- package/dist/src/report.js +65 -0
- package/dist/src/run-comparison.js +2 -2
- package/dist/src/targets.js +23 -0
- package/dist/src/ui/server.js +7 -24
- package/docs/mobile.md +1 -1
- package/docs/releases.md +14 -0
- package/package.json +2 -2
- package/skills/flow-qa/references/workflow.md +6 -0
package/dist/src/cli.js
CHANGED
|
@@ -11,8 +11,8 @@ import { buildPlanningPrompt, planFlow } from "./planner.js";
|
|
|
11
11
|
import { compileSuite } from "./compiler.js";
|
|
12
12
|
import { CaseSelectionError, isReportSelectionValid, selectCases } from "./case-selection.js";
|
|
13
13
|
import { runSuite } from "./engine.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { renderSavedMarkdown } from "./report.js";
|
|
15
|
+
import { registrationTarget, sameReportTarget, targetLabel } from "./targets.js";
|
|
16
16
|
import { createAgentHandoff, reviewAgentHandoff } from "./agent-handoff.js";
|
|
17
17
|
const help = {
|
|
18
18
|
en: `Flow QA — turn user flows into repeatable tests and evidence-backed QA reports
|
|
@@ -195,9 +195,10 @@ export async function main(args) {
|
|
|
195
195
|
if (platform === 'web' && (values['bundle-id'] !== undefined || values.device !== undefined) || platform !== 'web' && values.url !== undefined) {
|
|
196
196
|
throw new Error(localized(locale, 'Use --url for web, or --bundle-id and --device for a mobile app.', '웹은 --url, 모바일 앱은 --bundle-id와 --device를 사용하세요.'));
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
const target = targetSchema.parse(platform === 'web'
|
|
199
199
|
? { url: required(values.url, '--url', locale) }
|
|
200
200
|
: { kind: 'mobile', platform, bundleId: required(values['bundle-id'], '--bundle-id', locale), device: required(values.device, '--device', locale) });
|
|
201
|
+
config.targets[name] = registrationTarget(target, config.targets[name]);
|
|
201
202
|
await writeConfig(workspace, config);
|
|
202
203
|
console.log(localized(locale, `Target ${name} saved: ${targetLabel(config.targets[name])}. No app has been launched.`, `대상 ${name} 저장: ${targetLabel(config.targets[name])}. 앱은 실행하지 않았습니다.`));
|
|
203
204
|
return;
|
|
@@ -317,12 +318,10 @@ export async function main(args) {
|
|
|
317
318
|
if (command === 'report') {
|
|
318
319
|
const runDirectory = resolve(workspace, required(arg, localized(locale, 'Run directory', '실행 폴더'), locale));
|
|
319
320
|
let content = await readFile(resolve(runDirectory, 'qa-report.md'), 'utf8');
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
content = renderMarkdown(JSON.parse(await readFile(resolve(runDirectory, 'qa-report.json'), 'utf8')), locale);
|
|
323
|
-
}
|
|
324
|
-
catch { /* Preserve the saved report if an older or malformed JSON report cannot be rendered. */ }
|
|
321
|
+
try {
|
|
322
|
+
content = renderSavedMarkdown(JSON.parse(await readFile(resolve(runDirectory, 'qa-report.json'), 'utf8')), content, locale);
|
|
325
323
|
}
|
|
324
|
+
catch { /* Preserve the saved Markdown when normalized JSON is absent or malformed. */ }
|
|
326
325
|
console.log(content.replace(/\u001b/g, ''));
|
|
327
326
|
return;
|
|
328
327
|
}
|
|
@@ -342,7 +341,7 @@ export async function main(args) {
|
|
|
342
341
|
};
|
|
343
342
|
const before = await load(arg), after = await load(second);
|
|
344
343
|
const sameSelection = JSON.stringify(before.cases.map((item) => item.id).sort()) === JSON.stringify(after.cases.map((item) => item.id).sort());
|
|
345
|
-
const comparable = before.suiteId === after.suiteId && before.suiteHash === after.suiteHash &&
|
|
344
|
+
const comparable = before.suiteId === after.suiteId && before.suiteHash === after.suiteHash && sameReportTarget(before.target, after.target) && sameSelection;
|
|
346
345
|
console.log(comparable ? localized(locale, 'Comparing the same suite, target and case selection (check external data state separately)', '동일 명세·대상·케이스 범위 비교 (외부 데이터 상태는 별도 확인)') : localized(locale, 'Suite, target or case selection differs; no direct regression verdict is made.', '명세·대상 또는 케이스 범위가 달라 직접적인 회귀 판정은 하지 않습니다.'));
|
|
347
346
|
if (before.selection || after.selection)
|
|
348
347
|
console.log(localized(locale, 'This comparison includes selected cases only; omitted cases were not evaluated.', '이 비교에는 선택 실행이 포함되어 있습니다. 미선택 케이스는 검증되지 않았습니다.'));
|
package/dist/src/engine.js
CHANGED
|
@@ -6,7 +6,7 @@ import path from 'node:path';
|
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { selectCases } from "./case-selection.js";
|
|
8
8
|
import { compileSuite } from "./compiler.js";
|
|
9
|
-
import { acquireMobileDevice, mobileReadiness } from "./mobile-runtime.js";
|
|
9
|
+
import { acquireMobileDevice, checkMobileApp, mobileReadiness } from "./mobile-runtime.js";
|
|
10
10
|
import { failureReport, normalizeReport1, renderMarkdown, stoppedReport } from "./report.js";
|
|
11
11
|
import { configSchema, suiteSchema } from "./schema.js";
|
|
12
12
|
import { reportTarget, targetKind } from "./targets.js";
|
|
@@ -227,9 +227,12 @@ export async function runSuite(options) {
|
|
|
227
227
|
else {
|
|
228
228
|
sdkDevice = readiness.sdkDevice;
|
|
229
229
|
releaseMobileDevice = acquireMobileDevice(selectedTarget.platform, readiness.deviceId);
|
|
230
|
+
if (!releaseMobileDevice)
|
|
231
|
+
blockAll(executionSuite, 'Selected mobile device is in use.');
|
|
232
|
+
if (!options.signal?.aborted && await (options.checkMobileApp ?? checkMobileApp)(selectedTarget, readiness.sdkDevice) === 'missing') {
|
|
233
|
+
blockAll(executionSuite, `Selected app ${selectedTarget.bundleId} is not installed on the selected ${selectedTarget.platform === 'ios' ? 'simulator' : 'emulator'}. Install it on that device and retry.`);
|
|
234
|
+
}
|
|
230
235
|
}
|
|
231
|
-
if (!releaseMobileDevice)
|
|
232
|
-
blockAll(executionSuite, 'Selected mobile device is in use.');
|
|
233
236
|
}
|
|
234
237
|
const executable = runnableSuite(executionSuite, blocked);
|
|
235
238
|
const testFile = path.join(runDir, TEST_FILE);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
1
3
|
const INVENTORY_TIMEOUT_MS = 10_000;
|
|
2
4
|
const IOS_UDID = /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;
|
|
3
5
|
const ANDROID_EMULATOR = /^emulator-\d+$/;
|
|
4
6
|
const activeDevices = new Set();
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
5
8
|
// agent-device's --device name lookup is case-insensitive and treats _ as a space.
|
|
6
9
|
const normalizedName = (value) => value.replaceAll('_', ' ').replace(/\s+/g, ' ').trim().toLowerCase();
|
|
7
10
|
async function localDevices(platform) {
|
|
@@ -56,6 +59,29 @@ export async function mobileReadiness(target, listDevices = localDevices) {
|
|
|
56
59
|
}
|
|
57
60
|
return { ready: true, deviceId: selected.id, sdkDevice };
|
|
58
61
|
}
|
|
62
|
+
/** Check only virtual devices whose installed apps can be queried without launching the app. */
|
|
63
|
+
export const checkMobileApp = async (target, sdkDevice) => {
|
|
64
|
+
if (target.platform === 'ios' && IOS_UDID.test(sdkDevice)) {
|
|
65
|
+
try {
|
|
66
|
+
await execFileAsync('xcrun', ['simctl', 'get_app_container', sdkDevice, target.bundleId, 'app'], { timeout: 10_000, maxBuffer: 64 * 1024 });
|
|
67
|
+
return 'installed';
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const result = error;
|
|
71
|
+
return result.code === 2 && /No such file or directory/i.test(result.stderr ?? '') ? 'missing' : 'unknown';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (target.platform === 'android' && ANDROID_EMULATOR.test(sdkDevice)) {
|
|
75
|
+
try {
|
|
76
|
+
const { stdout } = await execFileAsync('adb', ['-s', sdkDevice, 'shell', 'pm', 'path', target.bundleId], { timeout: 10_000, maxBuffer: 64 * 1024 });
|
|
77
|
+
return stdout.split(/\r?\n/).some((line) => line.startsWith('package:')) ? 'installed' : stdout.trim() === '' ? 'missing' : 'unknown';
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return 'unknown';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return 'unknown';
|
|
84
|
+
};
|
|
59
85
|
/** Avoid simultaneous runs on the same device within this process. */
|
|
60
86
|
export function acquireMobileDevice(platform, deviceId) {
|
|
61
87
|
const key = JSON.stringify([platform, deviceId]);
|
package/dist/src/report.js
CHANGED
|
@@ -1,9 +1,74 @@
|
|
|
1
1
|
import { realpathSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { z } from 'zod';
|
|
3
4
|
import { expectedChecks } from "./compiler.js";
|
|
4
5
|
import { isReportSelectionValid } from "./case-selection.js";
|
|
5
6
|
import { localized, localizeProductMessage } from "./i18n.js";
|
|
7
|
+
import { idSchema } from "./schema.js";
|
|
6
8
|
import { targetLabel } from "./targets.js";
|
|
9
|
+
const RUN_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10
|
+
const archiveEnvelopeSchema = z.object({
|
|
11
|
+
schemaVersion: z.literal('flow-qa/report-1'), runId: z.string().regex(RUN_ID), suiteId: idSchema,
|
|
12
|
+
suiteHash: z.string(), target: z.union([
|
|
13
|
+
z.object({ name: z.string(), url: z.string() }),
|
|
14
|
+
z.object({ name: z.string(), kind: z.literal('mobile'), platform: z.enum(['ios', 'android']), bundleId: z.string(), device: z.string() }),
|
|
15
|
+
]),
|
|
16
|
+
startedAt: z.string(), finishedAt: z.string(), status: z.enum(['passed', 'failed', 'blocked', 'error', 'interrupted']),
|
|
17
|
+
cases: z.array(z.object({ id: z.string(), title: z.string(), status: z.enum(['passed', 'failed', 'flaky', 'blocked', 'skipped', 'error']),
|
|
18
|
+
expected: z.array(z.string()), attempts: z.array(z.unknown()), reason: z.string().optional() }).passthrough()),
|
|
19
|
+
errors: z.array(z.string()), usage: z.object({ modelTokens: z.number(), modelCachedTokens: z.number().optional(), estimatedCostUsd: z.number().optional() }).optional(),
|
|
20
|
+
selection: z.unknown().optional(),
|
|
21
|
+
}).passthrough();
|
|
22
|
+
/** The original UI metadata contract accepts older reports with incomplete attempt details. */
|
|
23
|
+
export function parseArchivedReportEnvelope(raw) {
|
|
24
|
+
const parsed = archiveEnvelopeSchema.safeParse(raw);
|
|
25
|
+
return parsed.success && isReportSelectionValid(parsed.data.cases, parsed.data.selection) ? parsed.data : undefined;
|
|
26
|
+
}
|
|
27
|
+
const savedErrorSchema = z.object({ code: z.string(), message: z.string(), category: z.enum(['test', 'configuration', 'infrastructure', 'internal', 'interrupted']).optional() });
|
|
28
|
+
const savedAttemptSchema = z.object({
|
|
29
|
+
index: z.number().int().nonnegative(), status: z.enum(['passed', 'failed', 'timed-out', 'interrupted', 'skipped']),
|
|
30
|
+
startedAt: z.string(), durationMs: z.number().finite().nonnegative(),
|
|
31
|
+
error: savedErrorSchema.optional(), secondaryErrors: z.array(savedErrorSchema),
|
|
32
|
+
steps: z.array(z.object({ api: z.string(), label: z.string(), status: z.string() })),
|
|
33
|
+
artifacts: z.array(z.object({ kind: z.string(), redaction: z.enum(['complete', 'not-required', 'incomplete']), path: z.string().optional() })),
|
|
34
|
+
});
|
|
35
|
+
const savedReportSchema = z.object({
|
|
36
|
+
...archiveEnvelopeSchema.shape,
|
|
37
|
+
suiteHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
38
|
+
cases: z.array(z.object({
|
|
39
|
+
id: idSchema, title: z.string(), status: z.enum(['passed', 'failed', 'flaky', 'blocked', 'skipped', 'error']),
|
|
40
|
+
expected: z.array(z.string()), reason: z.string().optional(),
|
|
41
|
+
attempts: z.array(savedAttemptSchema),
|
|
42
|
+
})),
|
|
43
|
+
usage: z.object({ modelTokens: z.number().finite().nonnegative(), modelCachedTokens: z.number().finite().nonnegative().optional(), estimatedCostUsd: z.number().finite().nonnegative().optional() }).optional(),
|
|
44
|
+
});
|
|
45
|
+
/** Shared archive gate for the CLI and local UI. Inspect the original object so extra selection keys cannot be stripped. */
|
|
46
|
+
export function isSavedReport(raw) {
|
|
47
|
+
if (!savedReportSchema.safeParse(raw).success)
|
|
48
|
+
return false;
|
|
49
|
+
const report = raw;
|
|
50
|
+
if (!isReportSelectionValid(report.cases, report.selection))
|
|
51
|
+
return false;
|
|
52
|
+
for (const item of report.cases) {
|
|
53
|
+
if (item.status === 'passed' && (item.attempts.length !== 1 || item.attempts[0]?.index !== 0 || item.attempts[0]?.status !== 'passed'))
|
|
54
|
+
return false;
|
|
55
|
+
if (item.status === 'flaky' && (item.attempts.length < 2 || item.attempts.at(-1)?.status !== 'passed'
|
|
56
|
+
|| item.attempts.some((attempt, index) => attempt.index !== index || (index < item.attempts.length - 1 && !['failed', 'timed-out'].includes(attempt.status)))))
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
return report.status !== 'passed' || (report.errors.length === 0 && report.cases.length > 0 && report.cases.every((item) => item.status === 'passed'));
|
|
60
|
+
}
|
|
61
|
+
/** Prefer the normalized result for either language; keep older saved Markdown when it cannot be rendered. */
|
|
62
|
+
export function renderSavedMarkdown(raw, savedMarkdown, locale) {
|
|
63
|
+
if (!isSavedReport(raw))
|
|
64
|
+
return savedMarkdown;
|
|
65
|
+
try {
|
|
66
|
+
return renderMarkdown(raw, locale);
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
return savedMarkdown;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
7
72
|
function scopedCases(context) {
|
|
8
73
|
if (!context.selection)
|
|
9
74
|
return context.suite.cases;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { localized } from "./i18n.js";
|
|
2
2
|
import { isReportSelectionValid } from "./case-selection.js";
|
|
3
|
-
import {
|
|
3
|
+
import { sameReportTarget, targetLabel } from "./targets.js";
|
|
4
4
|
export const comparisonCategories = ['newly-failed', 'now-passed', 'changed', 'unchanged', 'added', 'missing'];
|
|
5
5
|
export class ComparisonError extends Error {
|
|
6
6
|
status;
|
|
@@ -51,7 +51,7 @@ export function compareReports(baseline, current) {
|
|
|
51
51
|
throw new ComparisonError(400, 'A comparison needs two different runs.');
|
|
52
52
|
if (baseline.suiteId !== current.suiteId)
|
|
53
53
|
throw new ComparisonError(409, 'Both reports must belong to the same suite.');
|
|
54
|
-
if (
|
|
54
|
+
if (!sameReportTarget(baseline.target, current.target)) {
|
|
55
55
|
throw new ComparisonError(409, 'Both reports must use the same target.');
|
|
56
56
|
}
|
|
57
57
|
if (!baseline.suiteHash.trim() || !current.suiteHash.trim()) {
|
package/dist/src/targets.js
CHANGED
|
@@ -13,6 +13,29 @@ export function targetFingerprint(target) {
|
|
|
13
13
|
: { kind: 'web', url: target.url };
|
|
14
14
|
return createHash('sha256').update(JSON.stringify(identity)).digest('hex');
|
|
15
15
|
}
|
|
16
|
+
// Keep the original authority spelling so only the optional root slash compares equal.
|
|
17
|
+
function rootAuthority(url) {
|
|
18
|
+
return /^(https?:\/\/[^/?#@\\\s]+)\/?$/i.exec(url)?.[1];
|
|
19
|
+
}
|
|
20
|
+
export function sameReportTarget(left, right) {
|
|
21
|
+
if (targetFingerprint(left) === targetFingerprint(right))
|
|
22
|
+
return true;
|
|
23
|
+
if (left.kind === 'mobile' || right.kind === 'mobile' || typeof left.url !== 'string' || typeof right.url !== 'string')
|
|
24
|
+
return false;
|
|
25
|
+
const authority = rootAuthority(left.url);
|
|
26
|
+
return authority !== undefined && authority === rootAuthority(right.url);
|
|
27
|
+
}
|
|
28
|
+
export function registrationTarget(target, previous) {
|
|
29
|
+
if (target.kind === 'mobile')
|
|
30
|
+
return target;
|
|
31
|
+
const authority = rootAuthority(target.url);
|
|
32
|
+
if (!authority)
|
|
33
|
+
return target;
|
|
34
|
+
if (previous && previous.kind !== 'mobile' && rootAuthority(previous.url) === authority) {
|
|
35
|
+
return { ...target, url: previous.url };
|
|
36
|
+
}
|
|
37
|
+
return { ...target, url: authority };
|
|
38
|
+
}
|
|
16
39
|
export function reportTarget(name, target) {
|
|
17
40
|
return target.kind === 'mobile'
|
|
18
41
|
? { name, kind: 'mobile', platform: target.platform, bundleId: target.bundleId, device: target.device }
|
package/dist/src/ui/server.js
CHANGED
|
@@ -13,10 +13,10 @@ import { runSuite } from "../engine.js";
|
|
|
13
13
|
import { localeFromAcceptLanguage, localizeProductMessage } from "../i18n.js";
|
|
14
14
|
import { EvidenceError, readEvidence } from "./evidence.js";
|
|
15
15
|
import { buildPlanningPrompt, planFlow, PlannerError } from "../planner.js";
|
|
16
|
-
import {
|
|
16
|
+
import { parseArchivedReportEnvelope, renderSavedMarkdown } from "../report.js";
|
|
17
17
|
import { compareReports, ComparisonError, renderComparisonMarkdown } from "../run-comparison.js";
|
|
18
18
|
import { configSchema, idSchema, modelSchema, suiteSchema, targetSchema } from "../schema.js";
|
|
19
|
-
import { targetFingerprint } from "../targets.js";
|
|
19
|
+
import { registrationTarget, targetFingerprint } from "../targets.js";
|
|
20
20
|
import { CONFIG_FILE, sha256 } from "../workspace.js";
|
|
21
21
|
const MAX_BODY = 256 * 1024;
|
|
22
22
|
const MAX_FLOW = 128 * 1024;
|
|
@@ -36,18 +36,6 @@ const runCursorSchema = z.object({
|
|
|
36
36
|
filterHash: z.string().regex(/^[0-9a-f]{64}$/),
|
|
37
37
|
}).strict();
|
|
38
38
|
const FILE_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,159}$/;
|
|
39
|
-
const reportEnvelope = z.object({
|
|
40
|
-
schemaVersion: z.literal('flow-qa/report-1'), runId: z.string().regex(RUN_ID), suiteId: idSchema,
|
|
41
|
-
suiteHash: z.string(), target: z.union([
|
|
42
|
-
z.object({ name: z.string(), url: z.string() }),
|
|
43
|
-
z.object({ name: z.string(), kind: z.literal('mobile'), platform: z.enum(['ios', 'android']), bundleId: z.string(), device: z.string() }),
|
|
44
|
-
]),
|
|
45
|
-
startedAt: z.string(), finishedAt: z.string(), status: z.enum(['passed', 'failed', 'blocked', 'error', 'interrupted']),
|
|
46
|
-
cases: z.array(z.object({ id: z.string(), title: z.string(), status: z.enum(['passed', 'failed', 'flaky', 'blocked', 'skipped', 'error']),
|
|
47
|
-
expected: z.array(z.string()), attempts: z.array(z.unknown()), reason: z.string().optional() }).passthrough()),
|
|
48
|
-
errors: z.array(z.string()), usage: z.object({ modelTokens: z.number(), modelCachedTokens: z.number().optional(), estimatedCostUsd: z.number().optional() }).optional(),
|
|
49
|
-
selection: z.unknown().optional(),
|
|
50
|
-
}).passthrough().refine((report) => isReportSelectionValid(report.cases, report.selection));
|
|
51
39
|
const PUBLIC_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), 'public');
|
|
52
40
|
const STATIC_FILES = {
|
|
53
41
|
'/': { file: path.join(PUBLIC_DIR, 'index.html'), type: 'text/html; charset=utf-8' },
|
|
@@ -396,17 +384,12 @@ export async function startUIServer(options) {
|
|
|
396
384
|
}
|
|
397
385
|
async function report(runId, includeMarkdown, locale = 'en') {
|
|
398
386
|
const dir = await runDirectory(runId);
|
|
399
|
-
const
|
|
400
|
-
if (!
|
|
387
|
+
const raw = parseArchivedReportEnvelope(jsonObject(await readRegular(dir, 'qa-report.json', MAX_REPORT)));
|
|
388
|
+
if (!raw || raw.runId !== runId)
|
|
401
389
|
notFound();
|
|
402
|
-
const raw = parsed.data;
|
|
403
390
|
let markdown = includeMarkdown ? await readRegular(dir, 'qa-report.md', MAX_REPORT) : undefined;
|
|
404
|
-
if (markdown !== undefined
|
|
405
|
-
|
|
406
|
-
markdown = renderMarkdown(raw, locale);
|
|
407
|
-
}
|
|
408
|
-
catch { /* Preserve the saved report when an older or malformed JSON report cannot be rendered. */ }
|
|
409
|
-
}
|
|
391
|
+
if (markdown !== undefined)
|
|
392
|
+
markdown = renderSavedMarkdown(raw, markdown, locale);
|
|
410
393
|
return { report: raw, ...(markdown === undefined ? {} : { markdown }) };
|
|
411
394
|
}
|
|
412
395
|
async function runCandidates() {
|
|
@@ -821,7 +804,7 @@ export async function startUIServer(options) {
|
|
|
821
804
|
]), body);
|
|
822
805
|
const target = parse(targetSchema, input);
|
|
823
806
|
const settings = await config();
|
|
824
|
-
settings.targets[name] = target;
|
|
807
|
+
settings.targets[name] = registrationTarget(target, settings.targets[name]);
|
|
825
808
|
await updateConfig(settings);
|
|
826
809
|
});
|
|
827
810
|
sendJSON(response, 200, { ok: true });
|
package/docs/mobile.md
CHANGED
|
@@ -34,7 +34,7 @@ Saving a target only writes configuration. It does not contact a model, boot a d
|
|
|
34
34
|
|
|
35
35
|
For an iOS simulator, prepare Xcode, an installed simulator runtime, a booted simulator, and a simulator build of the app installed on it. For Android, prepare the Android SDK and a booted emulator or an authorized connected device with the app installed. Physical iOS devices additionally need pairing, Developer Mode, and signing of the upstream automation runner. Follow the [mobile engine's setup instructions](https://e2e.tester.army/docs/mobile#physical-devices) for device-specific requirements.
|
|
36
36
|
|
|
37
|
-
Flow QA does not download SDKs, create or boot simulators, or install application builds. A missing or unavailable selected device blocks the run; a saved target is not evidence of a working device or app. For physical device IDs that the underlying engine resolves by name, the device name must be unique after case and whitespace normalization; ambiguous selection blocks the run. Chromium is only required for web targets.
|
|
37
|
+
Flow QA does not download SDKs, create or boot simulators, or install application builds. A missing or unavailable selected device blocks the run; a saved target is not evidence of a working device or app. Before a run on a booted iOS simulator or Android emulator, Flow QA also checks whether the configured app ID is installed. A confirmed missing app blocks the run with no test attempts and tells you to install it on that device. If the local app query cannot establish installation, the native engine still runs and its result remains visible; physical devices retain this engine-level check. For physical device IDs that the underlying engine resolves by name, the device name must be unique after case and whitespace normalization; ambiguous selection blocks the run. Chromium is only required for web targets.
|
|
38
38
|
|
|
39
39
|
## Native steps
|
|
40
40
|
|
package/docs/releases.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Releases and verification
|
|
2
2
|
|
|
3
|
+
## 0.9.8 — block a native run when the selected simulator lacks the app
|
|
4
|
+
|
|
5
|
+
Before launching a test on a booted iOS simulator or Android emulator, Flow QA checks whether the registered app ID is installed. A confirmed missing app now produces a blocked report with zero attempts and an installation instruction. It no longer appears as an engine error after a failed launch. When the local query cannot confirm installation, the native engine still decides the result; physical device behavior is unchanged. No app is installed by this check.
|
|
6
|
+
|
|
7
|
+
The direct `agent-device` dependency matches the version used by `@e2e-dev/mobile` (0.21.35). Previously, the first native run replaced the 0.21.22 readiness daemon with 0.21.35 and the next run could be blocked by a version conflict. A regression check keeps the two declared versions aligned.
|
|
8
|
+
|
|
9
|
+
On 2026-11-18, an iOS 18.6 simulator launched its installed Settings app and passed the Korean title assertion twice in the same local daemon state. A missing bundle returned a blocked report with no native process or test attempt. The fresh tarball consumer repeated the blocked and passing cases. The local 135-test check, package check, and package smoke passed. Android, physical devices, and a published npm version were not tested in this local verification.
|
|
10
|
+
|
|
11
|
+
## 0.9.7 — reopen archived reports and compare repeated web runs
|
|
12
|
+
|
|
13
|
+
The CLI and local UI render archived normalized reports in both English and Korean. A passing run saved by an older release now reads consistently in either language. The original Markdown snapshot stays available on disk.
|
|
14
|
+
|
|
15
|
+
Web target registration and run comparisons recognize a bare origin and the same origin with a single final slash. Re-registering an existing target preserves its original URL spelling. Mobile targets and URL paths retain their existing identity. The packaged skill also shows how to use the full accessible name of a link in a browser case.
|
|
16
|
+
|
|
3
17
|
## 0.9.6 — show diagnosis guidance only for nonpassing runs
|
|
4
18
|
|
|
5
19
|
Passing Markdown reports no longer include the generic **Possible causes** section or its Korean failure wording. Failed, blocked, interrupted, and error reports retain the existing guidance; report JSON and other Markdown sections are unchanged. A focused regression checks passing and failed reports in English and Korean. Re-rendering the saved healthy and assertion-failure reports confirmed that only the healthy report loses the footer; the failed report remains byte-for-byte identical.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ihyeon/flow-qa",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Hyeonse Im",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@e2e-dev/mobile": "0.12.5",
|
|
67
67
|
"@e2e-dev/web": "0.11.1",
|
|
68
68
|
"@hyeonse/design-system": "https://codeload.github.com/hyeonse-swing/hyeonse-design-system/tar.gz/38978c6a86f422fc0e63e919f600bc2dd3451e5c",
|
|
69
|
-
"agent-device": "0.21.
|
|
69
|
+
"agent-device": "0.21.35",
|
|
70
70
|
"ai": "7.0.107",
|
|
71
71
|
"e2e": "0.22.0",
|
|
72
72
|
"playwright": "1.63.0",
|
|
@@ -16,6 +16,8 @@ Give the generated `planning/my-flow.prompt.md` to that AI, save its JSON reply
|
|
|
16
16
|
flow-qa validate cases/my-flow.json --workspace my-qa
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
For a named role locator, copy the control's full accessible name from the target browser. For example, a link announced as `← All notes` needs that arrow in its name. If a locator finds no node, check the browser’s accessibility tree before treating it as an application failure.
|
|
20
|
+
|
|
19
21
|
Validation confirms the schema, not that product expectations are correct. Cases with `questions` are blocked. `preconditions` describe setup but do not create accounts, inventory, login state, or other data. A changed source flow invalidates a suite with recorded source provenance; redesign cases rather than bypassing the check. Planning can also use a configured planner model, which sends the flow to the configured endpoint.
|
|
20
22
|
|
|
21
23
|
## Choose and execute a target
|
|
@@ -32,6 +34,10 @@ Web execution needs the package's Chromium (`flow-qa browser install`). The run
|
|
|
32
34
|
|
|
33
35
|
To run only named cases, repeat `--case TC-001 --case TC-003` on `run`. Omitted cases were not evaluated. Each case must establish its own starting state; selecting a case does not run earlier cases as prerequisites. The run writes `qa-report.json` and `qa-report.md` under a new `.flowqa/runs/<run-id>/`. Use `flow-qa report <run-directory> --workspace my-qa` to read a saved report. Compare only with attention to suite, target, selection, and external data state.
|
|
34
36
|
|
|
37
|
+
When reopening an older run, the CLI and local UI render a supported normalized report using the requested language. The original on-disk Markdown file is the snapshot generated at execution time. The CLI can still display that snapshot if normalized JSON is missing or unreadable.
|
|
38
|
+
|
|
39
|
+
Flow QA treats an HTTP(S) origin with or without its final slash as the same root when comparing reports. Paths such as `/preview` and `/preview/` stay distinct. When re-registering an existing target, use the same target name so its stored URL spelling and downstream fingerprint stay stable. Previously linked fingerprint-only results in Error-to-Test retain their original scope.
|
|
40
|
+
|
|
35
41
|
## External browser agent path (web only)
|
|
36
42
|
|
|
37
43
|
For a reviewed web suite and an external agent with its own browser tools:
|