← ClaudeAtlas

vllm-test-generatorlisted

Generate test cases for the vllm-project/vllm repository (https://github.com/vllm-project/vllm). Use this skill when the user wants to write unit tests or integration/e2e tests for vllm code, functions, classes, or features. Triggered by requests like "帮我写XXX的测试用例", "生成XXX的单元测试", "为XXX功能写测试", "generate tests for XXX in vllm", "write a test for XXX vllm function". Do NOT use for vllm-ascend — use vllm-ascend-ut-generator instead.
shen-shanshan/vllm-dev-skills · ★ 16 · AI & Automation · score 80
Install: claude install-skill shen-shanshan/vllm-dev-skills
# vLLM Test Generator Generate well-structured tests for [vllm-project/vllm](https://github.com/vllm-project/vllm), following the conventions of the existing test suite. ## Step 1 — Fetch Context Before writing, fetch the relevant source and existing tests: ```bash # Browse existing tests for the target area gh api repos/vllm-project/vllm/contents/tests/<subdir> --jq '[.[] | {name}]' # Read a representative existing test file gh api repos/vllm-project/vllm/contents/tests/<path>.py --jq '.content' | base64 -d # Read the source under test if needed gh api repos/vllm-project/vllm/contents/vllm/<path>.py --jq '.content' | base64 -d ``` ## Step 2 — Classify the Test | What is being tested | Type | Directory | |---|---|---| | Single function / class / method | Unit | `tests/` or matching subdir | | Config parsing, data structures, utils | Unit | `tests/` root | | CUDA kernels | Unit | `tests/kernels/` | | Attention backends | Unit/Integration | `tests/v1/attention/` or `tests/kernels/` | | Full model inference with LLM class | Integration | `tests/entrypoints/llm/` | | OpenAI-compatible API | Integration | `tests/entrypoints/openai/` | | Model correctness (HF vs vLLM) | Integration | `tests/basic_correctness/` or `tests/models/language/` | | Quantization end-to-end | Integration | `tests/quantization/` | | LoRA end-to-end | Integration | `tests/lora/` | | Distributed / multi-GPU | Integration | `tests/distributed/` | | v1 engine internals | Unit/Integration | `tests/v1/` ma