e2e-testing

e2e-testing is a skill for Claude Code, Codex from QwenLM/qwen-code. It costs 94 tokens per session (2,117 once invoked), scanned A, original, Apache-2.0.

A guide for testing the Qwen Code command-line program from start to finish, including real model calls and connected MCP servers. End-to-end tests check the complete path from a user request through the model and tools.

In plain words
What is it for?
It helps reproduce reported bugs, verify fixes against the shipped command-line bundle, test MCP integrations, and inspect raw model API traffic.
Why use it?
It helps reveal problems that unit tests can miss, such as incorrect command-line behavior, tool validation, or API requests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/qwenlm/qwen-code/e2e-testing
Any agent
npx skills add QwenLM/qwen-code --skill e2e-testing
Clone the repo
git clone --depth 1 https://github.com/QwenLM/qwen-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for e2e-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/qwenlm/qwen-code/e2e-testing.svg)](https://agentmods.dev/skills/qwenlm/qwen-code/e2e-testing)
Your own site
<a href="https://agentmods.dev/skills/qwenlm/qwen-code/e2e-testing"><img src="https://agentmods.dev/badge/skills/qwenlm/qwen-code/e2e-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,117 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00094 $0.02117
Opus 5 $0.00047 $0.01059
Sonnet 5 $0.00019 $0.00423
Haiku 4.5 $0.00009 $0.00212

Measured 3d ago against content hash 35430d4c5d72, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

e2e-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/mcp-test-server.js, scripts/mock-openai-server.js, scripts/token-stats.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.qwen/skills/e2e-testing/SKILL.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

E2E Testing Guide

How to run the Qwen Code CLI end-to-end — from building the bundle to inspecting raw API traffic. Use when unit tests aren't enough and you need to verify behavior through the full pipeline (model API → tool validation → tool execution).

Setup

Which binary to use

  • Reproducing bugs: use the globally installed qwen command — this matches what the user ran when they filed the issue.
  • Verifying fixes: build first (npm run build && npm run bundle), then run node dist/cli.js — this tests your local changes.
  • Runtime-only checks (fastest): npm run dev -- "<prompt>" <flags> — runs TS source via tsx, no build. Use build && bundle + node dist/cli.js only when the shipped artifact itself matters. (<qwen> below can be npm run dev --.)

Running against a real model

Headless auth comes from ~/.qwen. Force a known-good model with --auth-type + --model:

<qwen> "your prompt" --auth-type openai --model deepseek-v4-flash \
  --approval-mode yolo --output-format json

Gotcha: --model alone won't switch providers — --auth-type (openai/anthropic/qwen-oauth/gemini/vertex-ai) does. Omit it and the run falls back to the default provider and dies on its missing key.

Isolating runtime artifacts

QWEN_RUNTIME_DIR=<dir> redirects qwen's runtime output — tmp/, debug/, and projects/<sanitized-cwd>/... (chat recordings, auto-memory, history) — into <dir> instead of ~/.qwen. Config (settings.json, OAuth tokens, commands/) still reads from ~/.qwen, so real auth and provider config work without any setup.

Use when repeated test runs would clutter your real chat history or auto-memory. Skip when the bug you're reproducing depends on the user's actual history or runtime state — that is the repro.

QWEN_RUNTIME_DIR=/tmp/test-1/runtime <qwen> "prompt" ...

Run modes

Headless Mode

Run the CLI non-interactively with JSON output (<qwen> = qwen or node dist/cli.js per above):

Read the full file on GitHub · 240 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 240 lines · 94 tokens per session scan A 35430d4c5d72

Subscribe to this mod's changes

e2e-testing is a skill published in the GitHub repository QwenLM/qwen-code (27,559 stars, last pushed yesterday), licensed Apache-2.0. It adds 94 tokens to every session and 2,117 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.