e2e-testing
Skill by QwenLM
Guides developers through end-to-end testing of the Qwen Code CLI. It covers headless runs, tmux-driven interactive tests, MCP server testing and raw API traffic inspection.
Install e2e-testing
Built from the published package, never by AI.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.claude/skills && cp -r /tmp/qwen-code/.qwen/skills/e2e-testing ~/.claude/skills/e2e-testingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/QwenLM/qwen-code /tmp/qwen-code && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/qwen-code/.qwen/skills/e2e-testing ~/.gemini/antigravity-cli/skills/e2e-testingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a guide for running the Qwen Code CLI end to end, from building the bundle to inspecting raw API traffic. It explains when to use the global qwen command versus a local build, how to run headless mode with JSON output, and how to drive the TUI through tmux. It also covers isolating runtime files with QWEN_RUNTIME_DIR and choosing a provider with --auth-type and --model.
It shows how to capture request and response payloads with --openai-logging and summarize token usage with a bundled Python script. For MCP tool testing and controlled scenarios, it points to reference notes and zero-dependency templates for a test MCP server and a mock OpenAI server. It is aimed at developers who need to verify CLI behavior with real model calls or reproduce user-reported bugs.
Written from the project's SKILL.md and checked against it.
What it can do
- Headless modeRuns the CLI non-interactively and returns JSON or NDJSON output for structured checks.
- Interactive tmux testingLaunches the TUI in tmux to send prompts, wait for completion and capture the screen.
- Runtime isolationRedirects qwen runtime output such as chat recordings and history with QWEN_RUNTIME_DIR.
- Raw API traffic inspectionWrites each API call to a JSON file using the --openai-logging flags.
- Token usage statsSummarizes input, cached and output tokens per request with scripts/token-stats.py.
- MCP server testingPoints to reference notes and a zero-dependency test server template for MCP tool tests.
- Mock OpenAI serverProvides a template for driving the CLI through error codes, malformed tool calls and multi-turn loops.
What you need
- Qwen Code CLI installed as the qwen command, or a local build with npm
- Model provider credentials stored in ~/.qwen
- tmux for interactive mode
- Python 3 for the token stats script
Try asking
- Run qwen headless on this prompt and list any tool result errors
- Enable OpenAI logging for this test run and save the API payloads
- Summarize token usage and cache hit rates for the last 20 API requests
Good to know
- tmux send-keys cannot reliably send all key combinations, such as C-? or function keys with modifiers.
- capture-pane shows only the final frame, so flicker or brief blank frames are not detected.
- yolo approval mode bypasses rule evaluation, so it cannot test whether a permission rule matches.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .qwen/skills/e2e-testing/SKILL.md, .qwen/skills/e2e-testing/scripts/mcp-test-server.js, .qwen/skills/e2e-testing/scripts/mock-openai-server.js, .qwen/skills/e2e-testing/scripts/token-stats.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB -
references/mcp-testing.md2 KB -
references/mock-openai-server.md5 KB -
scripts/mcp-test-server.js3 KB -
scripts/mock-openai-server.js8 KB
Show all 6 files
-
scripts/token-stats.py2 KB
Alternatives to e2e-testing
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
e2e-testing: common questions
What output does headless mode produce?
With --output-format json it emits one JSON array of messages at the end of the turn. With stream-json it emits NDJSON, one object per line.
How do I inspect the exact payloads sent to the model?
Use the --openai-logging and --openai-logging-dir flags. Each API call is saved as a JSON file with the request and response.
When should I use tmux mode instead of headless mode?
Use tmux mode for permission prompts, slash commands, keyboard interactions and hang-related issues. Headless mode has no TUI and produces no output when the process stalls.
How do I install e2e-testing?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is e2e-testing free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is e2e-testing safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to e2e-testing?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
