130-java-testing-strategies
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJava testing strategies
Java 测试策略
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
应用经过验证的测试策略(RIGHT-BICEP、A-TRIP、CORRECT)来设计和验证Java单元测试。
本Skill涵盖哪些内容?
- RIGHT-BICEP:指导测试用例创建的关键问题——正确结果、边界条件、反向关系、交叉检查、错误条件、性能
- A-TRIP:优质测试的特性——自动化、全面性、可重复性、独立性、专业性
- CORRECT:边界条件验证——一致性、顺序性、范围、引用、存在性、基数、时间
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 or
./mvnw compilebefore applying any changemvn compile - SAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
- VERIFY: Run or
./mvnw clean verifyafter applying improvementsmvn clean verify - BEFORE APPLYING: Read the reference for detailed examples, good/bad patterns, and constraints
在应用任何测试策略变更之前,确保项目能够编译。如果编译失败,请立即停止——问题解决前不要继续。应用改进后,执行完整验证。
- 强制要求:在进行任何变更前运行 或
./mvnw compilemvn compile - 安全规则:如果编译失败,立即停止且不要继续——编译失败是阻塞性条件
- 验证步骤:应用改进后运行 或
./mvnw clean verifymvn clean verify - 应用前准备:阅读参考文档以获取详细示例、优劣模式及约束条件
When to use this skill
何时使用本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
- 审查Java代码的测试策略
- 在Java代码中应用RIGHT-BICEP测试策略
- 在Java代码中应用A-TRIP测试策略
- 在Java代码中应用CORRECT边界条件验证
Reference
参考资料
For detailed guidance, examples, and constraints, see references/130-java-testing-strategies.md.
如需详细指南、示例和约束条件,请查看 references/130-java-testing-strategies.md。