← 返回列表
全部 Skill›DevOps›pr-test

pr-test

作者 @Significant-Gravitas · 语言 en
E2E manual testing of PRs/branches using docker compose, agent-browser, and API calls. TRIGGER when user asks to manually test a PR, test a feature end-to-end, or run integration tests against a running system.
DevOpsGit 工作流需海外环境执行命令访问网络敏感路径待翻译
最近源活动
2026-11-21 23:30
检测 SKILL.md 语言
en
星标 ★
188,169
分支 Fork
45,832
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Manual E2E Test

Test a PR/branch end-to-end by building the full platform, interacting via browser and API, capturing screenshots, and reporting results.

Changelog 2.2.0 — auth flow updated for Better Auth (Supabase signup is

gone), env-setup gaps closed, a proven Playwright fallback for agent-browser,

a billing-test trap that produces false passes, safer process cleanup, and a

mock-provider pattern for deterministic $0 testing. Learned on

#14206 — see the

evidence comment.

2.2.1 — corrects two claims from 2.2.0 that didn't survive live-stack

verification (JWKS does not rotate on a frontend restart; the local

Postgres port is 5432, not 54322) and hardens the auth setup (explicit

password-length/allowlist/rate-limit failure modes, fail-fast on an empty

token, password kept out of process args).

2.3.0 — screenshots are posted as GitHub comment attachments

(gh pr comment --attach, needs gh >= 2.99.0) instead of being pushed to a

test-screenshots/* branch, which accumulated one branch per tested PR and

made every old report's images depend on that branch surviving.

Critical Requirements

These are NON-NEGOTIABLE. Every test run MUST satisfy ALL the following:

1. Screenshots at Every Step

  • Take a screenshot at EVERY significant test step — not just at the end
  • Every test scenario MUST have at least one BEFORE and one AFTER screenshot
  • Name screenshots sequentially: {NN}-{action}-{state}.png (e.g., 01-credits-before.png, 02-credits-after.png)
  • If a screenshot is missing for a scenario, the test is INCOMPLETE — go back and take it

2. Screenshots MUST Be Posted to PR

  • Attach ALL screenshots to the PR comment with gh pr comment --attach (see Step 7). Never push image files to a repo branch — attachments live in GitHub's own asset store and leave nothing behind in the repo
  • Post a PR comment with ALL screenshots embedded inline, each with its explanation
  • This is NOT optional — every test run MUST end with a PR comment containing screenshots
  • If the upload fails, retry. If it still fails, list failed files and require manual drag-and-drop/paste attachment in the PR comment, and mark the run INCOMPLETE

3. State Verification with Before/After Evidence

  • For EVERY state-changing operation (API call, user action), capture the state BEFORE and AFTER
  • Log the actual API response values (e.g., credits_before=100, credits_after=95)
  • Screenshot MUST show the relevant UI state change
  • Compare expected vs actual values explicitly — do not just eyeball it

4. Negative Test Cases Are Mandatory

  • Test at least ONE negative case per feature (e.g., insufficient credits, invalid input, unauthorized access)
  • Verify error messages are user-friendly and accurate
  • Verify the system state did NOT change after a rejected operation

5. Test Report Must Include Full Evidence

Each test scenario in the report MUST have:

  • Steps: What was done (exact commands or UI actions)
  • Expected: What should happen
  • Actual: What actually happened
  • API Evidence: Before/after API response values for state-changing operations
  • Screenshot Evidence: Before/after screenshots with explanations

State Manipulation for Realistic Testing

Billing-test trap — this one produces a false pass, not a visible failure.

LLM block cost filters key on the *platform-owned* credential id. A run made

with the test user's own API key bills nothing by design, so a credits

before/after assertion silently passes on zero deltas either way. Any test

that verifies credit reconciliation MUST use the system credential, not a

user-supplied key. Related: Ollama block entries are configured with an

explicit $0 run-based cost (BlockCostType.RUN, cost_amount=0 in

block_cost_config.py), not a token-metered one — so pre/post-flight cost

deltas are always 0 for them regardless of credential. Never use an Ollama

model to test credit reconciliation; pick any hosted model billed through the

system credential instead.

When testing features that depend on specific states (rate limits, credits, quotas):

  1. Use Redis CLI to set counters directly:

```bash

# Find the Redis container

REDIS_CONTAINER=$(docker ps --format '{{.Names}}' | grep redis | head -1)

# Set a key with expiry

docker exec $REDIS_CONTAINER redis-cli SET key value EX ttl

# Example: Set rate limit counter to near-limit

docker exec $REDIS_CONTAINER redis-cli SET "rate_limit:user:$PR_TEST_USER_EMAIL" 99 EX 3600

# Example: Check current value

docker exec $REDIS_CONTAINER redis-cli GET "rate_limit:user:$PR_TEST_USER_EMAIL"

```

  1. Use API calls to check before/after state:

```bash

# BEFORE: Record current state

BEFORE=$(curl -s -H "Authorization: Bearer $TOKEN" http://localhost:8006/api/credits | jq '.credits')

echo "Credits BEFORE: $BEFORE"

# Perform the action...

# AFTER: Record new state and compare

AFTER=$(curl -s -H "Authorization: Bearer $TOKEN" http://localhost:8006/api/credits | jq '.credits')

echo "Credits AFTER: $AFTER"

echo "Delta: $(( BEFORE - AFTER ))"

```

  1. Take screenshots BEFORE and AFTER state changes — the UI must reflect the backend state change
  1. Never rely on mocked/injected browser state — always use real backend state. Do NOT use agent-browser eval to fake UI state. The backend must be the source of truth.
评论
SSignificant-Gravitas
Significant-Gravitas
Significant-Gravitas/AutoGPT
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@Significant-Gravitas
所属大类DevOps / Git 工作流
国内可用性需海外环境
最近源活动2026-11-21 23:30
风险提示执行命令、访问网络、敏感路径
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。