Agent Skillsliaohch3/claude-tap › real-e2e-test

real-e2e-test

GitHub

对 Claude CLI 执行真实端到端测试,验证 trace 输出。支持 pytest 自动化模式(7个用例)和 tmux 交互式 TUI 模式,需安装 claude CLI、Python 依赖及 tmux。

.agents/skills/real-e2e-test/SKILL.md liaohch3/claude-tap

Trigger Scenarios

需要运行真实的端到端测试以验证 Claude CLI 功能时 需要检查 Trace 输出或工具调用行为时

Install

npx skills add liaohch3/claude-tap --skill real-e2e-test -g -y
More Options

Non-standard path

npx skills add https://github.com/liaohch3/claude-tap/tree/main/.agents/skills/real-e2e-test -g -y

Use without installing

npx skills use liaohch3/claude-tap@real-e2e-test

指定 Agent (Claude Code)

npx skills add liaohch3/claude-tap --skill real-e2e-test -a claude-code -g -y

安装 repo 全部 skill

npx skills add liaohch3/claude-tap --all -g -y

预览 repo 内 skill

npx skills add liaohch3/claude-tap --list

SKILL.md

Frontmatter
{
    "name": "real-e2e-test",
    "tags": "testing, e2e, integration, tmux",
    "description": "Run real E2E tests against Claude CLI in pytest and tmux modes"
}

Real E2E Test Skill

Run real end-to-end tests that start claude-tap from local source, connect to the real Claude CLI, and verify trace output.

Prerequisites

  • claude CLI installed and authenticated
  • Python dev dependencies installed: uv sync --extra dev
  • tmux installed for interactive mode (brew install tmux)

Mode 1: Pytest Real E2E (7 test cases)

Run all real E2E tests

uv run pytest tests/e2e/ --run-real-e2e --timeout=300 -v

Run a single test

uv run pytest tests/e2e/test_real_proxy.py::TestRealProxy::test_single_turn --run-real-e2e --timeout=180 -v -s

Run with debug output

uv run pytest tests/e2e/ --run-real-e2e --timeout=300 -v -s --tb=long

Mode 2: tmux Interactive Real E2E

Use this when you need to validate non--p interactive behavior in Claude Code TUI.

scripts/run_real_e2e_tmux.sh

Optional overrides:

PROMPT_ONE="Use the shell tool to run command ls in the current directory, then reply with any 5 filenames only." \
PROMPT_TWO="Thank you." \
SUBMIT_KEY="Enter" \
PERMISSION_MODE="bypassPermissions" \
scripts/run_real_e2e_tmux.sh

Important tmux interaction notes:

  • Submit key is Enter for Claude Code TUI in tmux (confirmed working).
  • PROMPT_ONE should intentionally trigger tool use.
  • For portability, use grep -F instead of rg in shell assertions (rg may be unavailable).

Verification Checklist (for both modes)

  • Latest trace .jsonl contains both prompts (PROMPT_ONE, PROMPT_TWO)
  • At least 2 requests hit /v1/messages
  • At least one response content block has "type": "tool_use"
  • HTML viewer file is generated (trace_*.html)

Notes

  • Real E2E tests are skipped by default; --run-real-e2e is required.
  • Each pytest case starts a fresh proxy server and trace directory.
  • Timeouts are intentionally generous because real API calls are involved.
  • tmux mode includes retry logic for prompt submission and post-run JSONL assertions.

Pytest Test Cases

Test Timeout What It Tests
test_single_turn 180s Basic prompt/response trace capture
test_multi_turn 300s Conversation memory with -c flag
test_tool_use 180s Tool use generates multiple trace records
test_html_viewer_generated 180s HTML viewer generated with embedded trace data
test_api_key_redaction 180s API keys redacted from trace output
test_streaming_sse_capture 180s SSE events captured in streaming mode
test_trace_summary 180s CLI stdout includes trace summary and API call count

Version History

  • 7170ab3 Current 2026-07-05 15:20

Same Skill Collection

.agents/skills/codex-e2e-test/SKILL.md
.agents/skills/demo-video/SKILL.md
.agents/skills/js-in-html-testing/SKILL.md
.agents/skills/legibility-check/SKILL.md
.agents/skills/playwright-screen-recording/SKILL.md
.agents/skills/pr-preflight/SKILL.md
.agents/skills/push-release/SKILL.md
.agents/skills/screenshot-validation/SKILL.md
.agents/skills/translate-i18n/SKILL.md
.agents/skills/e2e-test/SKILL.md

Metadata

Files
0
Version
7170ab3
Hash
9fec704a
Indexed
2026-07-05 15:20

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 19:52
浙ICP备14020137号-1 $Carte des visiteurs$