writing-springboot-tests

writing-springboot-tests is a skill for Claude Code from a-pavithraa/springboot-skills-marketplace. It costs 117 tokens per session (792 once invoked), scanned A, original, MIT.

A guide for testing the service boundaries of Spring Boot 4 applications. It covers tests involving HTTP calls, message brokers such as Kafka or RabbitMQ, events, databases, transactions, retries, and timeouts.

In plain words
What is it for?
Use it for full API tests, HTTP-client tests with WireMock, broker listener tests, event-publishing tests, and tests using Testcontainers to run real services in containers.
Why use it?
Mocks can hide failures in network calls, message delivery, transactions, retries, or time limits. These rules focus tests on the real boundary behaviour that callers and other services depend on.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the springboot-architecture plugin — 7 skills, 3 hooks shipped together

Good fit Use it for full API tests, HTTP-client tests with WireMock, broker listener tests, event-publishing tests, and tests using Testcontainers to run real services in containers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add a-pavithraa/springboot-skills-marketplace --skill writing-springboot-tests
Clone the repo
git clone --depth 1 https://github.com/a-pavithraa/springboot-skills-marketplace

Made for: Claude Code.

Or install springboot-architecture, the plugin that ships this one along with the rest of its 7 skills, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-springboot-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests/github.svg)](https://agentmods.dev/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests)
Your own site
<a href="https://agentmods.dev/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests"><img src="https://agentmods.dev/badge/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-springboot-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests"><img src="https://agentmods.dev/badge/skills/a-pavithraa/springboot-skills-marketplace/writing-springboot-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 792 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.00792
Opus 5.5 $0.00047 $0.00317
Sonnet 5.5 $0.00023 $0.00158
Haiku 4.5 $0.00012 $0.00079

Measured today against content hash feafa6d1a658, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

writing-springboot-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/springboot-architecture/skills/writing-springboot-tests/SKILL.md · 38 lines

How it starts

The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Writing Spring Boot Tests

Use this for tests where the framework, not the logic, decides whether the test proves anything: calls and messages between services, retries, timeouts, transactions, and Boot 4 test wiring. For plain unit tests you need nothing here beyond the three rules.

Rules

  1. Cases come from the contract, clause by clause. Every sentence of the Javadoc, the provider's API documentation, or an agreed message format is a case: units and formats (cents or decimals, field names), status codes with a special meaning (a 409 that means "already done"), headers, time limits, delivery promises (once only, after commit, poison messages dead-lettered). Call the code the way its callers do, with their values, so conversions run.
  2. Run the real thing at the edge. Real HTTP (WireMock), the real broker and database (Testcontainers), real transactions. A mocked client, template, or transaction manager can't show timeouts, retries, redelivery, or publish-after-commit. Timeout tests use the production timeout value.
  3. Show each test failing once, and treat a failing test as a finding. Break the guarded line and watch the test go red (PIT for classes with logic). If a test fails on the current code, report it with the contract clause; never weaken the assertion.

Before writing

Read ../code-reviewer/references/testing/traps.md: the Boot 4.1 / Framework 7 / Spring Kafka 4 traps found by running these templates (@Retryable behind an interface proxy, @RestClientTest ignoring timeouts, Apache HttpClient retrying 503, blocked partitions, corrupted dead letters, single-batch topic reads), and the Testcontainers and test-data traps.

Imports, starters and PIT: ../code-reviewer/references/testing/boot4-test-toolkit.md.

Templates

Verified on Spring Boot 4.1.1 with Postgres 18, Kafka 4.1 and WireMock 3.13. Take the mechanics (annotations, wiring, stubbing, polling) from them; take the cases from rule 1, not from the template.

Edge Template
Outbound HTTP client: request, 4xx, 5xx, retries, timeout, unusable answers assets/http-client-wiremock-test.java
Message listener: state change, redelivery, poison and non-JSON messages assets/message-listener-test.java
Event other services consume: after commit, never on rollback assets/event-publication-test.java
The whole service over HTTP, other services stubbed assets/api-integration-test.java
Web slice, persistence slice, service unit test assets/webmvc-slice-test.java, assets/repository-slice-test.java, assets/service-unit-test.java
Shared containers; PIT assets/testcontainers-configuration.java, assets/pitest-plugin.xml

Read the full file on GitHub · 38 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 38 lines · 117 tokens per session scan A feafa6d1a658

Subscribe to this mod's changes

writing-springboot-tests is a skill published in the GitHub repository a-pavithraa/springboot-skills-marketplace (80 stars, last pushed today), licensed MIT. It adds 117 tokens to every session and 792 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-24.

Related

Other skills, from other repositories

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

endpoint-probe

Probes each major Agent Monitor API route — /api/stats, /api/analytics, /api/sessions, /api/pricing/cost, /api/workflows/runs, /api/cc-config/overview — and reports each one's HTTP status, latency, and response shape, flagging which are reachable. Use to verify a dashboard install is wired up correctly.

hoangsonww/Claude-Code-Agent-Monitor · 80 tokens

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens

playwright-qa

QA engineering workflows on top of Playwright. Use when a QA engineer asks to design test cases from a ticket, PRD or acceptance criteria, decide what to automate, write a bug report from a failing test or trace, convert manual test cases (TestRail, Xray, CSV) into Playwright specs with case-ID traceability, or review…

testdino-hq/playwright-skill · 83 tokens

browser-agent

Autonomous human-like browser control and professional QA/QC testing. Powered by agent-browser (Rust native CDP, zero Playwright) with ISTQB test matrix generation, automated testcase execution, console/network error tracing, and defect reporting.

datit309/supergraph · 50 tokens

integration

Run integration and e2e tests after unit tests pass. Use after /supergraph:fix when unit tests are green.

datit309/supergraph · 27 tokens