Skip to content

alirezarezvani/claude-code-skill-factory / generated-skills/tdd-guide

tdd-guide

Verified

Comprehensive Test Driven Development guide for engineering subagents with multi-framework support, coverage analysis, and intelligent test generation

FileKindSize
HOW_TO_USE.mdmarkdown7.0 KB
README.mdmarkdown18.1 KB
SKILL.mdskill md10.7 KB
coverage_analyzer.pyscript15.1 KB
expected_output.jsonconfig2.3 KB
fixture_generator.pyscript14.0 KB
format_detector.pyscript11.9 KB
framework_adapter.pyscript14.5 KB
metrics_calculator.pyscript15.1 KB
output_formatter.pyscript12.4 KB
sample_coverage_report.lcovother615 B
sample_input_python.jsonconfig1.4 KB
sample_input_typescript.jsonconfig1.4 KB
tdd_workflow.pyscript16.6 KB
test_generator.pyscript14.3 KB

expected_output.json

View on GitHub
{
  "test_generation": {
    "generated_tests": [
      {
        "name": "should_validate_password_length_successfully",
        "type": "happy_path",
        "priority": "P0",
        "framework": "jest",
        "code": "it('should validate password with sufficient length', () => {\n  const validator = new PasswordValidator();\n  const result = validator.validate('Test@123');\n  expect(result).toBe(true);\n});"
      },
      {
        "name": "should_handle_too_short_password",
        "type": "error_case",
        "priority": "P0",
        "framework": "jest",
        "code": "it('should reject password shorter than 8 characters', () => {\n  const validator = new PasswordValidator();\n  const result = validator.validate('Test@1');\n  expect(result).toBe(false);\n});"
      }
    ],
    "test_file": "password-validator.test.ts",
    "total_tests_generated": 8
  },
  "coverage_analysis": {
    "summary": {
      "line_coverage": 100.0,
      "branch_coverage": 100.0,
      "function_coverage": 100.0,
      "total_lines": 20,
      "covered_lines": 20,
      "total_branches": 12,
      "covered_branches": 12
    },
    "gaps": [],
    "assessment": "Excellent coverage - all paths tested"
  },
  "metrics": {
    "complexity": {
      "cyclomatic_complexity": 6,
      "cognitive_complexity": 8,
      "testability_score": 85.0,
      "assessment": "Medium complexity - moderately testable"
    },
    "test_quality": {
      "total_tests": 8,
      "total_assertions": 16,
      "avg_assertions_per_test": 2.0,
      "isolation_score": 95.0,
      "naming_quality": 87.5,
      "quality_score": 88.0,
      "test_smells": []
    }
  },
  "recommendations": [
    {
      "priority": "P1",
      "type": "edge_case_coverage",
      "message": "Consider adding boundary value tests",
      "action": "Add tests for exact boundary conditions (7 vs 8 characters)",
      "impact": "medium"
    },
    {
      "priority": "P2",
      "type": "test_organization",
      "message": "Group related tests using describe blocks",
      "action": "Organize tests by feature (length validation, complexity validation)",
      "impact": "low"
    }
  ],
  "tdd_workflow": {
    "current_phase": "GREEN",
    "status": "Tests passing, ready for refactoring",
    "next_steps": [
      "Review code for duplication",
      "Consider extracting validation rules",
      "Commit changes"
    ]
  }
}
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall