test-quality

Solid

Apply test quality principles when generating or reviewing test code. Enforces Arrange-Act-Assert structure, one behavior per test, assertion quality, test isolation, meaningful naming, and test data management. Use when writing tests, reviewing test code, or when the user mentions 'write tests', 'test this', 'test quality', 'test review', 'improve tests', or 'test structure'. This skill governs the craft of writing individual test cases -- not what to test (that is driven by the code being implemented) but how to write tests that are reliable, readable, and maintainable.

Testing & QA 134 stars 8 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Test Quality ## Config Resolution Skill support project custom. Order: 1. Look `.lattice/config.yaml` in repo root 2. If find, check `paths.test_quality` for custom doc path 3. If custom path exist, read doc & check YAML frontmatter for `mode`: - **`mode: override`** (or no mode): Custom doc take full control. Use instead default. Must be complete -- is only reference. - **`mode: overlay`**: Read `./references/defaults.md` first, then apply custom doc on top. Custom sections replace match sections (by heading). New sections add after. 4. If no config/path/file, read `./references/defaults.md` 5. **Language adaptation**: If `paths.language_idioms` exist in config, read **"Testing Patterns"** section and adapt §5 (Test Naming), §4 (Test Isolation), §6 (Test Data Builders) to language test framework idioms. Language idioms take precedence over pseudocode defaults. Defaults ship w/ skill. Work out-of-box. Override only when team have different standards. ## Self-Validation Checklist STOP after gen each test. Check ALL before continue. If fail, fix. If ambiguous (see Ambiguity Signals), flag -- show options & reasoning. 1. **AAA STRUCTURE**: arrange, act, assert separate w/ blank lines? Any logic (if/loop/try) in arrange or assert? 2. **SINGLE BEHAVIOR**: Test verify one behavior per loaded doc (default: one behavior per test, name need "and" = split)? 3. **ASSERTION QUALITY**: Assert observable behavior, not implementation? Specific enough catch regression? 4. **IS...

Details

Author
techygarg
Repository
techygarg/lattice
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Related Skills