원클릭으로
testing
Playbook for executing unit and integration tests, mocking external services, and structuring test suites.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Playbook for executing unit and integration tests, mocking external services, and structuring test suites.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | testing |
| description | Playbook for executing unit and integration tests, mocking external services, and structuring test suites. |
This playbook establishes the guidelines, strategies, and patterns for implementing testing and test automation at an enterprise scale, ensuring code safety, reliability, and zero-regression deployments without unnecessary overhead.
To maintain a fast and reliable CI/CD pipeline, tests are divided into two tiers (E2E testing is omitted to optimize token usage and avoid redundant runtime overhead):
Mocking is essential for isolation, but over-mocking leads to fragile tests that fail to detect real integration bugs.
from unittest.mock import patch, MagicMock
# Best Practice: Patch at the import location, not definition location
@patch('module_under_test.external_api_call')
def test_fetch_user_data(mock_api):
# Setup mock return value
mock_api.return_value = {"id": 1, "name": "John Doe"}
result = module_under_test.get_user(1)
assert result["name"] == "John Doe"
mock_api.assert_called_once_with(1)
To keep tests clean and maintainable:
tests/ directory at the root of the project.test_ prefix (e.g., test_auth.py, test_utils.py).test_ followed by the action and expected behavior (e.g., test_authenticate_with_invalid_credentials_fails).assert True.Playbook for capturing design alignment from /grill-me, generating issue specifications, and managing task boards.
Playbook instructing agents how to dynamically formulate, design, bootstrap, and register new workspace skills when facing skill gaps.
Playbook for translating natural language requests about tasks, profiles, locking, and validation into CLI helper executions.
Playbook for writing safe database migrations, managing schema evolutions, executing reversible rollbacks, and avoiding table lock contention in enterprise environments.
Guidelines for CPU profiling, identifying database query bottlenecks (N+1 queries), diagnosing memory leaks, and optimizing resource execution speeds.
Guidelines for containerization (Dockerfile best practices), release versioning, blue-green deployment, feature flag rollouts, and post-deployment smoke verification.