
End-to-End Testing for Qwen Code
Run and inspect real end-to-end tests of the Qwen Code CLI, including MCP and API traffic
- Repository
- QwenLM/qwen-code
- Stars
- 28,880
- Licence
- Apache-2.0
- Files
- 6 files
What it does
This skill gives an AI coding agent a playbook for testing the Qwen Code command-line tool the way a real user would: running it against a live model, driving its interface in a terminal session, and recording the raw requests it sends to the model. It also includes small helper scripts for building a fake MCP tool server, a fake OpenAI-style model server for scripted scenarios, and a summary of token usage from logged requests. Without the skill, an agent would have to work out these steps from scratch.
Great for
- Maintainers of Qwen Code reproducing a user-reported bug end to end
- Contributors verifying that a fix works in the built bundle with real model calls
- Developers testing how the CLI integrates with a custom MCP tool server
Skip it if
- Ordinary users of Qwen Code or other projects, since it only makes sense inside the Qwen Code repository and its setup
- Projects that do not use Qwen Code, because the commands and paths are specific to it
- Running against real accounts on shared machines without care, because the tests use real API keys from ~/.qwen and can spend money or write chat history
Try asking
- “Reproduce this bug report end to end using the globally installed qwen command and show me the tool errors”
- “Test my MCP echo server integration with the CLI in headless mode and check the tool_use output”
- “Capture the raw API request and response for this prompt so I can see the tool schema sent to the model”
- “Summarize token usage and cache hit rate for the last 20 requests”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 6 original files, the Apache-2.0 licence and an attribution note.
e2e-testing.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip e2e-testing.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip e2e-testing.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Use QWEN_RUNTIME_DIR to keep test runs from cluttering your real chat history and auto-memory, unless the bug depends on that history
- Point the CLI at the included mock server via OPENAI_BASE_URL for deterministic tests that do not spend real model tokens
- Read the scripts before running them, since they execute on your machine and the mock server listens on a local port
What's inside
- references/mcp-testing.md
- references/mock-openai-server.md
- scripts/mcp-test-server.js
- scripts/mock-openai-server.js
- scripts/token-stats.py
- SKILL.md
Redistributed unmodified from QwenLM/qwen-code under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.