OpenParable
Skip to content
← Back to skills

Split Test Files

Testing & Quality
split-test-files

Split Test Files is an Agent Skill for testing & quality published in the kubernetes-sigs/kueue repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Review that new feature tests are split into their own file rather than added to an already large test file.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/kubernetes-sigs/kueue/blob/HEAD/cmd/experimental/skills/reviewer/split-test-files/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/split-test-files, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Skill: Split Large Test Files for New Features

Flag: A PR adds substantial test coverage for a new feature to an already large test file (e.g., scheduler_test.go, workload_controller_test.go).

When to split — all three conditions should hold:

  1. The feature has a distinct name that maps cleanly to a file suffix (e.g., _tas, _afs, _concurrentadmission).
  2. The new tests require feature-specific setup — enabling a feature gate, constructing feature-specific resources — that is unrelated to the base test suite's setup.
  3. The new tests would add a significant block of lines (roughly 150+) to a file that is already large.

Ask: Extract the feature's tests into <package>_<feature>_test.go. Precedent: scheduler_tas_test.go, scheduler_afs_test.go. This keeps the base file navigable and makes feature-specific scenarios easy to find and extend.