write-sglang-test

Create SGLang unit, integration, kernel, or performance tests with CI registration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers create reliable SGLang unit and integration tests that follow project conventions, use appropriate fixtures, and run correctly in CI.

Core Features & Use Cases

  • Test Design: Choose between mocked unit tests, server-based end-to-end tests, JIT kernel tests, and performance tests.
  • CI Integration: Register tests with the correct backend, suite, estimated runtime, model, and nightly settings.
  • Resource Management: Use CustomTestCase, server fixtures, defensive cleanup, and standard SGLang test utilities to prevent leaks and flaky failures.
  • Use Case: When adding a new SGLang feature, use this Skill to place the test correctly, select the smallest suitable model or mock strategy, register it in the appropriate CI suite, and verify its lifecycle handling.

Quick Start

Use the write-sglang-test skill to create and register a CI-ready test for the specified SGLang feature.

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 SGLang unit tests that follow repository conventions?

Writing SGLang unit tests requires using CustomTestCase, appropriate mocks, and standard test utilities to validate engine features. This approach ensures correct test placement, follows repository conventions, and maintains defensive resource cleanup to prevent leaks.

How do I add a new SGLang feature test to CI workflows?

Adding SGLang feature tests to CI requires literal CI registration with the correct backend, suite, estimated runtime, and model settings. You must configure nightly settings and select the smallest suitable model or mock strategy to ensure reliable integration.

When should I use mocked unit tests versus server-based end-to-end tests for SGLang?

Use mocked unit tests for isolated engine features or middleware to ensure speed, and server-based end-to-end tests for request routing or server APIs. Choose JIT kernel tests for hardware-specific operations and performance tests for benchmarking model behavior.

Why are my SGLang server tests leaking resources and failing in CI?

SGLang server tests leak resources when avoiding CustomTestCase or defensive cleanup protocols. Applying standard SGLang server fixtures and proper lifecycle handling prevents flaky failures by ensuring all test resources are correctly released after execution.

Can I use standard test utilities for SGLang JIT kernel tests?

Yes, you can use standard SGLang test utilities for JIT kernel tests by applying CustomTestCase and appropriate fixtures. This ensures correct test placement, defensive resource cleanup, and proper CI registration with suitable models and backends.

What's the best way to prevent flaky failures in SGLang integration tests?

The best way to prevent flaky failures in SGLang integration tests is implementing CustomTestCase with server fixtures and defensive resource cleanup. This manages test lifecycles properly and ensures reliable CI execution without resource leaks.