hsb-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHSB QA Test Runner
HSB QA测试运行器
Use this skill when the user wants to execute a QA test plan against an HSB board and devkit. The skill reads a test document (local file or web link), filters tests to those that can run automatically on the user's specific hardware setup, executes each test with pass/fail evaluation, and produces a comprehensive results report.
This skill assumes the devkit is already set up (SSH, demo container built, host configured, board connected). If setup is not complete, it will offer to invoke first.
/hsb-setupThis workflow runs test applications inside the demo container. Only run it when the user explicitly invokes it.
当用户需要针对HSB开发板和套件执行QA测试计划时,使用此技能。该技能会读取测试文档(本地文件或网络链接),筛选出可在用户特定硬件配置上自动运行的测试,执行每个测试并进行通过/失败评估,生成全面的结果报告。
本技能假设开发板已完成配置(SSH连接、演示容器已构建、主机已配置、开发板已连接)。如果配置未完成,它会先调用进行配置。
/hsb-setup此工作流在演示容器内运行测试应用。仅当用户明确调用时才运行。
Before you start — required gates (do these first, in order)
开始前——必要的前置检查(按顺序完成)
Gate 1 — Read environment variables. Before doing anything else, check these variables and print their resolved values to the user:
SSH_TARGET Remote devkit login (e.g. nvidia@192.168.1.50). Ask the user if not set.
REMOTE_ROOT Remote working directory (e.g. /home/nvidia). Ask the user if not set.
REMOTE_SUDO sudo / sudo -n / "" — default to "sudo" if not set.
REMOTE_SSH_OPTS Additional SSH options (optional).
HSB_PLATFORM Platform hint (optional).SSH_TARGET and REMOTE_ROOT are required. Stop and ask the user for them if either is missing.
Gate 2 — Present the phase plan, ask for the test document, and get confirmation. Before taking any action:
- Show the phase plan:
HSB Test — Phase Plan
Phase 0: Verify devkit SSH, board ping, and demo container availability
Phase 1: Obtain test document, confirm setup, build executable test plan
Phase 2: Execute tests, record pass/fail, analyze failures
Phase 3: Produce test results report (with option to save)
Phase 4: Clean up test artifacts-
If the user has not provided a test document path or URL, STOP and ask for it — do not proceed to Phase 0 or any phase until the user provides it:. If the user has already specified specific tests (e.g., "connectivity checks only"), state which phases will run and which will be skipped, and note that tests will be filtered to the user's platform/board/sensor configuration and classified as automatable vs. manual.
Please provide the path or URL to your test document: -
Ask explicitly:— do not start Phase 0 until the user confirms.
Shall I proceed with Phase 0? [Y/n]
检查项1 — 读取环境变量。在执行任何操作前,检查以下变量并将解析后的值告知用户:
SSH_TARGET 远程开发板登录信息(例如 nvidia@192.168.1.50)。若未设置则询问用户。
REMOTE_ROOT 远程工作目录(例如 /home/nvidia)。若未设置则询问用户。
REMOTE_SUDO sudo / sudo -n / "" — 若未设置则默认值为 "sudo"。
REMOTE_SSH_OPTS 额外的SSH选项(可选)。
HSB_PLATFORM 平台提示(可选)。SSH_TARGET和REMOTE_ROOT为必填项。若其中任意一项缺失,请停止操作并询问用户。
检查项2 — 展示阶段计划,获取测试文档并确认。在执行任何操作前:
- 展示阶段计划:
HSB测试 — 阶段计划
阶段0:验证开发板SSH连接、开发板连通性以及演示容器可用性
阶段1:获取测试文档,确认配置,构建可执行测试计划
阶段2:执行测试,记录通过/失败状态,分析失败原因
阶段3:生成测试结果报告(支持保存选项)
阶段4:清理测试产物-
如果用户未提供测试文档路径或URL,请停止操作并询问——在用户提供前不要进入阶段0或任何阶段:。如果用户已指定特定测试(例如“仅执行连通性检查”),说明将运行哪些阶段、跳过哪些阶段,并注明测试将根据用户的平台/开发板/传感器配置进行筛选,分为可自动化测试和手动测试。
请提供测试文档的路径或URL: -
明确询问:— 在用户确认前不要启动阶段0。
是否进入阶段0?[Y/n]
What this skill must do
本技能必须完成的操作
- Verify that the devkit is reachable over SSH, the HSB board is connected and responsive, and the demo container is available. Read the current FPGA version and board identity. Verify the type of sensor/camera and hsb devkit and release repo used either from already set environment variables or from prompting the user. If the setup is not ready, offer to invoke to prepare the devkit.
/hsb-setup - Obtain a test plan document from the user (file path or URL). Confirm the user's setup details collected in Phase 0 (repo location, HSB version, platform, board type, sensors). Study the test plan and the repository's directory to determine which tests can run automatically. Skip manual tests and tests requiring additional equipment. Present the executable test plan for user approval.
examples/ - Execute each test case in sequence. For each test: run the application, evaluate pass/fail against the criteria in the test plan, log the result. On failure, analyze logs, suggest fixes, and let the user decide how to proceed before running the next test.
- Produce a structured test results report with per-test pass/fail status, issues encountered, and fixes applied. Offer to save the report.
- Clean up all test artifacts (containers, temporary files, session state).
- 验证开发板可通过SSH访问,HSB开发板已连接且响应正常,演示容器可用。读取当前FPGA版本和开发板标识。通过已设置的环境变量或询问用户,确认使用的传感器/摄像头类型、HSB开发板和发布仓库。如果配置未就绪,提供调用来准备开发板的选项。
/hsb-setup - 从用户处获取测试计划文档(文件路径或URL)。确认阶段0中收集的用户配置详情(仓库位置、HSB版本、平台、开发板类型、传感器)。研究测试计划和仓库的目录,确定可自动运行的测试。跳过手动测试和需要额外设备的测试。将可执行测试计划提交给用户审批。
examples/ - 依次执行每个测试用例。对于每个测试:运行应用程序,根据测试计划中的标准评估通过/失败状态,记录结果。若测试失败,分析日志,建议修复方案,并让用户决定继续执行下一个测试前的操作。
- 生成结构化测试结果报告,包含每个测试的通过/失败状态、遇到的问题和已应用的修复方案。提供保存报告的选项。
- 清理所有测试产物(容器、临时文件、会话状态)。
Linux/Windows-friendly wrapper variables
适用于Linux/Windows的包装变量
Reuse the same environment variables from the other HSB skills:
- for the remote login target (e.g.
SSH_TARGET)nvidia@agx-thor-host - for the remote working directory
REMOTE_ROOT - for privileged commands
REMOTE_SUDO - for additional SSH options
REMOTE_SSH_OPTS - as an optional platform hint
HSB_PLATFORM
If these are set, notify the user of these settings and use them without re-asking.
Before Phase 0, print the resolved remote execution settings.
复用其他HSB技能的相同环境变量:
- 用于远程登录目标(例如
SSH_TARGET)nvidia@agx-thor-host - 用于远程工作目录
REMOTE_ROOT - 用于特权命令
REMOTE_SUDO - 用于额外的SSH选项
REMOTE_SSH_OPTS - 作为可选的平台提示
HSB_PLATFORM
如果这些变量已设置,告知用户这些设置并直接使用,无需再次询问。
在阶段0前,打印解析后的远程执行设置。
Mandatory interaction pattern
强制交互模式
First run in a session (no prior verification)
会话首次运行(无前置验证)
When no valid session state exists, show the full phase plan:
- Phase 0: Verify board connectivity, demo container readiness, and user setup (release repo, platform, sensor/camera)
- Phase 1: Obtain test plan, confirm setup, build executable test list
- Phase 2: Execute test plan with per-test pass/fail evaluation
- Phase 3: Generate test results report (with option to save)
- Phase 4: Cleanup
Then execute one phase at a time.
当不存在有效会话状态时,展示完整阶段计划:
- 阶段0:验证开发板连通性、演示容器就绪状态以及用户配置(发布仓库、平台、传感器/摄像头)
- 阶段1:获取测试计划,确认配置,构建可执行测试列表
- 阶段2:执行测试计划并进行逐测试项的通过/失败评估
- 阶段3:生成测试结果报告(支持保存选项)
- 阶段4:清理
然后逐阶段执行。
Subsequent runs in the same session (fast path)
同一会话后续运行(快速路径)
When the session state file () exists and contains , the skill skips Phase 0 and Phase 1 setup confirmation because connectivity, hardware, release repo, platform, and sensor/camera were already verified. Instead, inform the user and jump directly to test plan intake:
/tmp/.claude_hsb_test_session/state.sh_SESSION_VERIFIED=trueSession already verified — skipping connectivity checks.
SSH target: $SSH_TARGET
Release repo: /home/work/holoscan-sensor-bridge (HSB vX.X.X)
Platform: AGX Thor
Board: HSB Lattice | FPGA: XXXX
Sensors: Dual IMX274
Proceeding directly to test plan intake.Then execute:
- Phase 1 (test plan intake and test list building — setup confirmation is skipped)
- Phase 2: Execute test plan
- Phase 3: Test results report
- Phase 4: Cleanup
当会话状态文件()存在且包含时,技能会跳过阶段0和阶段1的配置确认,因为连通性、硬件、发布仓库、平台和传感器/摄像头已完成验证。此时告知用户并直接进入测试计划获取环节:
/tmp/.claude_hsb_test_session/state.sh_SESSION_VERIFIED=true会话已验证 — 跳过连通性检查。
SSH目标:$SSH_TARGET
发布仓库:/home/work/holoscan-sensor-bridge (HSB vX.X.X)
平台:AGX Thor
开发板:HSB Lattice | FPGA: XXXX
传感器:双IMX274
直接进入测试计划获取环节。然后执行:
- 阶段1(测试计划获取和测试列表构建 — 跳过配置确认)
- 阶段2:执行测试计划
- 阶段3:生成测试结果报告
- 阶段4:清理
When to re-run Phase 0 from the beginning
何时重新从头运行阶段0
Phase 0 must be re-run (ignoring the fast path) when:
- New session: No session state file exists on the remote host, or a new Claude Code session is started.
- Execution failure suggesting connectivity loss: If Phase 2 fails with symptoms indicating the board or devkit is unreachable (ping failure, SSH timeout, container launch failure, errors), clear
No such devicefrom the session state and re-run Phase 0 before retrying._SESSION_VERIFIED - User explicitly requests it: If the user says "re-verify", "start over", "run from the beginning", or invokes , run Phase 0 from scratch.
/hsb-test --full
See ## Phase gate below for the full confirmation protocol.
If something fails, do not just dump raw logs. Summarize:
- the exact command that failed
- the likely root cause
- what safe action you recommend
- whether the issue is blocking
在以下情况必须重新运行阶段0(忽略快速路径):
- 新会话:远程主机上不存在会话状态文件,或启动了新的Claude Code会话。
- 执行失败提示连通性丢失:如果阶段2失败,且症状表明开发板或套件无法访问(ping失败、SSH超时、容器启动失败、错误),清除会话状态中的
No such device并在重试前重新运行阶段0。_SESSION_VERIFIED - 用户明确要求:如果用户说“重新验证”、“从头开始”、“重新运行”或调用,从头运行阶段0。
/hsb-test --full
有关完整确认协议,请参见下方的## 阶段检查点。
如果出现失败,不要直接输出原始日志。请总结:
- 失败的具体命令
- 可能的根本原因
- 推荐的安全操作
- 问题是否具有阻塞性
Phase details
阶段详情
See references/phase-details.md for full step-by-step phase instructions.
完整的分步阶段说明请参见references/phase-details.md。
Execution rules
执行规则
SSH heredoc pattern
SSH heredoc模式
Use the same persistent SSH session model as the other HSB skills. Each phase runs as a single SSH heredoc block:
bash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET bash -s <<'REMOTE'
set -e使用与其他HSB技能相同的持久SSH会话模型。每个阶段作为单个SSH heredoc块运行:
bash
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET bash -s <<'REMOTE'
set -erestore state from previous phase
恢复上一阶段的状态
source /tmp/.claude_hsb_test_session/state.sh 2>/dev/null || true
cd "${_CLAUDE_CWD:-REMOTE_ROOT}"
source /tmp/.claude_hsb_test_session/state.sh 2>/dev/null || true
cd "${_CLAUDE_CWD:-REMOTE_ROOT}"
phase commands
阶段命令
echo "=== Phase N: description ==="
command1
command2
echo "=== 阶段N: 描述 ==="
command1
command2
save state for next phase (preserves _SESSION_VERIFIED if already set)
保存状态用于下一阶段(如果已设置则保留_SESSION_VERIFIED)
_PREV_VERIFIED="${_SESSION_VERIFIED:-}"
mkdir -p /tmp/.claude_hsb_test_session
{
echo "export _CLAUDE_CWD="$(pwd)""
echo "export PATH="$PATH""
echo "export REPO_DIR="$REPO_DIR""
echo "export VERSION="$VERSION""
echo "export HSB_PLATFORM="$HSB_PLATFORM""
echo "export BOARD_TYPE="$BOARD_TYPE""
echo "export SENSORS="$SENSORS""
echo "export FPGA_VERSION="$FPGA_VERSION""
echo "export TEST_PLAN_SOURCE="$TEST_PLAN_SOURCE""
[ "$_PREV_VERIFIED" = "true" ] && echo "export _SESSION_VERIFIED=true"
} > /tmp/.claude_hsb_test_session/state.sh
REMOTE
Replace `__REMOTE_ROOT__` with the literal value of `$REMOTE_ROOT` when composing the heredoc._PREV_VERIFIED="${_SESSION_VERIFIED:-}"
mkdir -p /tmp/.claude_hsb_test_session
{
echo "export _CLAUDE_CWD="$(pwd)""
echo "export PATH="$PATH""
echo "export REPO_DIR="$REPO_DIR""
echo "export VERSION="$VERSION""
echo "export HSB_PLATFORM="$HSB_PLATFORM""
echo "export BOARD_TYPE="$BOARD_TYPE""
echo "export SENSORS="$SENSORS""
echo "export FPGA_VERSION="$FPGA_VERSION""
echo "export TEST_PLAN_SOURCE="$TEST_PLAN_SOURCE""
[ "$_PREV_VERIFIED" = "true" ] && echo "export _SESSION_VERIFIED=true"
} > /tmp/.claude_hsb_test_session/state.sh
REMOTE
编写heredoc时,将`__REMOTE_ROOT__`替换为`$REMOTE_ROOT`的字面量值。Container usage for tests
测试容器使用
Test commands run inside the demo container. Use the detached pattern with a named container and a watchdog for timeout enforcement.
Default timeout per test: 120 seconds (2 minutes). Overridden by:
- on the skill invocation (applies to all tests)
--timeout N - Per-test timeout specified in the test plan
测试命令在演示容器内运行。使用带命名容器和看门狗的分离模式来执行超时控制。
每个测试的默认超时:120秒(2分钟)。可通过以下方式覆盖:
- 技能调用时使用(适用于所有测试)
--timeout N - 测试计划中指定的单测试超时
Cleanup after each test container
每个测试容器的清理
After every test run, stop and remove the container. See references/phase-details.md for the cleanup pattern.
每次测试运行后,停止并移除容器。清理模式请参见references/phase-details.md。
Session teardown
会话销毁
Handled by Phase 4. If the workflow is aborted before Phase 4:
bash
docker ps --filter "name=hsb_test_" --format '{{.Names}}' | xargs -r docker stop -t 2 2>/dev/null || true
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET "rm -rf /tmp/.claude_hsb_test_session"由阶段4处理。如果工作流在阶段4前中止:
bash
docker ps --filter "name=hsb_test_" --format '{{.Names}}' | xargs -r docker stop -t 2 2>/dev/null || true
ssh -o BatchMode=yes $REMOTE_SSH_OPTS $SSH_TARGET "rm -rf /tmp/.claude_hsb_test_session"Phase gate — user confirmation between phases
阶段检查点——阶段间用户确认
After completing each phase (Phases 0–3), always prompt the user for confirmation before starting the next phase.
Exception: When (auto-approve mode) is active, phase gates are skipped. See "Auto-approve mode ()" section.
--y--yException: Phase 4 (cleanup) runs automatically after Phase 3 without a gate.
Proceed to Phase <N+1> (<phase description>)? [Y/n]完成每个阶段(阶段0–3)后,必须在进入下一阶段前提示用户确认。
例外情况:当(自动批准模式)激活时,跳过阶段检查点。请参见“自动批准模式 ()”部分。
--y--y例外情况:阶段4(清理)在阶段3完成后自动运行,无需检查点。
是否进入阶段<N+1>(<阶段描述>)?[Y/n]User response handling
用户响应处理
All prompts in this skill require explicit typed responses. Never treat a blank or Enter-only input as a selection — re-prompt the user instead.
- "y", "yes", "Y", "ok", "go", "continue", "next" → proceed to the next phase.
- "n", "no", "stop", "abort" → stop execution. Print:
Then run session teardown.
QA testing paused after Phase N. You can resume by re-invoking the skill. - Any other text → treat as a question or instruction about the current phase. Answer it, then re-prompt.
- "retry" → re-execute the current phase, show summary again, then re-prompt.
本技能中的所有提示都需要用户输入明确的响应。不要将空白或仅按Enter视为选择——请重新提示用户。
- "y"、"yes"、"Y"、"ok"、"go"、"continue"、"next" → 进入下一阶段。
- "n"、"no"、"stop"、"abort" → 停止执行。输出:
然后执行会话销毁。
QA测试在阶段N后暂停。 您可以通过重新调用技能恢复测试。 - 其他任何文本 → 视为用户对当前阶段的问题或指令。回答后重新提示。
- "retry" → 重新执行当前阶段,再次展示总结,然后重新提示。
Exceptions
例外情况
- Phase 4 (cleanup) is the final phase — it runs automatically after Phase 3 completes or after the user declines to run another test plan.
- If a phase FAILs and cannot be recovered, stop and report clearly, then run cleanup.
- 阶段4(清理)是最终阶段——在阶段3完成后或用户拒绝运行其他测试计划后自动运行。
- 如果阶段失败且无法恢复,停止并清晰报告,然后执行清理。
Built-in help (--help
)
--help内置帮助 (--help
)
--helpIf contains or , print the following and stop:
$ARGUMENTS--help-hHSB QA Test Runner Skill
USAGE
/hsb-test [OPTIONS]
OPTIONS
--help, -h Show this help message and exit
--verbose Show full raw command output for every phase
--y Auto-approve all phase gates and skip interactive
debugging on test failures. Not recommended — a
confirmation warning is shown before proceeding.
All output is saved to a timestamped log file.
--timeout N Set per-test runtime in seconds (default: 120s).
Tests stop after N seconds or when pass/fail can
be determined, whichever comes first.
--full Force full verification from Phase 0, even if the
session was already verified
ENVIRONMENT VARIABLES (set before invoking the skill)
SSH_TARGET Remote login target (e.g. ubuntu@10.0.0.1)
REMOTE_ROOT Remote working directory
REMOTE_SUDO Privilege escalation: 'sudo', 'sudo -n', or ''
REMOTE_SSH_OPTS Additional SSH options
HSB_PLATFORM Platform hint
WORKFLOW PHASES
Phase 0 Verify board connectivity, demo container readiness,
and user setup (release repo, platform, sensor/camera)
(skipped on repeat runs in the same session)
Phase 1 Obtain test plan, confirm setup, build executable test list
(setup confirmation skipped on repeat runs)
Phase 2 Execute test plan with per-test pass/fail evaluation
Phase 3 Generate and optionally save test results report
Phase 4 Cleanup (automatic)
EXAMPLES
/hsb-test
/hsb-test --verbose
/hsb-test --timeout 60
/hsb-test --y
/hsb-test --y --timeout 60
/hsb-test --full
/hsb-test --help如果包含或,输出以下内容并停止:
$ARGUMENTS--help-hHSB QA测试运行器技能
用法
/hsb-test [选项]
选项
--help, -h 显示此帮助信息并退出
--verbose 展示每个阶段的完整原始命令输出
--y 自动批准所有阶段检查点,跳过测试失败时的交互式调试。不推荐使用——执行前会显示确认警告。所有输出将保存到带时间戳的日志文件。
--timeout N 设置每个测试的运行时间(秒)(默认:120秒)。测试在N秒后停止,或在可确定通过/失败状态时停止,以先发生者为准。
--full 强制从阶段0开始完整验证,即使会话已验证
环境变量(调用技能前设置)
SSH_TARGET 远程登录目标(例如 ubuntu@10.0.0.1)
REMOTE_ROOT 远程工作目录
REMOTE_SUDO 权限提升:'sudo'、'sudo -n' 或 ''
REMOTE_SSH_OPTS 额外的SSH选项
HSB_PLATFORM 平台提示
工作流阶段
阶段0 验证开发板连通性、演示容器就绪状态以及用户配置(发布仓库、平台、传感器/摄像头)(同一会话重复运行时跳过)
阶段1 获取测试计划,确认配置,构建可执行测试列表(重复运行时跳过配置确认)
阶段2 执行测试计划并进行逐测试项的通过/失败评估
阶段3 生成并可选保存测试结果报告
阶段4 清理(自动执行)
示例
/hsb-test
/hsb-test --verbose
/hsb-test --timeout 60
/hsb-test --y
/hsb-test --y --timeout 60
/hsb-test --full
/hsb-test --helpInvocation examples
调用示例
/hsb-test/hsb-test --verbose/hsb-test --timeout 60/hsb-test --timeout 60 --verbose/hsb-test --y/hsb-test --y --timeout 60/hsb-test --full/hsb-test --full --verbose/hsb-test --help
/hsb-test/hsb-test --verbose/hsb-test --timeout 60/hsb-test --timeout 60 --verbose/hsb-test --y/hsb-test --y --timeout 60/hsb-test --full/hsb-test --full --verbose/hsb-test --help
Verbosity mode (--verbose
)
--verbose详细模式 (--verbose
)
--verboseThe skill supports a flag:
--verbose本技能支持标志:
--verboseDetecting the flag
检测标志
Check whether (the text after the slash command) contains any of: / , , , , or (case-insensitive). Strip all flags (and their values) from arguments before further parsing.
$ARGUMENTS--help-h--verbose--y--timeout N--fullWhen is present, ignore any cached session state and run Phase 0 from scratch.
--full检查(斜杠命令后的文本)是否包含以下任意项:/、、、或(不区分大小写)。在进一步解析前,移除所有标志(及其值)。
$ARGUMENTS--help-h--verbose--y--timeout N--full当存在时,忽略任何缓存的会话状态并从头运行阶段0。
--fullVerbose mode (when set)
详细模式(已设置时)
- Show complete raw output of every SSH command
- Show full test application output inline (all stdout/stderr)
- Show detailed phase status blocks
- 展示每个SSH命令的完整原始输出
- 内联展示测试应用的完整输出(所有stdout/stderr)
- 展示详细的阶段状态块
Concise mode (default, no --verbose
)
--verbose简洁模式(默认,未设置--verbose
)
--verbose- Show bullet-point summaries after each phase
- Suppress raw command output
- Show key test output lines (startup, errors, pass/fail indicators) but not every line
- Show issues with the 4-line format (Symptom, Cause, Resolution, Blocking)
- 每个阶段后展示项目符号总结
- 隐藏原始命令输出
- 展示关键测试输出行(启动、错误、通过/失败指示器)但不展示所有行
- 使用4行格式展示问题(症状、原因、解决方案、阻塞性)
Auto-approve mode (--y
)
--y自动批准模式 (--y
)
--yThe skill supports a flag that skips all phase gates and runs the entire workflow from start to finish without waiting for user confirmation between phases. This is not recommended for QA testing.
--y本技能支持标志,可跳过所有阶段检查点,从头至尾运行整个工作流,无需在阶段间等待用户确认。此模式不推荐用于QA测试。
--yConfirmation warning
确认警告
When is detected, display a warning and ask the user to confirm:
--y⚠ WARNING: Auto-approve mode (--y) is enabled.
This is NOT RECOMMENDED for QA testing. All phase gates will be skipped
and the entire test plan will execute without pausing for your
confirmation between phases or tests.
You will not be able to review intermediate results, intervene on
failures, or abort between tests. All output will be saved to a
timestamped log file.
NOTE: In auto-approve mode, you must still provide the test plan in
Phase 1. Failed tests are logged but not interactively debugged —
testing continues to the next test automatically.
Type 'yes' to confirm auto-approve mode, or anything else to cancel:- If the user responds with "yes" (exact match, case-insensitive) → enable auto-approve mode.
- Any other response → cancel auto-approve mode and run interactively.
检测到时,显示警告并要求用户确认:
--y⚠ 警告:已启用自动批准模式(--y)。
此模式不推荐用于QA测试。所有阶段检查点将被跳过,整个测试计划将执行,阶段或测试间不会暂停等待您的确认。
您将无法查看中间结果、在失败时介入或在测试间中止。所有输出将保存到带时间戳的日志文件。
注意:在自动批准模式下,您仍需在阶段1提供测试计划。失败的测试将被记录但不会进行交互式调试——测试将自动继续执行下一个测试用例。
输入'yes'确认启用自动批准模式,输入其他内容取消:- 如果用户回复**"yes"**(完全匹配,不区分大小写)→ 启用自动批准模式。
- 任何其他回复 → 取消自动批准模式并以交互模式运行。
Behavior when --y
is active
--y--y
激活时的行为
--y- Phase gates are skipped between phases.
- Test plan approval is skipped — the generated test plan executes automatically.
- Failed tests do not pause — failures are logged and testing continues to the next test case automatically.
- Inter-test prompts are skipped — tests run back-to-back without confirmation.
- Default timeout applies — 120 seconds per test, or if specified.
--timeout N - Log file: Created at start as in
hsb-test-log-YYYY-MM-DD-HHMMSS.mdor current directory.$REMOTE_ROOT/ - Phase summaries are still shown in real time.
- Blocking connectivity failures still stop the workflow and trigger re-verification.
- 跳过阶段检查点。
- 跳过测试计划审批——生成的测试计划自动执行。
- 测试失败不暂停——失败将被记录,测试自动继续执行下一个测试用例。
- 跳过测试间提示——测试连续运行,无需确认。
- 应用默认超时——每个测试120秒,或如果指定了则使用该值。
--timeout N - 日志文件:启动时在或当前目录创建
$REMOTE_ROOT/。hsb-test-log-YYYY-MM-DD-HHMMSS.md - 仍实时展示阶段总结。
- 阻塞性连通性故障仍会停止工作流并触发重新验证。
Combining with other flags
与其他标志组合
- : Auto-approve with full raw output.
--y --verbose - : Auto-approve with a custom per-test timeout.
--y --timeout N - : Auto-approve with forced full verification from Phase 0.
--y --full
- :自动批准模式+完整原始输出。
--y --verbose - :自动批准模式+自定义单测试超时。
--y --timeout N - :自动批准模式+强制从阶段0开始完整验证。
--y --full
Timeout handling (--timeout
)
--timeout超时处理 (--timeout
)
--timeoutThe skill supports a flag where N is the number of seconds to run each test.
--timeout N本技能支持标志,其中N为每个测试的运行秒数。
--timeout NBehavior
行为
- When set: Each test runs for at most N seconds, then is stopped. Pass/fail is evaluated from the output collected during that window.
- When not set: Each test runs for at most 120 seconds (2 minutes) by default, or until pass/fail can be determined from the output, whichever comes first.
- Per-test override: If the test plan specifies a timeout for a specific test, that value takes precedence over both the default and the flag.
--timeout
- 已设置时:每个测试最多运行N秒,然后停止。根据该时间段内收集的输出评估通过/失败状态。
- 未设置时:每个测试最多运行120秒(2分钟),或在可从输出确定通过/失败状态时停止,以先发生者为准。
- 单测试覆盖:如果测试计划为特定测试指定了超时,该值优先于默认值和标志。
--timeout
Validation
验证
- N must be a positive integer
- Minimum: 5 seconds
- Maximum: 3600 seconds (1 hour)
- If invalid, show an error and ask the user to provide a valid timeout
- N必须为正整数
- 最小值:5秒
- 最大值:3600秒(1小时)
- 如果无效,显示错误并要求用户提供有效的超时值