write-sglang-test

Create CI/UT tests for SGLang projects using CustomTestCase and registered placement.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining CI/UT tests for SGLang projects can be error-prone and time-consuming without a standardized approach.

Core Features & Use Cases

  • Defines how to structure tests using CustomTestCase, including setup/teardown, mocking, and resource cleanup.
  • Details CI registration, test placement in test/registered categories, and server fixture usage for E2E validation.
  • Provides templates and guidance for blog-like usage when adding new tests, updating CI layouts, or validating features.

Quick Start

Create a new CI/UT test for a SGLang feature by following this skill's guidelines.

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 so they are discoverable?

You structure tests using CustomTestCase and place them in test/registered categories to ensure they are CI-discoverable. This placement allows the SGLang CI system to automatically discover and execute your unit and server-based tests.

What is the best way to structure SGLang unit tests with fixtures?

The best way to structure SGLang unit tests is by using the CustomTestCase class. It provides standardized templates for setup, teardown, server fixture usage, and mocking to streamline E2E validation and resource cleanup.

How does defensive tearDownClass work in SGLang testing?

Defensive tearDownClass in SGLang testing enforces robust resource cleanup after test execution. This pattern prevents state leakage between tests by ensuring all mocked objects and server fixtures are properly disposed of.

Can I use server fixtures for E2E validation in SGLang projects?

Yes, you can use server fixtures for E2E validation in SGLang projects. The testing framework provides specific guidance on integrating these fixtures with CustomTestCase to validate server-based features effectively.

Why are my SGLang CI tests not being discovered during registration?

SGLang CI tests are not discovered when they are not placed in the correct test/registered categories. You must ensure your CustomTestCase files are properly positioned and formatted according to the CI registration guidelines.