write-sglang-test

Write and register SGLang CI/UT tests using CustomTestCase and module-level registration.

4|2|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill write-sglang-test-drunkcoding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-sglang-test
Source: https://github.com/drunkcoding/AgentSkillsArxiv/tree/main/skills/sglang/write-sglang-test
Command: npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill write-sglang-test-drunkcoding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and maintaining CI/UT tests for SGLang can be error-prone and inconsistent. This skill provides a canonical approach to creating tests, organizing them under test/registered, and ensuring proper server fixtures and CI registrations are followed. It also documents best practices for test structure, setUp/tearDown handling, and test categorization to improve reliability and discoverability.

Core Features & Use Cases

  • Standardized test patterns using CustomTestCase and defensive tearDownClass
  • Clear CI registration with register_cuda_ci or other registration hooks
  • Server fixture guidance and test placement under test/registered

Quick Start

Create a new test file under test/registered/unit, implement tests with CustomTestCase, and register them at module level using the appropriate register_*_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 write CI tests for SGLang components?

Write SGLang CI tests by placing files under test/registered, implementing test cases with CustomTestCase, and calling registration functions like register_cuda_ci at the module level to ensure proper CI execution.

What is the best way to structure SGLang unit tests?

Structure SGLang unit tests by extending CustomTestCase, implementing defensive tearDownClass methods for resource cleanup, placing files under test/registered/unit, and adding module-level CI registration hooks.

How do I register SGLang tests in CI pipelines?

Register SGLang tests in CI by invoking registration hooks like register_cuda_ci at the module level of your test files, ensuring the CI runner automatically discovers and executes the categorized tests.

Can I use server fixtures for SGLang end-to-end testing?

Yes, you can use server fixtures for SGLang end-to-end testing. The framework provides guidance on configuring optional server fixtures to properly structure and manage server-based tests under the test/registered category.

Why do my SGLang unit tests fail during tearDownClass?

SGLang unit tests may fail during tearDownClass if not using CustomTestCase with defensive cleanup patterns. Implementing proper setUpClass and tearDownClass methods ensures reliable resource cleanup and prevents cascading test failures.