Official agent skill

Spring Boot Testing

by github in github/awesome-copilot

Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.

OfficialMITAuto-check passedBackend & APIs

Install Spring Boot Testing

skills CLI
$ npx skills add github/awesome-copilot --skill spring-boot-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot spring-boot-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spring-boot-testing .claude/skills/spring-boot-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spring-boot-testing
GitHub stars
40k
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
461 words
Files
15 (incl. references)
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.

  • Works in 4 steps: Test Pyramid: Unit (fast) > Slice… → Right Tool: Use the narrowest slice that… → AssertJ Style: Fluent, readable… → …
  • Tasks that involve Backend development
  • SKILL.md covers Core Principles, Which Test Slice?, Test Slices Reference and Testing Tools Reference, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Spring Boot Testing is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including reference files (for example `references/assertj-basics.md`, `references/assertj-collections.md` and `references/context-caching.md`).

It sits in Backend & APIs, covering Backend development. It works with Spring Boot and JUnit. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Tasks that involve Backend development

Example prompts

  • “/spring-boot-testing”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Test Pyramid: Unit (fast) > Slice (focused) > Integration (complete)
  2. Right Tool: Use the narrowest slice that gives you confidence
  3. AssertJ Style: Fluent, readable assertions over verbose matchers
  4. Modern APIs: Prefer MockMvcTester and RestTestClient over legacy alternatives

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java and xml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spring Boot Testing loads about 1.7k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 39 tokens; SKILL.md has 461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~19k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 461 words, ~1,664 tokens.

Download SKILL.mdSave it as .claude/skills/spring-boot-testing/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
spring-boot-testing
description
Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.

Spring Boot Testing

This skill provides expert guide for testing Spring Boot 4 applications with modern patterns and best practices.

Core Principles

  1. Test Pyramid: Unit (fast) > Slice (focused) > Integration (complete)
  2. Right Tool: Use the narrowest slice that gives you confidence
  3. AssertJ Style: Fluent, readable assertions over verbose matchers
  4. Modern APIs: Prefer MockMvcTester and RestTestClient over legacy alternatives

Which Test Slice?

ScenarioAnnotationReference
Controller + HTTP semantics@WebMvcTestreferences/webmvctest.md
Repository + JPA queries@DataJpaTestreferences/datajpatest.md
REST client + external APIs@RestClientTestreferences/restclienttest.md
JSON (de)serialization@JsonTestreferences/test-slices-overview.md
Full application@SpringBootTestreferences/test-slices-overview.md

Test Slices Reference

Testing Tools Reference

Assertion Libraries

Testcontainers

Test Data Generation

Performance & Migration

Quick Decision Tree

Testing a controller endpoint?
  Yes → @WebMvcTest with MockMvcTester

Testing repository queries?
  Yes → @DataJpaTest with Testcontainers (real DB)

Testing business logic in service?
  Yes → Plain JUnit + Mockito (no Spring context)

Testing external API client?
  Yes → @RestClientTest with MockRestServiceServer

Testing JSON mapping?
  Yes → @JsonTest

Need full integration test?
  Yes → @SpringBootTest with minimal context config

Spring Boot 4 Highlights

  • RestTestClient: Modern alternative to TestRestTemplate
  • @MockitoBean: Replaces @MockBean (deprecated)
  • MockMvcTester: AssertJ-style assertions for web tests
  • Modular starters: Technology-specific test starters
  • Context pausing: Automatic pausing of cached contexts (Spring Framework 7)

Testing Best Practices

Code Complexity Assessment

When a method or class is too complex to test effectively:

  1. Analyze complexity - If you need more than 5-7 test cases to cover a single method, it's likely too complex
  2. Recommend refactoring - Suggest breaking the code into smaller, focused functions
  3. User decision - If the user agrees to refactor, help identify extraction points
  4. Proceed if needed - If the user decides to continue with the complex code, implement tests despite the difficulty

Example of refactoring recommendation:

java
// Before: Complex method hard to test
public Order processOrder(OrderRequest request) {
  // Validation, discount calculation, payment, inventory, notification...
  // 50+ lines of mixed concerns
}

// After: Refactored into testable units
public Order processOrder(OrderRequest request) {
  validateOrder(request);
  var order = createOrder(request);
  applyDiscount(order);
  processPayment(order);
  updateInventory(order);
  sendNotification(order);
  return order;
}
Show full SKILL.md (168 more words)Show less
Avoid Code Redundancy

Create helper methods for commonly used objects and mock setup to enhance readability and maintainability.

Test Organization with @DisplayName

Use descriptive display names to clarify test intent:

java
@Test
@DisplayName("Should calculate discount for VIP customer")
void shouldCalculateDiscountForVip() { }

@Test
@DisplayName("Should reject order when customer has insufficient credit")
void shouldRejectOrderForInsufficientCredit() { }
Test Coverage Order

Always structure tests in this order:

  1. Main scenario - The happy path, most common use case
  2. Other paths - Alternative valid scenarios, edge cases
  3. Exceptions/Errors - Invalid inputs, error conditions, failure modes
Test Production Scenarios

Write tests with real production scenarios in mind. This makes tests more relatable and helps understand code behavior in actual production cases.

Test Coverage Goals

Aim for 80% code coverage as a practical balance between quality and effort. Higher coverage is beneficial but not the only goal.

Use Jacoco maven plugin for coverage reporting and tracking.

Coverage Rules:

  • 80+% coverage minimum
  • Focus on meaningful assertions, not just execution

What to Prioritize:

  1. Business-critical paths (payment processing, order validation)
  2. Complex algorithms (pricing, discount calculations)
  3. Error handling (exceptions, edge cases)
  4. Integration points (external APIs, databases)

Dependencies (Spring Boot 4)

xml
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-test</artifactId>
  <scope>test</scope>
</dependency>

<!-- For WebMvc tests -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-webmvc-test</artifactId>
  <scope>test</scope>
</dependency>

<!-- For Testcontainers -->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-testcontainers</artifactId>
  <scope>test</scope>
</dependency>

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 14 other files (references) in skills/spring-boot-testing of github/awesome-copilot.

  • SKILL.md
  • references/assertj-basics.md
  • references/assertj-collections.md
  • references/context-caching.md
  • references/datajpatest.md
  • references/instancio.md
  • references/mockitobean.md
  • references/mockmvc-classic.md
  • references/mockmvc-tester.md
  • references/restclienttest.md
  • references/resttestclient.md
  • references/sb4-migration.md
  • references/test-slices-overview.md
  • references/testcontainers-jdbc.md
  • references/webmvctest.md

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Spring Boot Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spring Boot Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spring Boot Testing this skillgithub/awesome-copilot40k1 repos~1.7kAutomated safety check: PassMIT
Spring Bootpiomin/claude-ai-spring-boot1.3k—~2kAutomated safety check: PassApache-2.0
Java ArchitectJeffallan/claude-skills12k—~1.5kAutomated safety check: PassMIT
Spring Boot Test Patternsgiuseppe-trisciuoglio/developer-kit355—~2.3kAutomated safety check: NotesMIT
Java Rulessoftspark/ai-toolkit179—~3.1kAutomated safety check: PassApache-2.0
Springboot TDDaffaan-m/ECC274k3 repos~813Automated safety check: PassMIT

Similar skills

  • Spring Boot

    piomin/claude-ai-spring-boot

    Spring Boot 3.x development - REST APIs, JPA, Security, Testing, and Cloud-native patterns.

    1.3k GitHub stars~2k tokensUpdated 5 mo ago
    Backend & APIsAuto-check passed
  • Java Architect

    Jeffallan/claude-skills

    Builds Spring Boot 3.x services on Java 21 with domain-driven design, WebFlux, JPA tuning and Spring Security using OAuth2 and JWT, verified by Maven or Gradle builds.

    12k GitHub stars~1.5k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Spring Boot Test Patterns

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive testing patterns for Spring Boot applications covering unit, integration, slice, and container-based testing with JUnit 5, Mockito, Testcontainers, and performance optimization.

    355 GitHub stars~2.3k tokensUpdated 27 days ago
    Backend & APIsAuto-check: notes
  • Java Rules

    softspark/ai-toolkit

    Java coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.

    179 GitHub stars~3.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Springboot TDD

    affaan-m/ECC

    使用JUnit 5、Mockito、MockMvc、Testcontainers和JaCoCo进行Spring Boot的测试驱动开发。适用于添加功能、修复错误或重构时。

    274k GitHub starsUsed in 3 repos~813 tokens
    Testing & QAAuto-check passed
  • Springboot TDD

    affaan-m/ECC

    Desarrollo guiado por pruebas para Spring Boot usando JUnit 5, Mockito, MockMvc, Testcontainers y JaCoCo.

    274k GitHub stars~996 tokensUpdated 2 days ago
    Testing & QAAuto-check passed

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Spring Boot Testing

What does Spring Boot Testing do?

Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ. Spring Boot Testing is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Expert Spring Boot 4 testing specialist that selects the best Spring Boot testing techniques for your situation with Junit 6 and AssertJ.

When should I use Spring Boot Testing?

Spring Boot Testing fits situations like: tasks that involve Backend development.

How do I install Spring Boot Testing in Claude Code?

Run `npx skills add github/awesome-copilot --skill spring-boot-testing -a claude-code`. Or copy the skill folder (skills/spring-boot-testing in github/awesome-copilot) into .claude/skills/spring-boot-testing in your project. Claude Code loads it when a task matches its description.

How do I install Spring Boot Testing in Codex?

Run `npx skills add github/awesome-copilot --skill spring-boot-testing -a codex`. Or copy the skill folder (skills/spring-boot-testing in github/awesome-copilot) into .agents/skills/spring-boot-testing in your project. Codex loads it when a task matches its description.

Can I use Spring Boot Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill spring-boot-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spring-boot-testing, .gemini/skills/spring-boot-testing, .github/skills/spring-boot-testing and .opencode/skills/spring-boot-testing in your project.

What does Spring Boot Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Spring Boot Testing is instructions for the agent only.

Does Spring Boot Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spring Boot Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spring Boot Testing use?

Spring Boot Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spring Boot Testing use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.

What are the alternatives to Spring Boot Testing?

Skills that share tags, products or a category with Spring Boot Testing: Spring Boot (piomin/claude-ai-spring-boot, 1.3k stars), Java Architect (Jeffallan/claude-skills, 12k stars), Spring Boot Test Patterns (giuseppe-trisciuoglio/developer-kit, 355 stars) and Java Rules (softspark/ai-toolkit, 179 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spring Boot Testing?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.