write-sglang-test

Write and register SGLang CI/UT tests with CustomTestCase and server fixtures.

Updated May 14, 2026
One-click install
npx skills add https://github.com/sqjian/sglang --skill write-sglang-test-sqjian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-sglang-test
Source: https://github.com/sqjian/sglang/tree/main/.claude/skills/write-sglang-test
Command: npx skills add https://github.com/sqjian/sglang --skill write-sglang-test-sqjian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guide for writing SGLang CI / UT tests. This skill covers how to write and register tests, including CustomTestCase, CI registration, server fixtures, model selection, mock testing, and test placement. Always read test/README.md for the full CI layout, how to run tests, and extra tips. Use when creating new tests, adding CI test cases, writing unit tests, or when the user asks to add tests for SGLang features.

Core Features & Use Cases

  • CustomTestCase usage to ensure tearDownClass safety
  • CI registration guidance for per-commit and nightly workflows
  • Server fixtures and test placement across unit and server-based tests
  • Model selection, mock testing, and organizing test layouts

Quick Start

Create a new test file under test/registered/unit and register it with the appropriate CI function.

Frequently Asked Questions about write-sglang-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register SGLang CI tests for per-commit and nightly workflows?

To register SGLang CI tests, use the designated register_*_ci functions to configure workflows for per-commit and nightly runs. This ensures your tests are automatically executed within the correct continuous integration pipelines.

How do I use server fixtures when writing SGLang unit tests?

Server fixtures in SGLang unit tests provide the necessary server environment for integration scenarios. Proper server fixture handling ensures your tests can reliably initialize and interact with the server during automated test execution.

What is CustomTestCase used for in SGLang test development?

CustomTestCase in SGLang is used to ensure tearDownClass safety during test execution. Utilizing CustomTestCase guarantees that resource cleanup and teardown operations are handled securely after your test suite completes.

Where should I place new SGLang test files for unit and integration scenarios?

New SGLang test files should be organized under test/registered/unit for standardized test placement. Following this layout ensures proper test discovery and execution across both unit and integration scenarios.

Does SGLang testing support mock testing and model selection?

SGLang testing supports both mock testing and model selection to validate features efficiently. These capabilities allow developers to simulate environments and specify target models without requiring full computational resources.

Why do I need to read the test README before adding SGLang CI workflows?

Reading test/README.md is necessary to understand the full CI layout and execution tips before adding SGLang CI workflows. It provides the foundational knowledge required to run tests and organize test layouts correctly.