add-unit-test-layer

Community

Set up JaCoCo-gated unit testing

Authordprice-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates the painful “first test layer” setup work by establishing reliable unit testing infrastructure for a Spring Boot 4 project, including strict compiler warnings and a JaCoCo coverage gate.

Core Features & Use Cases

  • Compiler warnings as errors: Adds -Xlint:all and -Werror so new code compiles cleanly and surfaces issues early.
  • JaCoCo coverage reporting and enforcement: Configures tasks.jacocoTestReport and tasks.jacocoTestCoverageVerification with a 95% minimum floor for instructions and branches.
  • Baseline unit smoke test: Ensures the ApplicationTest with main_doesNotThrow() is present so the project has an initial, repeatable unit-test anchor.
  • Scope: Intended for projects that are missing unit-test infrastructure beyond the default Initializr contextLoads, not for adding individual test classes or component-layer annotations like @WebMvcTest or @DataJpaTest.

Quick Start

Use add-unit-test-layer when your Spring Boot 4 project needs the initial unit-test infrastructure (JaCoCo, -Werror compiler flags, and the baseline ApplicationTest) and you want coverage enforcement before adding deeper component/e2e layers.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: add-unit-test-layer
Download link: https://github.com/dprice-dev/claude-java-skills/archive/main.zip#add-unit-test-layer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.