test-dev

Standardize Java testing with JUnit 5, AssertJ, Mockito, and JaCoCo.

34|5|Updated Oct 18, 2020
One-click install
npx skills add https://github.com/whtoo/How_to_implment_PL_in_Antlr4 --skill test-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-dev
Source: https://github.com/whtoo/How_to_implment_PL_in_Antlr4/tree/main/.claude/skills/test-dev
Command: npx skills add https://github.com/whtoo/How_to_implment_PL_in_Antlr4 --skill test-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

测试开发标准化框架,确保项目采用统一的测试工具链和风格,提升可维护性与覆盖率。

Core Features & Use Cases

  • 测试框架: JUnit 5 + AssertJ + Mockito + JaCoCo 版本与配置规范。
  • 测试编写规范: 命名、结构、Given-When-Then 模式示例。
  • 测试类型: 单元、集成、参数化等模板。

Quick Start

mvn test 将执行所有测试并生成覆盖率报告。

Frequently Asked Questions about test-dev

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

FAQPage Schema
How do I set up standardized test coverage for Java projects with JUnit 5 and JaCoCo?

Test coverage standardization uses JUnit 5, AssertJ, Mockito, and JaCoCo to enforce consistent practices across Java applications. Configure JaCoCo in your Maven project to measure line and branch coverage, then run `mvn test` to execute all tests and generate coverage reports automatically.

What's the best way to structure unit tests with Given-When-Then pattern and AssertJ assertions?

The Given-When-Then structure organizes tests into setup, execution, and verification stages using AssertJ's fluent assertion API. This naming convention and structural pattern standardizes readability and maintainability across unit, integration, and parameterized tests in your test suite.

Can I use Mockito with JUnit 5 for mocking dependencies in integration tests?

Yes. Mockito integrates seamlessly with JUnit 5 to mock external dependencies in both unit and integration tests. Combined with AssertJ assertions and explicit coverage thresholds, this approach standardizes how you isolate components and verify behavior across your test pipelines.

How do I enforce code coverage thresholds and quality gates in Maven builds?

JaCoCo enforces line and branch coverage thresholds as Maven build quality gates. Configure coverage targets in your pom.xml, and the build fails if thresholds aren't met, ensuring consistent quality standards across core modules, instruction implementations, and integration pipelines.

What testing conventions should I follow for parameterized and integration test naming?

Standardized naming conventions distinguish unit, integration, and parameterized tests in your codebase. Combined with Given-When-Then structure and JUnit 5 templates, these conventions ensure consistency across your entire test suite and enable automated coverage reporting via Maven and JaCoCo.