E2E testing
Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection.
Safety check
- Not rated by Claude yet. We only sell skills Claude has read and rated 7 out of 10 or higher, so this one is a free link to its author.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: e2e-testing
description: Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response payloads. Trigger on mentions of E2E testing, headless testing, MCP tool testing, or reproducing issues.
---
# 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`:
```bash
<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) —
...From QwenLM's repository, Apache-2.0 licence.
Related skills
-
Checked
React Native tests
Writes and fixes React Native component tests with Testing Library v13 and v14, using the right API for each.
7/101 credit -
Checked
JUnit and Mockito tests
Writes and fixes Java tests with JUnit, AssertJ and Mockito that are deterministic and keep failures visible.
8/101 credit -
Checked
Test code review
Reviews new or changed tests in pytest, Jest, Go and more, so weak tests are caught before merge.
8/101 credit -
Checked
Test scope decisions
Decides which tests a change needs and how to judge their quality, for unit, integration and UI tests.
8/101 credit -
Checked
Playwright accessibility tests
Writes Playwright and axe tests for WCAG, focus and ARIA, so accessibility bugs fail the build early.
7/101 credit -
Checked
Go table driven tests
Writes Go tests with table cases, fakes, fuzzing, benchmarks and golden files that stay fast and reliable.
8/101 credit