ln-522-manual-tester by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-522-manual-tester路径说明: 文件路径(
shared/、references/、../ln-*)是相对于技能仓库根目录的。如果在当前工作目录未找到,请定位此 SKILL.md 文件所在的目录并向上返回一级以找到仓库根目录。如果缺少shared/目录,请通过 WebFetch 从https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}获取文件。
| 输入 | 必需 | 来源 | 描述 |
|---|---|---|---|
storyId | 是 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| args, git branch, kanban, user |
| 要处理的用户故事 |
解析方式: 用户故事解析链。状态过滤器: 待评审
手动验证运行代码上的用户故事验收标准,并为质量门报告结构化结果。
tests/manual/ 文件夹中创建可执行的测试脚本。关键: 当任何标准未满足时,测试必须立即返回 1(失败)。
切勿使用: 验证失败时使用 print_status "WARN" + return 0、没有明确标志的优雅降级、隐藏错误的静默回退。
例外情况(允许 WARN): 不影响正确性的信息性警告、可选功能(在注释中明确说明理由)、基础设施问题(例如,开发环境中缺少 Nginx)。
关键: 测试必须将实际结果与预期的参考文件进行比较,而不是应用启发式方法或算法检查。
目录结构:
tests/manual/NN-feature/
├── samples/ # 输入文件
├── expected/ # 预期输出文件(必需!)
│ └── {base_name}_{source_lang}-{target_lang}.{ext}
└── test-*.sh
启发式方法仅适用于: 动态/非确定性数据(时间戳、UUID、令牌 - 在比较前进行规范化;具有无序键的 JSON - 使用 jq --sort-keys)。
测试结果保存到 tests/manual/results/(持久化,在 .gitignore 中)。命名方式:result_{ac_name}.{ext} 或 response_{ac_name}.json。测试完成后可检查以进行调试。
创建预期文件的方法:
results/ 文件夹中检查输出expected/ 文件夹并正确命名重要: 切勿盲目地将结果复制到 expected 文件夹。务必先验证正确性。
必读: 加载 shared/references/input_resolution_pattern.md
docs/project/infrastructure.md — 获取端口分配、服务端点、基础 URL。阅读 docs/project/runbook.md — 获取 Docker 命令、测试先决条件、环境设置tests/manual/ 文件夹tests/manual/config.sh — 共享配置(BASE_URL、辅助函数、颜色)tests/manual/README.md — 文件夹文档(参见下面的 README.md 模板)tests/manual/test-all.sh — 运行所有测试套件的主脚本(参见下面的 test-all.sh 模板)tests/manual/results/ — 用于测试输出的文件夹(添加到 .gitignore)tests/manual/results/ 添加到项目 .gitignore 中config.sh 以重用设置(BASE_URL、令牌)references/puppeteer_patterns.mdtests/manual/{NN}-{story-slug}/samples/ — 输入文件(如果需要)tests/manual/{NN}-{story-slug}/expected/ — 预期输出文件(确定性测试必需)tests/manual/{NN}-{story-slug}/test-{story-slug}.sh
tests/manual/results/chmod +x)tests/manual/README.md:
tests/manual/test-all.sh:
必读: 加载 references/test_result_format_v1.md
tests/manual/{NN}-{story-slug}/test-{story-slug}.shcd tests/manual && ./{NN}-{story-slug}/test-{story-slug}.shtests/manual/,而非临时文件。tests/manual/ 结构存在(如果缺失则创建 config.sh、README.md、test-all.sh、results/)。tests/manual/results/ 已添加到项目 .gitignore。tests/manual/{NN}-{story-slug}/test-{story-slug}.sh。expected/ 文件夹,每个确定性验收标准至少包含 1 个预期文件。tests/manual/results/ 以进行调试。# 手动测试脚本
> **范围:** 用于手动 API 测试的 Bash 脚本。通过基于 CLI 的工作流程补充自动化测试。
## 快速开始
```bash
cd tests/manual
./00-setup/create-account.sh # (如果需要身份验证)
./test-all.sh # 运行所有测试套件
docker compose ps)apt-get install jq 或 brew install jq)tests/manual/
├── config.sh # 共享配置(BASE_URL、辅助函数、颜色)
├── README.md # 此文件
├── test-all.sh # 运行所有测试套件
├── 00-setup/ # 账户和令牌设置(如果需要身份验证)
│ ├── create-account.sh
│ └── get-token.sh
└── {NN}-{topic}/ # 按用户故事划分的测试套件
└── test-{slug}.sh
| 套件 | 用户故事 | 覆盖的验收标准 | 运行命令 |
|---|---|---|---|
| — | — | — | — |
{NN}-{topic}/test-{slug}.sh 中创建脚本test-all.sh(添加到 SUITES 数组)### test-all.sh(每个项目创建一次)
```bash
#!/bin/bash
# =============================================================================
# 运行所有手动测试套件
# =============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/config.sh"
echo "=========================================="
echo "运行所有手动测试套件"
echo "=========================================="
check_jq
check_api
# 设置(如果存在)
[ -f "$SCRIPT_DIR/00-setup/create-account.sh" ] && "$SCRIPT_DIR/00-setup/create-account.sh"
[ -f "$SCRIPT_DIR/00-setup/get-token.sh" ] && "$SCRIPT_DIR/00-setup/get-token.sh"
# 测试套件(在此处添加新套件)
SUITES=(
# "01-auth/test-auth-flow.sh"
# "02-translation/test-translation.sh"
)
PASSED=0; FAILED=0
for suite in "${SUITES[@]}"; do
echo ""
echo "=========================================="
echo "正在运行:$suite"
echo "=========================================="
if "$SCRIPT_DIR/$suite"; then
((++PASSED))
print_status "PASS" "$suite"
else
((++FAILED))
print_status "FAIL" "$suite"
fi
done
echo ""
echo "=========================================="
echo "总计:$PASSED 个套件通过,$FAILED 个失败"
echo "=========================================="
[ $FAILED -eq 0 ] && exit 0 || exit 1
#!/bin/bash
# 手动测试脚本的共享配置
export BASE_URL="${BASE_URL:-http://localhost:8080}"
export RED='\033[0;31m'
export GREEN='\033[0;32m'
export YELLOW='\033[1;33m'
export NC='\033[0m'
print_status() {
local status=$1; local message=$2
case $status in
"PASS") echo -e "${GREEN}[PASS]${NC} $message" ;;
"FAIL") echo -e "${RED}[FAIL]${NC} $message" ;;
"WARN") echo -e "${YELLOW}[WARN]${NC} $message" ;;
"INFO") echo -e "[INFO] $message" ;;
esac
}
check_jq() {
command -v jq &> /dev/null || { echo "Error: jq required"; exit 1; }
}
check_api() {
local response=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/health" 2>/dev/null)
if [ "$response" != "200" ]; then
echo "Error: API not reachable at $BASE_URL"
exit 1
fi
print_status "INFO" "API reachable at $BASE_URL"
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR
| 模板 | 用例 | 位置 |
|---|---|---|
| template-api-endpoint.sh | API 端点测试(无异步作业) | template-api-endpoint.sh |
| template-document-format.sh | 文档/文件处理(包含异步作业) | template-document-format.sh |
快速开始:
cp references/templates/template-api-endpoint.sh {NN}-feature/test-{feature}.sh # 端点测试
cp references/templates/template-document-format.sh {NN}-feature/test-{format}.sh # 文档测试
tests/manual/(生产环境示例)shared/templates/test_task_template.md(或目标项目中的本地 docs/templates/)shared/references/risk_based_testing_guide.mdreferences/puppeteer_patterns.mdreferences/test_result_format_v1.md版本: 1.0.0 最后更新: 2026-01-15
每周安装次数
150
仓库
GitHub 星标数
253
首次出现
2026年2月11日
安全审计
安装于
cursor140
opencode139
codex138
gemini-cli137
github-copilot137
amp135
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
| Input | Required | Source | Description |
|---|---|---|---|
storyId | Yes | args, git branch, kanban, user | Story to process |
Resolution: Story Resolution Chain. Status filter: To Review
Manually verifies Story AC on running code and reports structured results for the quality gate.
tests/manual/ folder of target project.CRITICAL: Tests MUST return 1 (fail) immediately when any criterion is not met.
Never use: print_status "WARN" + return 0 for validation failures, graceful degradation without explicit flags, silent fallbacks that hide errors.
Exceptions (WARN is OK): Informational warnings that don't affect correctness, optional features (with clear justification in comments), infrastructure issues (e.g., missing Nginx in dev environment).
CRITICAL: Tests MUST compare actual results against expected reference files , not apply heuristics or algorithmic checks.
Directory structure:
tests/manual/NN-feature/
├── samples/ # Input files
├── expected/ # Expected output files (REQUIRED!)
│ └── {base_name}_{source_lang}-{target_lang}.{ext}
└── test-*.sh
Heuristics acceptable ONLY for: dynamic/non-deterministic data (timestamps, UUIDs, tokens - normalize before comparison; JSON with unordered keys - use jq --sort-keys).
Test results saved to tests/manual/results/ (persistent, in .gitignore). Named: result_{ac_name}.{ext} or response_{ac_name}.json. Inspectable after test completion for debugging.
To create expected files:
results/ folderexpected/ folder with proper namingIMPORTANT: Never blindly copy results to expected. Always validate correctness first.
MANDATORY READ: Load shared/references/input_resolution_pattern.md
docs/project/infrastructure.md — get port allocation, service endpoints, base URLs. Readdocs/project/runbook.md — get Docker commands, test prerequisites, environment setuptests/manual/ folder exists in project roottests/manual/config.sh — shared configuration (BASE_URL, helpers, colors)tests/manual/README.md — folder documentation (see README.md template below)tests/manual/test-all.sh — master script to run all test suites (see test-all.sh template below)tests/manual/results/ — folder for test outputs (add to .gitignore)references/puppeteer_patterns.mdtests/manual/{NN}-{story-slug}/samples/ — input files (if needed)tests/manual/{NN}-{story-slug}/expected/ — expected output files (REQUIRED for deterministic tests)tests/manual/{NN}-{story-slug}/test-{story-slug}.sh
tests/manual/results/tests/manual/README.md:
tests/manual/test-all.sh:
MANDATORY READ: Load references/test_result_format_v1.md
tests/manual/{NN}-{story-slug}/test-{story-slug}.shcd tests/manual && ./{NN}-{story-slug}/test-{story-slug}.shtests/manual/, NOT temp files.tests/manual/ structure exists (config.sh, README.md, test-all.sh, results/ created if missing).tests/manual/results/ added to project .gitignore.tests/manual/{NN}-{story-slug}/test-{story-slug}.sh.expected/ folder created with at least 1 expected file per deterministic AC.tests/manual/results/ for debugging.# Manual Testing Scripts
> **SCOPE:** Bash scripts for manual API testing. Complements automated tests with CLI-based workflows.
## Quick Start
```bash
cd tests/manual
./00-setup/create-account.sh # (if auth required)
./test-all.sh # Run ALL test suites
docker compose ps)apt-get install jq or brew install jq)tests/manual/
├── config.sh # Shared configuration (BASE_URL, helpers, colors)
├── README.md # This file
├── test-all.sh # Run all test suites
├── 00-setup/ # Account & token setup (if auth required)
│ ├── create-account.sh
│ └── get-token.sh
└── {NN}-{topic}/ # Test suites by Story
└── test-{slug}.sh
| Suite | Story | AC Covered | Run Command |
|---|---|---|---|
| — | — | — | — |
{NN}-{topic}/test-{slug}.shtest-all.sh (add to SUITES array)### test-all.sh (created once per project)
```bash
#!/bin/bash
# =============================================================================
# Run all manual test suites
# =============================================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/config.sh"
echo "=========================================="
echo "Running ALL Manual Test Suites"
echo "=========================================="
check_jq
check_api
# Setup (if exists)
[ -f "$SCRIPT_DIR/00-setup/create-account.sh" ] && "$SCRIPT_DIR/00-setup/create-account.sh"
[ -f "$SCRIPT_DIR/00-setup/get-token.sh" ] && "$SCRIPT_DIR/00-setup/get-token.sh"
# Test suites (add new suites here)
SUITES=(
# "01-auth/test-auth-flow.sh"
# "02-translation/test-translation.sh"
)
PASSED=0; FAILED=0
for suite in "${SUITES[@]}"; do
echo ""
echo "=========================================="
echo "Running: $suite"
echo "=========================================="
if "$SCRIPT_DIR/$suite"; then
((++PASSED))
print_status "PASS" "$suite"
else
((++FAILED))
print_status "FAIL" "$suite"
fi
done
echo ""
echo "=========================================="
echo "TOTAL: $PASSED suites passed, $FAILED failed"
echo "=========================================="
[ $FAILED -eq 0 ] && exit 0 || exit 1
#!/bin/bash
# Shared configuration for manual testing scripts
export BASE_URL="${BASE_URL:-http://localhost:8080}"
export RED='\033[0;31m'
export GREEN='\033[0;32m'
export YELLOW='\033[1;33m'
export NC='\033[0m'
print_status() {
local status=$1; local message=$2
case $status in
"PASS") echo -e "${GREEN}[PASS]${NC} $message" ;;
"FAIL") echo -e "${RED}[FAIL]${NC} $message" ;;
"WARN") echo -e "${YELLOW}[WARN]${NC} $message" ;;
"INFO") echo -e "[INFO] $message" ;;
esac
}
check_jq() {
command -v jq &> /dev/null || { echo "Error: jq required"; exit 1; }
}
check_api() {
local response=$(curl -s -o /dev/null -w "%{http_code}" "$BASE_URL/health" 2>/dev/null)
if [ "$response" != "200" ]; then
echo "Error: API not reachable at $BASE_URL"
exit 1
fi
print_status "INFO" "API reachable at $BASE_URL"
}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR
| Template | Use Case | Location |
|---|---|---|
| template-api-endpoint.sh | API endpoint tests (NO async jobs) | template-api-endpoint.sh |
| template-document-format.sh | Document/file processing (WITH async jobs) | template-document-format.sh |
Quick start:
cp references/templates/template-api-endpoint.sh {NN}-feature/test-{feature}.sh # Endpoint tests
cp references/templates/template-document-format.sh {NN}-feature/test-{format}.sh # Document tests
tests/manual/ (production example)shared/templates/test_task_template.md (or local docs/templates/ in target project)shared/references/risk_based_testing_guide.mdreferences/puppeteer_patterns.mdreferences/test_result_format_v1.mdVersion: 1.0.0 Last Updated: 2026-01-15
Weekly Installs
150
Repository
GitHub Stars
253
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
cursor140
opencode139
codex138
gemini-cli137
github-copilot137
amp135
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
36,300 周安装
tests/manual/results/ to project .gitignore if not presentconfig.sh to reuse settings (BASE_URL, tokens)chmod +x)