java-unit-testing

Establish AIR-based unit testing standards for Java projects.

44|15|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/yanhaoluo0/AlibabaDevelopmentManualSkills --skill java-unit-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-unit-testing
Source: https://github.com/yanhaoluo0/AlibabaDevelopmentManualSkills/tree/main/.cursor/skills/java-unit-testing
Command: npx skills add https://github.com/yanhaoluo0/AlibabaDevelopmentManualSkills --skill java-unit-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This section provides guidelines to implement AIR-based unit testing standards across Java projects, ensuring automated, isolated, and repeatable tests to improve reliability and catch regressions early.

Core Features & Use Cases

  • AIR principles (Automatic, Independent, Repeatable) as the foundation for all unit tests.
  • Guidance on test organization, isolation, and non-interference, including placement under src/test/java.
  • Strong recommendations for coverage goals, test design, and maintenance during refactors and CI.

Quick Start

Run the project's automated unit tests locally or in CI to verify AIR-based testing practices.

Frequently Asked Questions about java-unit-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the AIR principles for Java unit testing?

AIR principles for Java unit testing require tests to be Automatic, Independent, and Repeatable. This foundation ensures tests run without manual intervention, do not interfere with each other, and produce consistent results across executions.

How do I organize Java unit tests to ensure isolation and non-interference?

To ensure isolation and non-interference, place Java unit tests under the src/test/java directory. Design tests using BCDE-based methodology with minimal external dependencies and implement data isolation techniques like optional rollback for database interactions.

What is the recommended code coverage target for Java unit tests?

The recommended code coverage target for Java unit tests is 70% statement coverage overall. For core modules within the Java project, the target increases to 100% coverage to catch regressions early and improve reliability.

Can I run automated Java unit tests in a CI workflow?

Yes, you can run automated Java unit tests in a CI workflow. The standards apply during code development and CI workflows to guide test design, verify AIR-based testing practices, and enforce coverage goals across core modules.

How should database tests be handled in Java unit testing?

Database tests in Java unit testing should be handled using data isolation and optional rollback. This approach maintains the Independent and Repeatable AIR principles by ensuring database modifications do not affect subsequent test executions.