Test tagging
Tag tests by speed and scope so CI can run the right slice at the right time. Use when the suite is one undifferentiated blob and you need fast feedback on pull requests without dropping slow coverage.From its SKILL.md
npx -y skills add Amey-Thakur/AI-SKILLS --skill test-taggingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, 673 tokens by cl100k_base, as published. Nobody here has run it
Test tagging
When every test runs at once, the ten-millisecond unit tests wait behind the ten-second browser tests, and a developer waits behind both for a typo fix. Tagging gives each test a label for how fast and how broad it is, so the runner can pull a fast slice for pre-merge feedback and the full set for nightly. The discipline is a small, fixed vocabulary applied consistently, not a free-for-all of ad hoc labels.
Method
- Fix a small tag vocabulary and write it down. Two axes cover most needs:
speed (
fastunder ~100ms,slowabove) and scope (unit,integration,e2e). Add at most one or two more (externalfor tests that hit a network,smokefor the release gate). More tags than that and nobody applies them consistently. - Use the runner's native mechanism. Apply pytest markers
(
@pytest.mark.slow), Go build tags, JUnit@Tag, or Jest project config. Native tags are selectable on the command line (pytest -m "not slow") and fail loudly on a typo when you register them in config. - Tag by measured cost, not by guess. Run the suite with per-test timing
(
pytest --durations=25) and let the numbers assignslow. A test you assumed was fast because it looks small may spin up a container; the timing report, not intuition, decides the label. - Map each CI stage to a tag selector. Pre-merge runs
unit and not slowfor feedback in a couple of minutes; the merge queue addsintegration; nightly runs everything includinge2eandexternal. Each stage is one selector, so the split lives in config, not in scattered skip conditions. - Enforce that new tests get tagged. Add a lint or a collection-time hook that fails when a test has no scope tag, or default untagged tests into the slow lane so an unlabeled test never sneaks onto the fast path and blows the budget.
- Keep the fast lane honest with a time budget. Assert the
fastselection finishes under a hard ceiling (say 90 seconds) in CI. When it creeps over, a mislabeled test has crept in; find it with the durations report and retag or fix it.
Checks
- Does running the fast lane have a single, memorable command every developer knows?
- Pick a random slow test: is it slow for a real reason, or mistagged?
- Does an untagged new test fail CI or land in the slow lane by default, never silently on the fast path?
Boundaries
Tagging routes tests that already exist; it does not decide which tests to write, which is testing-strategy. Parallelism and sharding are a separate lever that composes with tags rather than replacing them. Keep the vocabulary aligned with whatever the project already uses instead of inventing a parallel scheme.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.