Unified testing workflow — TDD (RED/GREEN/REFACTOR), blackbox integration testing with F8A Summer Test (JSON test cases, WireMock, Testcontainers), and 7-phase verification pipeline. Use when writing unit or integration tests, generating test scaffolds, configuring JaCoCo coverage thresholds, using StepVerifier for reactive tests, MockMvc/WebTestClient for API tests, or setting up Testcontainers. Includes scripts/generate-test-scaffold.sh.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Unified testing workflow — TDD (RED/GREEN/REFACTOR), blackbox integration testing with F8A Summer Test (JSON test cases, WireMock, Testcontainers), and 7-phase verification pipeline. Use when writing unit or integration tests, generating test scaffolds, configuring JaCoCo coverage thresholds, using StepVerifier for reactive tests, MockMvc/WebTestClient for API tests, or setting up Testcontainers. Includes scripts/generate-test-scaffold.sh.
HIGH 100%: BUILD phase (TDD mandatory)
HIGH 90%+: any test file edit
HIGH 80%+: production code change (new tests required to maintain 80%+ coverage)
MEDIUM 40-79%: refactor without behavior change (existing tests must stay green)
LOW 1-39%: documentation-only change
ZERO: trivial typo fix in non-test, non-production file
Testing Workflow
TDD Cycle
RED — failing test. GREEN — minimal code to pass. REFACTOR — clean up, tests stay green.
// RED: write test first@TestvoidshouldCreateOrderWhenValidInput() {
StepVerifier.create(orderService.create(validCommand))
.assertNext(o -> assertThat(o.getStatus()).isEqualTo(OrderStatus.PENDING))
.verifyComplete();
}
// GREEN: ./gradlew test -> implement until pass// REFACTOR: ./gradlew test jacocoTestReport -> clean up, verify coverage >= 80%
Test Pyramid
Type
Annotation
Speed
Use For
Unit
@ExtendWith(MockitoExtension.class)
Fast
Service/domain logic
Controller (WebFlux)
@SpringBootTest + @AutoConfigureWebTestClient
Medium
API contracts
Controller (MVC)
@WebMvcTest
Medium
API contracts, auth
Repository (R2DBC)
@DataR2dbcTest
Medium
DB queries
Repository (JPA)
@DataJpaTest
Medium
JPA queries
Blackbox
@SpringBootTest(DEFINED_PORT) + @Testcontainers
Slow
Full-stack JSON-driven
E2E
@SpringBootTest + @Testcontainers
Slow
Full flows
Ratio: unit > integration > E2E. Min coverage: 80% line (JaCoCo).
Verification Pipeline (7 Phases)
Phase
What
Gate
1. Compile
Build sources + tests
STOP on fail
2. Unit Tests
Fast tests
STOP on fail
3. Integration
Testcontainers tests
STOP on fail
4. Coverage
JaCoCo check
BLOCK < 60%
5. Security
OWASP + secrets scan
BLOCK CRITICAL
6. Static Analysis
.block(), @Autowired, debug stmts
CRITICAL: .block()
7. Diff Review
Changed files review
Manual
Full commands per phase → references/verification-pipeline.md.
Quick Verification Modes
Mode
Phases
Use Case
quick
1-2
During development
standard
1-4
Before committing
full
1-7
Before PR / release
security
5-6
Security-focused review
Naming & Organization
Test methods: shouldDoXWhenY (e.g., shouldReturnOrderWhenIdExists)