소스 정보
- 저장소
- ForceInjection/domain-driven-design-skills
- 최근 소스 활동
- 2026년 5월 8일 03:07
- 감지된 SKILL.md 언어
- 영어
- 스타
- 25
- 포크
- 7
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
SOC 직업 분류 기준
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill test-automation명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
| title | test-automation: Create test plans, write tests, validate code quality |
| name | test-automation |
| description | Create test plans, write tests, validate code quality through testing |
| tags | ["sdd-workflow","shared-architecture","quality-assurance"] |
| custom_fields | {"layer":null,"artifact_type":null,"architecture_approaches":["ai-agent-based","traditional-8layer"],"priority":"shared","development_status":"active","skill_category":"quality-assurance","upstream_artifacts":["BDD","SPEC","TASKS"],"downstream_artifacts":[]} |
Description: Automated test generation, BDD execution, coverage analysis, and contract testing
Category: Quality Assurance & Testing
Complexity: High (multi-framework integration + coverage analysis)
Transform SDD artifacts (BDD scenarios, requirements, contracts) into executable test suites with comprehensive coverage tracking. Ensures code implementation matches specifications and contracts.
graph TD
A[SDD Artifacts] --> B{Artifact Type}
B -->|BDD| C[Generate BDD Tests]
B -->|REQ| D[Generate Unit Tests]
B -->|CTR| E[Generate Contract Tests]
B -->|SPEC| F[Generate Integration Tests]
C --> G[pytest-bdd Test Suite]
D --> H[pytest Unit Test Suite]
E --> I[Contract Test Suite]
F --> J[Integration Test Suite]
G --> K[Execute Tests]
H --> K
I --> K
J --> K
K --> L[Coverage Analysis]
L --> M{Coverage Goals Met?}
M -->|No| N[Identify Gaps]
M -->|Yes| O[Generate Report]
N --> P[Generate Additional Tests]
P --> K
O --> Q[Update Traceability Matrix]
# Input: BDD/authentication_scenarios.md
# Output: tests/bdd/test_authentication.py
test-automation generate-bdd \
--input BDD/authentication_scenarios.md \
--output tests/bdd/test_authentication.py \
--framework pytest-bdd
Generated test structure:
import pytest
from pytest_bdd import scenarios, given, when, then, parsers
scenarios('{project_root}/BDD/authentication_scenarios.md')
@given('a user with valid credentials')
def user_with_valid_credentials(context):
context.user = create_test_user(
username='testuser',
password='ValidP@ssw0rd'
)
@when('the user attempts to login')
def user_attempts_login(context):
context.response = login_api(
username=context.user.username,
password=context.user.password
)
@then('the login should succeed')
def login_succeeds(context):
assert context.response.status_code == 200
assert 'access_token' in context.response.json()
# Input: reqs/requirements.md (REQ-AUTH-01)
# Output: tests/unit/test_auth_requirements.py
test-automation generate-unit \
--input reqs/requirements.md \
--filter REQ-AUTH-* \
--output tests/unit/test_auth_requirements.py
Generated test structure:
import pytest
from auth.service import AuthService
class TestREQ_AUTH_001:
"""Test REQ-AUTH-01: Password must be 8-20 characters"""
def test_password_minimum_length(self):
"""Verify password < 8 characters is rejected"""
result = AuthService.validate_password('Short1!')
assert not result.valid
assert 'minimum 8 characters' in result.error
def test_password_maximum_length(self):
"""Verify password > 20 characters is rejected"""
result = AuthService.validate_password('VeryLongPassword123456789!')
assert not result.valid
assert 'maximum 20 characters' in result.error
def test_password_valid_length(self):
"""Verify password 8-20 characters is accepted"""
result = AuthService.validate_password('ValidP@ss1')
assert result.valid
# Input: ctrs/CTR-USER-V1.yaml
# Output: tests/contract/test_user_contract.py
test-automation generate-contract \
--input ctrs/CTR-USER-V1.yaml \
--output tests/contract/test_user_contract.py \
--provider user-service
Generated test structure:
import pytest
from pact import Consumer, Provider, Like, EachLike
@pytest.fixture
def pact():
return Consumer('user-client').has_pact_with(
Provider('user-service')
)
def test_create_user_contract(pact):
expected = {
'user_id': Like('123e4567-e89b-12d3-a456-426614174000'),
'username': Like('testuser'),
'email': Like('test@example.com'),
'created_at': Like('2025-01-01T00:00:00Z')
}
(pact
.given('user database is empty')
.upon_receiving('a request to create a user')
.with_request('POST', '/api/users')
.will_respond_with(201, body=expected))
with pact:
result = user_api.create_user({
'username': 'testuser',
'email': 'test@example.com',
'password': 'SecureP@ss123'
})
assert result.status_code == 201
# Run all tests with coverage
test-automation run \
--coverage \
--coverage-report html \
--traceability
# Run specific test category
test-automation run --category bdd
test-automation run --category unit
test-automation run --category contract
# Run tests for specific requirement
test-automation run --requirement REQ-AUTH-01
test-automation coverage-report \
--format html \
--output reports/coverage \
--include-traceability
Generated report includes:
"""
BDD Tests for {feature_name}
Generated from: {bdd_document_path}
Traceability: {requirement_ids}
"""
import pytest
from pytest_bdd import scenarios, given, when, then, parsers
# Load all scenarios from BDD document
scenarios('{bdd_document_path}')
# Fixtures
@pytest.fixture
def context():
"""Test context for sharing state between steps"""
return {}
# Given steps
@given(parsers.parse('{step_description}'))
def step_given(context, {parameters}):
# Setup preconditions
pass
# When steps
@when(parsers.parse('{step_description}'))
def step_when(context, {parameters}):
# Execute action
pass
# Then steps
@then(parsers.parse('{step_description}'))
def step_then(context, {parameters}):
# Verify outcome
pass
"""
Unit Tests for {requirement_id}
Requirement: {requirement_description}
Source: {requirement_document}
"""
import pytest
from {module} import {class_or_function}
class Test_{requirement_id}:
"""Test suite for {requirement_id}"""
@pytest.fixture
def setup(self):
"""Setup test fixtures"""
return {class_or_function}()
def test_positive_case(self, setup):
"""Test expected behavior"""
result = setup.method({valid_input})
assert result == {expected_output}
def test_boundary_case_min(self, setup):
"""Test minimum boundary value"""
result = setup.method({min_value})
assert {assertion}
def test_boundary_case_max(self, setup):
"""Test maximum boundary value"""
result = setup.method({max_value})
assert {assertion}
def test_invalid_input(self, setup):
"""Test error handling"""
with pytest.raises({expected_exception}):
setup.method({invalid_input})
"""
Integration Tests for {component_name}
Specification: {spec_document}
Contracts: {contract_ids}
"""
import pytest
from {test_client} import TestClient
from {app} import app
@pytest.fixture
def client():
"""Test client for API integration tests"""
return TestClient(app)
class Test_{component_name}_Integration:
"""Integration test suite for {component_name}"""
def test_api_endpoint_{operation}(self, client):
"""Test {operation} operation"""
# Arrange
test_data = {test_payload}
# Act
response = client.{http_method}(
'{endpoint_path}',
json=test_data
)
# Assert
assert response.status_code == {expected_status}
assert response.json() == {expected_response}
"""
Contract Tests for {service_name}
Contract: {contract_id}
Provider: {provider_service}
Consumer: {consumer_service}
"""
import pytest
from pact import Consumer, Provider, Like, EachLike, Term
@pytest.fixture
def pact():
return Consumer('{consumer_service}').has_pact_with(
Provider('{provider_service}'),
host_name='localhost',
port=1234
)
class Test_{contract_id}:
"""Contract test suite for {contract_id}"""
def test_{operation}_contract(self, pact):
"""Test {operation} contract"""
# Define expected interaction
expected = {expected_schema}
# Setup pact
(pact
.given('{provider_state}')
.upon_receiving('{interaction_description}')
.with_request('{method}', '{path}')
.will_respond_with({status}, body=expected))
# Execute and verify
with pact:
result = {client_call}
assert result == expected
# Map requirements to tests
REQ-AUTH-01 → [
test_password_minimum_length,
test_password_maximum_length,
test_password_valid_length
] (100% covered)
REQ-AUTH-002 → [
test_password_uppercase_required,
test_password_lowercase_required
] (50% covered - missing number requirement test)
# Map BDD scenarios to test execution
BDD-LOGIN-001: User Login Success → PASS (covered)
BDD-LOGIN-002: User Login Failure → PASS (covered)
BDD-LOGIN-003: Account Lockout → NOT TESTED (0% covered)
# Map contract endpoints to tests
POST /api/users → test_create_user_contract (100% covered)
GET /api/users/{id} → test_get_user_contract (100% covered)
PUT /api/users/{id} → NOT TESTED (0% covered)
DELETE /api/users/{id} → NOT TESTED (0% covered)
# REQ-USER-001: Username must be 3-20 alphanumeric characters
test_data = {
'valid': ['abc', 'user123', 'JohnDoe2025', 'a'.repeat(20)],
'boundary_min': 'ab', # Too short
'boundary_max': 'a'.repeat(21), # Too long
'invalid': ['ab', 'user@123', 'John Doe', '123', ''],
'edge_cases': ['aaa', 'zzz', '000', '999']
}
# CTR-USER-V1: User schema
test_data = {
'valid_user': {
'username': 'testuser',
'email': 'test@example.com',
'age': 25
},
'missing_required_field': {
'username': 'testuser'
# Missing email
},
'invalid_type': {
'username': 123, # Should be string
'email': 'test@example.com',
'age': 'twenty-five' # Should be integer
}
}
Required tools:
Read: Read SDD artifacts (BDD, REQ, CTR, SPEC)Write: Generate test filesEdit: Update existing testsBash: Execute test frameworks (pytest, pact)Glob: Find test files and artifactsGrep: Search for requirements and scenariosRequired libraries:
ACTION: Validate Given-When-Then format
SUGGEST: Correct scenario syntax
VERIFY: Scenario parseable by pytest-bdd
UPDATE: BDD document if needed
ACTION: Identify missing dependencies or invalid specifications
SUGGEST: Fix specification or install required libraries
VERIFY: Generated test is syntactically correct
UPDATE: Test template if needed
ACTION: Identify untested requirements/scenarios
SUGGEST: Generate additional test cases
VERIFY: New tests increase coverage
UPDATE: Traceability matrix
ACTION: Compare expected vs actual contract
SUGGEST: Update implementation or contract
VERIFY: Provider and consumer agree on contract
UPDATE: Contract version if breaking change
reports/coverage/logs/test-runs/