sdlc-unittest

Implements unit and mocked-integration tests from a test case catalog with traceability tags and coverage gates.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/juartaurus98/codebase --skill sdlc-unittest-juartaurus98
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sdlc-unittest
Source: https://github.com/juartaurus98/codebase/tree/main/.claude/skills/sdlc-unittest
Command: npx skills add https://github.com/juartaurus98/codebase --skill sdlc-unittest-juartaurus98

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing unit tests by hand often produces tests that mirror the implementation instead of the requirement, lack traceability to specifications, and quietly skip coverage gaps. This Skill automates the unit-testing phase of an SDLC pipeline by generating tests directly from a test case catalog, enforcing isolation, traceability tags, and coverage thresholds. ## Core Features & Use Cases - Catalog-driven test generation: Reads TC rows marked unit or integration-mocked and writes one test per row using the active stack profile's framework, file patterns, and naming conventions. - Traceability enforcement: Tags every test with @trace.verifies and @trace.test_type, and back-fills each catalog row's Automated by cell so requirements and tests stay linked. - Failure triage and quality gates: Classifies failures as implementation defects, test defects, or spec gaps, then evaluates gate G5a (green suite, coverage minimum, no empty test files, no live providers). - Use Case: After a QA engineer authors a test case catalog for a feature, invoke this Skill to generate the full pytest suite with mocked dependencies, run coverage, and route any implementation defects back to the coding phase. ## Quick Start Ask the AI to run /unittest for a given UC-ID, FEAT-ID, or BUG-ID to generate and execute the unit test suite from the existing test case catalog.

Frequently Asked Questions about sdlc-unittest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate unit tests from a test case catalog?▼

Invoke /unittest with a UC-ID, FEAT-ID, or BUG-ID. The Skill reads catalog rows marked unit or integration-mocked, writes one test per row following the stack profile's naming and framework conventions, and tags each test with traceability metadata.

What happens when a generated unit test fails?▼

The default diagnosis is that the implementation code is wrong. Failures are classified as implementation defects routed to the coding phase, test defects fixed with a recorded finding, or spec gaps routed back to requirements. Assertions are never silently relaxed.

Can unit tests access a real database or network?▼

No. Isolation is mandatory at this level: no network, real database, broker, or model calls. Dependencies are injected through protocols and replaced with test doubles, and gate G5a fails if any live provider is reachable from a unit test.

Which test case catalog rows are excluded from unit test generation?▼

Rows marked acceptance, integration-live, or eval are excluded because they require live systems and belong to the /run-test and /eval phases. Only unit and integration-mocked rows are implemented in the fast suite.

Why does the gate fail on empty test files?▼

An empty test file collects zero tests while appearing to provide coverage, which is worse than a missing file. Gate G5a requires every placeholder file under the profile's test globs to be filled with real tests or deleted before passing.