Java testing strategies
Apply proven testing strategies (RIGHT-BICEP, A-TRIP, CORRECT) to design and verify Java unit tests.
What is covered in this Skill?
- RIGHT-BICEP: Key questions to guide test creation — Right results, Boundary conditions, Inverse relationships, Cross-checks, Error conditions, Performance
- A-TRIP: Characteristics of good tests — Automatic, Thorough, Repeatable, Independent, Professional
- CORRECT: Boundary condition verification — Conformance, Ordering, Range, Reference, Existence, Cardinality, Time
Constraints
Before applying any test strategy changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
- MANDATORY: Run
./mvnw compile or mvn compile before applying any change
- SAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
- VERIFY: Run
./mvnw clean verify or mvn clean verify after applying improvements
- BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
- EDGE CASE: If the user goal is ambiguous, stop and ask a clarifying question before editing files or running project-wide commands
- EDGE CASE: If required context, files, credentials, or tools are missing, report the blocker explicitly and ask whether to proceed with setup or fallback guidance
- EDGE CASE: If requested changes conflict with project constraints or safety boundaries, explain the conflict and ask for user confirmation on the preferred trade-off
When to use this skill
- Review Java code for testing strategies
- Apply RIGHT-BICEP testing strategies in Java code
- Apply A-TRIP testing strategies in Java code
- Apply CORRECT boundary condition verification in Java code
Workflow
- Compile project before test-strategy changes
Run ./mvnw compile or mvn compile and stop immediately if compilation fails.
- Read testing-strategies reference
Read references/130-java-testing-strategies.md and map current tests to RIGHT-BICEP, A-TRIP, and CORRECT gaps.
- Apply strategy-driven test improvements
Improve or add tests to cover missing boundaries, quality characteristics, and verification depth.
- Verify with full build
Run ./mvnw clean verify or mvn clean verify after applying improvements.
Reference
For detailed guidance, examples, and constraints, see references/130-java-testing-strategies.md.
1---2name: 130-java-testing-strategies3description: Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code; Apply A-TRIP testing strategies in Java code; Apply CORRECT boundary condition verification in Java code. Part of cursor-rules-java project4license: Apache-2.05---6# Java testing strategies
7
8Apply proven testing strategies (RIGHT-BICEP, A-TRIP, CORRECT) to design and verify Java unit tests.
9
10**What is covered in this Skill?**
11
12- **RIGHT-BICEP**: Key questions to guide test creation — Right results, Boundary conditions, Inverse relationships, Cross-checks, Error conditions, Performance
13- **A-TRIP**: Characteristics of good tests — Automatic, Thorough, Repeatable, Independent, Professional
14- **CORRECT**: Boundary condition verification — Conformance, Ordering, Range, Reference, Existence, Cardinality, Time
15
16
17## Constraints
18
19Before applying any test strategy changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
20
21- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
22- **SAFETY**: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
23- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements
24- **BEFORE APPLYING**: Read the reference for detailed examples, good/bad patterns, and constraints
25- **EDGE CASE**: If the user goal is ambiguous, stop and ask a clarifying question before editing files or running project-wide commands
26- **EDGE CASE**: If required context, files, credentials, or tools are missing, report the blocker explicitly and ask whether to proceed with setup or fallback guidance
27- **EDGE CASE**: If requested changes conflict with project constraints or safety boundaries, explain the conflict and ask for user confirmation on the preferred trade-off
28
29## When to use this skill
30
31- Review Java code for testing strategies
32- Apply RIGHT-BICEP testing strategies in Java code
33- Apply A-TRIP testing strategies in Java code
34- Apply CORRECT boundary condition verification in Java code
35
36## Workflow
37
381. **Compile project before test-strategy changes**
39
40Run `./mvnw compile` or `mvn compile` and stop immediately if compilation fails.
41
422. **Read testing-strategies reference**
43
44Read `references/130-java-testing-strategies.md` and map current tests to RIGHT-BICEP, A-TRIP, and CORRECT gaps.
45
463. **Apply strategy-driven test improvements**
47
48Improve or add tests to cover missing boundaries, quality characteristics, and verification depth.
49
504. **Verify with full build**
51
52Run `./mvnw clean verify` or `mvn clean verify` after applying improvements.
53
54## Reference
55
56For detailed guidance, examples, and constraints, see [references/130-java-testing-strategies.md](references/130-java-testing-strategies.md).