Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Generate test scaffolding for modules with proper structure, fixtures, and mock configurations.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
This skill provides comprehensive test scaffolding and templates for quickly setting up unit and integration tests with proper structure, fixtures, and mocking configurations. It guides the creation of well-structured, maintainable tests following best practices.
On-demand via command: /generate-tests <file-path>
Example:
/generate-tests src/tools/example/core.py
Complete pytest unit test template with:
Complete integration test template with:
test_*.py or *_test.py)/generate-tests src/tools/doc_fetcher/core.py
Provides:
tests/test_doc_fetcher_core.py structure/generate-tests src/api/endpoints.py
Provides:
tests/integration/test_endpoints.py structure/generate-tests src/components/Button.tsx
Provides:
src/components/Button.test.tsx structuredef test_function_name_condition_expected():
"""Test description."""
# Arrange - Set up test data and conditions
input_data = {"key": "value"}
expected = "result"
# Act - Execute the function under test
result = function_under_test(input_data)
# Assert - Verify the outcome
assert result == expected
class TestClassName:
"""Tests for ClassName."""
@pytest.fixture
def instance(self):
"""Create test instance."""
return ClassName()
def test_method_success(self, instance):
"""Test successful method execution."""
result = instance.method()
assert result is not None
def test_method_error_handling(self, instance):
"""Test method handles errors."""
with pytest.raises(ValueError):
instance.method(invalid_input)
@pytest.mark.parametrize("input,expected", [
("test1", "result1"),
("test2", "result2"),
("test3", "result3"),
])
def test_function_with_parameters(input, expected):
"""Test function with multiple inputs."""
result = function_under_test(input)
assert result == expected
from unittest.mock import Mock, patch
@patch('module.external_service')
def test_with_mocked_service(mock_service):
"""Test with mocked external service."""
# Configure mock
mock_service.return_value = "mocked_response"
# Test function that uses service
result = function_that_calls_service()
# Verify
assert result == "expected"
mock_service.assert_called_once()
@pytest.fixture
def mock_database():
"""Mock database connection."""
db = Mock()
db.query.return_value = [{"id": 1, "name": "test"}]
return db
def test_database_query(mock_database):
"""Test database query."""
result = get_data(mock_database)
assert len(result) == 1
mock_database.query.assert_called()
def test_api_endpoint_integration(client):
"""Test API endpoint with real client."""
# Arrange
payload = {"data": "test"}
# Act
response = client.post("/api/endpoint", json=payload)
# Assert
assert response.status_code == 200
assert response.json()["status"] == "success"
def test_database_integration(db_session):
"""Test database operations."""
# Arrange
record = Model(name="test", value=123)
# Act
db_session.add(record)
db_session.commit()
# Assert
result = db_session.query(Model).filter_by(name="test").first()
assert result is not None
assert result.value == 123
# Python with pytest-cov
pytest --cov=src --cov-report=html
# JavaScript with Jest
jest --coverage
# View coverage report
open htmlcov/index.html # Python
open coverage/lcov-report/index.html # JavaScript
test_function_condition_expectedtest_process_data_invalid_input_raises_error아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Analyze feature requirements, dependencies, and security considerations. Use when starting feature implementation from GitHub issues to understand scope, technical feasibility, and risks.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Run SQL queries against psql, BigQuery, or MySQL from the terminal, including natural-language-to-SQL and schema exploration. Use when analyzing data, inspecting DB state, or debugging tables. Trigger on "query the database", "SQL", "show me data from", "explore table".
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Design REST APIs or function contracts with clear request/response specifications, error handling patterns, authentication strategies, and comprehensive documentation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Generate comprehensive API endpoint tests for REST and GraphQL APIs. Creates tests for all HTTP methods, status codes, authentication, and validation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Design component architecture and module structure using established architectural patterns for clean, maintainable, and scalable systems.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.