Habilidades testing-patterns
🧪

testing-patterns

Riesgo bajo ⚙️ Comandos externos⚡ Contiene scripts

테스팅 패턴 적용

También disponible en: sickn33,0xDarkMatter,ChrisWiles,CleanExpo

효과적인 테스트 작성에는 각 시나리오에 맞는 올바른 패턴 이해가 필요합니다. 이 스킬은 테스트 피라미드부터 TDD 워크플로까지 범용적인 테스트 전략을 제공하여 신뢰할 수 있는 테스트 스위트를 구축할 수 있습니다.

Soporta: Claude Codex Code(CC)
🥉 74 Bronce
1

Descargar el ZIP de la skill

2

Subir en Claude

Ve a Configuración → Capacidades → Skills → Subir skill

3

Activa y empieza a usar

Pruébalo

Usando "testing-patterns". Help me set up TDD for a shopping cart calculate_total function

Resultado esperado:

  • Step 1 - RED: Write failing test for empty cart (returns 0)
  • Step 2 - GREEN: Minimal code to pass the test
  • Step 3 - Refactor: Add item support with proper assertions
  • Next tests to add: single item, multiple items, discount handling

Usando "testing-patterns". What mocking strategy should I use for testing database queries?

Resultado esperado:

  • Use stubs for predictable return values on repository methods
  • Use spies to verify query calls and count
  • Mock at the repository boundary, not inside the database layer
  • Consider fakes for complex query scenarios

Usando "testing-patterns". How do I structure my test pyramid for a new API service?

Resultado esperado:

  • Unit tests (70%): Test each endpoint handler and business logic in isolation
  • Integration tests (20%): Test database queries and service interactions
  • E2E tests (10%): Test critical user flows end-to-end

Auditoría de seguridad

Riesgo bajo
v3 • 1/16/2026

Documentation-focused skill providing testing pattern guidance. Static findings are false positives from markdown code examples. The scanner flagged backtick-delimited code blocks as shell execution, example DATABASE_URLs as credential access, and testing tool names like pytest/docker as reconnaissance. The single utility script (coverage-check.sh) is a benign pytest wrapper with no network access or credential handling.

7
Archivos escaneados
1,521
Líneas analizadas
2
hallazgos
3
Auditorías totales

Factores de riesgo

⚙️ Comandos externos (1)
⚡ Contiene scripts (1)

Puntuación de calidad

68
Arquitectura
100
Mantenibilidad
85
Contenido
21
Comunidad
90
Seguridad
83
Cumplimiento de la especificación

Lo que puedes crear

테스트 fundamentals 배우기

테스트 피라미드와 다양한 시나리오에 대한 테스트 구조화 방법 이해

테스트 전략 설계

올바른 격리 및 모킹 접근법으로 포괄적인 테스트 계획 작성

CI 테스트 파이프라인 구축

병렬화 및 커버리지 게이트가 포함된 효율적인 테스트 파이프라인 구성

Prueba estos prompts

기본 단위 테스트
Help me write a unit test for [function name] including arrange-act-assert structure and proper mocking of dependencies.
테스트 피라미드
Design a test pyramid for my [feature name]. How many unit, integration, and E2E tests should I have?
TDD 워크플로
Guide me through TDD for [feature]. Start with a failing test, then minimal code, then refactor.
고급 모킹
Help me set up mocking for [external API/database] in my tests. Include stubs for responses and mocks for verifying interactions.

Mejores prácticas

  • 새 기능에 TDD를 사용하여 프로덕션 코드 전에 테스트 작성
  • 외부 경계(데이터베이스, API, 파일 시스템)에서만 모킹
  • 테스트 간 독립성 유지하고 순서 의존성 없음

Evitar

  • 구현 세부사항 대신 공개 동작 테스트
  • 테스트 중인 코드 자체를 모킹
  • 프로덕션 코드 로직을 반영하는 테스트 작성

Preguntas frecuentes

어떤 테스팅 프레임워크가 이 패턴과 함께 작동합니까?
패턴은 언어에 독립적입니다. Python(pytest), JavaScript(Jest), Java(JUnit), Go(testing) 모두 적용됩니다.
권장 커버리지 임계값은 무엇입니까?
단위 테스트 커버리지 80% 목표로 합니다. 통합 및 E2E 테스트는 중요 경로만 커버합니다.
CI 파이프라인과 어떻게 통합합니까?
빠른 테스트(린트, 단위) 먼저 실행합니다. 매트릭스 빌드로 병렬화하고 실행 간 의존성 캐싱합니다.
내 테스트 데이터가 안전합니까?
이 스킬은 패턴만 제공합니다. 테스트 데이터 처리는 테스트 구성 및 CI 시크릿 관리에 따라 다릅니다.
내 테스트가 왜 불안정합니까?
불안정 테스트는 종종 외부 의존성, 타이밍 문제 또는 공유 상태로 발생합니다. 격리하고 결정론적 데이터를 사용하세요.
테스트 문서화와 어떻게 다릅니까?
이것은 직접 적용할 수 있는 실행 가능한 패턴입니다. 스킬이 올바른 접근 방식을 선택하고 구현하는 데 도움을 줍니다.

Detalles del desarrollador