add-e2e-test-layer

Add an e2eTest source set and Gradle task to Spring Boot 4 projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dprice-dev/claude-java-skills --skill add-e2e-test-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-e2e-test-layer
Source: https://github.com/dprice-dev/claude-java-skills/tree/main/.claude/skills/add-e2e-test-layer
Command: npx skills add https://github.com/dprice-dev/claude-java-skills --skill add-e2e-test-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of lacking real end-to-end verification in a Spring Boot 4 project, where you want confidence that the embedded server starts and real HTTP endpoints (including actuator) behave correctly.

Core Features & Use Cases

  • Creates an e2eTest source set that runs against the application like a real deployment by using @SpringBootTest(RANDOM_PORT).
  • Registers an e2eTest Gradle task and wires it into the verification lifecycle (tasks.check) with JaCoCo ordering.
  • Provides a ready ApplicationTests class that includes contextLoads() style startup confidence plus actuator health assertions over real HTTP.
  • Use case: after adding a new primary REST endpoint, you add one happy-path e2e test in ApplicationTests to ensure the endpoint is reachable and health is UP.

Quick Start

Ask to add the end-to-end test layer to your Spring Boot 4 service so it gets the e2eTest source set, e2eTest task, and ApplicationTests with actuator health verification.

Frequently Asked Questions about add-e2e-test-layer

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

FAQPage Schema
How do I add end-to-end tests to a Spring Boot application to verify the embedded server starts?

To add end-to-end tests, you can create an e2eTest source set that uses @SpringBootTest(RANDOM_PORT) to verify the embedded server starts and real HTTP endpoints behave correctly. This provides startup confidence and actuator health assertions over real HTTP.

What is the best way to test real HTTP behavior with the Spring Boot Actuator health endpoint?

The best way to test real HTTP behavior for the Actuator health endpoint is to use RestTestClient within an ApplicationTests class, asserting that the /actuator/health endpoint returns UP status against a randomly ported embedded server.

How do I configure a Gradle task to run integration tests after component tests with JaCoCo?

You can configure integration testing in Gradle by registering an e2eTest task that runs after the componentTest task, wiring it into tasks.check and JaCoCo ordering to include end-to-end verification in the standard build lifecycle.

Can I use RestTestClient with JUnit 5 for end-to-end testing in Spring Boot 4?

Yes, you can use RestTestClient with JUnit 5 for end-to-end testing in Spring Boot 4 by generating an ApplicationTests class that asserts real HTTP responses, ensuring your REST endpoints are reachable and application health is UP.

When do I need a separate e2eTest source set in my Spring Boot project?

You need a separate e2eTest source set when you want to chain acceptance verification after component tests, using RANDOM_PORT to run tests against the application like a real deployment to validate embedded server startup and actuator behavior.