This skill should be used when the user asks about "testing", "test coverage", "unit tests", "integration tests", "test organization", "test best practices", "flaky tests", "test isolation", "TDD", "regression tests", or needs guidance on test structure, coverage requirements, and test execution.
Provides comprehensive testing standards and best practices for SDLC compliance.
/plugin marketplace add zircote/sdlc-quality/plugin install zircote-sdlc@zircote/sdlc-qualityThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Guidance for implementing comprehensive testing that meets SDLC requirements.
Available Tools: If using Claude Code, the
pr-review-toolkit:pr-test-analyzeragent reviews test coverage and identifies gaps. Use after creating PRs to ensure adequate test coverage.
Projects MUST maintain these test categories:
| Category | Location | Purpose |
|---|---|---|
| Unit tests | Alongside source code | Test individual functions/methods |
| Integration tests | Dedicated test directory | Test component interactions |
| Documentation tests | Within doc comments | Verify examples work |
| End-to-end tests | Dedicated e2e directory | Test full system behavior |
Test files MUST be clearly identifiable by naming convention:
| Language | Unit Tests | Integration Tests |
|---|---|---|
| Rust | mod tests in source | tests/ directory |
| TypeScript | *.test.ts, *.spec.ts | tests/integration/ |
| Python | test_*.py, *_test.py | tests/integration/ |
| Java | *Test.java | *IntegrationTest.java |
| Go | *_test.go | *_integration_test.go |
| Requirement | Level |
|---|---|
| New functionality | MUST include tests |
| Bug fixes | MUST include regression tests |
| Coverage measurement | MUST be tracked |
| Minimum coverage | SHOULD target 80% |
| Critical paths | MUST have 95%+ coverage |
| Coverage reports | MUST be uploaded to tracking service |
Bug fixes MUST include regression tests that:
#[test]
fn test_issue_123_null_pointer_on_empty_input() {
// Regression test for issue #123
// Previously caused null pointer when input was empty
let result = process_input("");
assert!(result.is_ok());
}
Critical paths requiring 95%+ coverage:
| Test Type | Target Duration |
|---|---|
| Unit tests | < 1 second each |
| Integration tests | < 30 seconds each |
| Full test suite | < 10 minutes |
Flaky tests (tests that sometimes pass, sometimes fail) MUST be:
Tests MUST follow the AAA pattern:
test("should calculate total with discount", () => {
// Arrange
const cart = new ShoppingCart();
cart.addItem({ price: 100, quantity: 2 });
const discount = 0.1;
// Act
const total = cart.calculateTotal(discount);
// Assert
expect(total).toBe(180);
});
Test names MUST clearly describe what is being tested:
Good:
test_user_creation_with_valid_email_succeeds
test_login_with_invalid_password_returns_401
test_empty_cart_returns_zero_total
Bad:
test1
testUser
test_it_works
Tests MUST cover:
| Category | Examples |
|---|---|
| Empty inputs | Empty strings, empty arrays, null/None |
| Boundary values | 0, -1, MAX_INT, empty, single item |
| Invalid inputs | Wrong types, malformed data |
| Concurrent access | Race conditions, deadlocks |
| Resource limits | Large inputs, memory constraints |
# Run all tests
make test
# Check coverage
make coverage
# Verify no flaky tests (run multiple times)
for i in {1..5}; do make test || exit 1; done
# Check critical path coverage (language-specific)
coverage report --include="src/auth/*,src/security/*" --fail-under=95
references/test-patterns.md - Common test patterns and anti-patternsreferences/coverage-config.md - Coverage tool configurationexamples/rust-test-setup.md - Rust test organizationexamples/typescript-jest.config.js - Jest configurationexamples/python-pytest.ini - Pytest configurationActivates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Activates when the user asks about Agent Skills, wants to find reusable AI capabilities, needs to install skills, or mentions skills for Claude. Use for discovering, retrieving, and installing skills.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.