Skip to content
Skills Library
Programming · Testing

testing-standard

/testing-standard

A test standard for keeping suites fast and safe when run in parallel - setup paid once instead of per test, isolation rules, which tests to run while working, before a push and in CI, a per-test speed budget, and how to handle a test that fails only in the full suite. Use whenever you write, change, review or run tests, set up a test class or fixture, touch the test runner or CI test job configuration, or a test fails only in the full run. Covers Laravel/PHPUnit/Pest, JS/TS (Vitest, Jest), Python (pytest) and other stacks.

Repository
eng-kit ↗
Licence
MIT
Last repository change
04.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
10
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

A test standard for keeping suites fast and safe when run in parallel - setup paid once instead of per test, isolation rules, which tests to run while working, before a push and in CI, a per-test speed budget, and how to handle a test that fails only in the full suite. Use whenever you write, change, review or run tests, set up a test class or fixture, touch the test runner or CI test job configuration, or a test fails only in the full run. Covers Laravel/PHPUnit/Pest, JS/TS (Vitest, Jest), Python (pytest) and other stacks.

Original author description

A test standard for keeping suites fast and safe when run in parallel - setup paid once instead of per test, isolation rules, which tests to run while working, before a push and in CI, a per-test speed budget, and how to handle a test that fails only in the full suite. Use whenever you write, change, review or run tests, set up a test class or fixture, touch the test runner or CI test job configuration, or a test fails only in the full run. Covers Laravel/PHPUnit/Pest, JS/TS (Vitest, Jest), Python (pytest) and other stacks.

How it works

  1. 1. Pay for setup once
  2. 2. Safe beside other tests
  3. 3. Which tests to run, when
  4. 4. Speed budget
  5. 5. Recording runs (eng-kit)
Original SKILL.md headings · 59 lines, 553 words
SKILL.md preview
---
name: testing-standard
description: A test standard for keeping suites fast and safe when run in parallel - setup paid once instead of per test, isolation rules, which tests to run while working, before a push and in CI, a per-test speed budget, and how to handle a test that fails only in the full suite. Use whenever you write, change, review or run tests, set up a test class or fixture, touch the test runner or CI test job configuration, or a test fails only in the full run. Covers Laravel/PHPUnit/Pest, JS/TS (Vitest, Jest), Python (pytest) and other stacks.
---

# Testing standard

Every second added to one test is paid on every run, by every developer and every CI job. Keep each
test cheap and independent of the others. Where the project's own docs (CLAUDE.md, CONTRIBUTING) or the
prompt you are running say something different, they win.

## 1. Pay for setup once

Most slow tests are slow in setup, not in assertions.

- Shared, read-only reference data (roles, permissions, lookup tables, feature flags) is created **once per
  test database or worker**, not in every test's setup. Each test then runs inside a transaction or
  against data it creates itself.
- A test creates only the rows it reads, with factories or builders. No shared "world" built for every
  test in a class.
- The app boots as little as the test needs: cached config and routes where the framework offers it,
  unit tests without the framework where possible.
- Fake the slow outside: no real network, mail, queues, sleeps or clocks. Block stray network calls so a
  missing fake fails loudly instead of waiting.

Stack-specific ways to do each of these: `references/laravel.md`, `references/javascript.md`,
`references/python.md`, `references/other.md`. Test database speed (tmpfs, durability, schema):
`references/databases.md`. CI runner and pipeline, nightly random order: `references/ci.md`. Guards that
keep the rules from slipping back: `references/guards.md`. Changed-only runs while coding:
`references/feedback.md`.

## 2. Safe beside other tests

Parallel runners give each worker its own process and usually its own database, but share the file
system, caches, ports and anything outside the process. A test that passes alone and fails in the full
suite breaks one of the rules in `references/parallel-safety.md`. Read it before a test touches files,
locks, cache keys, global or static state, the clock, or environment variables.

## 3. Which tests to run, when

| Moment | Run | Why |
| --- | --- | --- |
| While working | The one test or file, filtered | Seconds of feedback |
| Before a push | The files you touched and their neighbours, plus lint and fast unit tests (or the whole suite in parallel, if the project allows it) | Catch breakage before CI |
| On the merge request | The full suite in CI | The only merge gate |
| Fails only in the full suite | That file alone, then its folder in random order with a fixed seed | Finds order dependence |

## 4. Speed budget

- Unit test: under 0.5 s. Integration or feature test: under 2 s. Anything over 5 s gets a reason in the
  code review, so it is fixed or accepted on purpose.
- Never make a test faster by weakening what it checks. A faster test proves the same thing.
- When eng-kit is set up (`.eng-kit/` exists), `/eng-kit:status` shows the current suite time, the
  dashboard lists the slowest classes and tests, and `/eng-kit:optimize` plans and applies speed fixes.

## 5. Recording runs (eng-kit)

When `.eng-kit/config.json` exists and you run the **full** suite, run it with the JUnit output in that file's
`test_command` (for example `--log-junit .eng-kit/junit.xml`, `--junitxml=…`, `--outputFile.junit=…`). eng-kit's
hook then records the run automatically, with its time; any JUnit path named in the command works. Filtered runs
are recorded as partial and never compared with full runs. Respect the project's rules on whether the full suite
may run locally.
Files in this package (10)
  • SKILL.md 4 KB
  • references/ci.md 3 KB
  • references/databases.md 3 KB
  • references/feedback.md 1 KB
  • references/guards.md 4 KB
  • references/javascript.md 1 KB
  • references/laravel.md 2 KB
  • references/other.md 1 KB
  • references/parallel-safety.md 2 KB
  • references/python.md 1 KB

Versions

The database has no other skills named testing-standard.

Database snapshot: 13.11.2026 · package version 1b54b258fa0d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100test-guard
    Review generated or changed test code against universal testing rules before it ships. Best used reactively after an agent writes, edits, generates, or refactors tests, before presenting, committing, or merging them. Use for pytest (test_*.py, *_test.py), PHPUnit/Pest…
  • 95laravel-tdd
    Laravel testing strategies with PHPUnit, Pest, model factories, HTTP tests, Sanctum authentication testing, mocking, and coverage. Use when writing Laravel tests with PHPUnit or Pest, or driving a Laravel feature test-first.
  • 100pest-testing
    Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows.…
  • 100laravel-testing
    Laravel 13 testing with Pest PHP 4 or PHPUnit 12. Use when writing feature tests, unit tests, or any test code in a Laravel application. Triggers on tasks involving HTTP tests, model factories, database assertions, mocking facades, authentication testing, or test organisation patterns.
  • 100laravel-testing
    Use when testing controllers, services, or models, or implementing TDD on Laravel 13 with Pest 5 / PHPUnit 13 (or Pest 4 / PHPUnit 12 on PHP 8.3).
  • 95laravel-tdd
    Laravel testing strategies with PHPUnit, Pest, model factories, HTTP tests, Sanctum authentication testing, mocking, and coverage. Use when writing Laravel tests with PHPUnit or Pest, or driving a Laravel feature test-first.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.