backend-testing
Skill0 starsChanged 32 days agoMITView on GitHub
Create practical backend tests. Use when asked to write unit tests, integration tests, API tests, database tests, Kafka tests, contract tests, or regression tests, or to plan what tests a change needs. Use the right framework for the stack (JUnit/Mockito/Testcontainers for Spring, pytest for FastAPI, Go testing). Do NOT use for finding where to focus during a review (backend-code-review) or general implementation help (backend-job / software-internship).
6 other projects use a version of this.
Adopted by
Most recently taken up by
- autohandai/community-skillstheir own version, first seen Nov 29, 2026
- biersoeckli/QuickStacktheir own version, first seen Oct 8, 2026
- rhesis-ai/rhesistheir own version, first seen Oct 8, 2026
- jgamaraalv/delivery-looptheir own version, first seen Jul 4, 2026
- pyaephyo11979/rent4Utheir own version, first seen Jun 24, 2026
- Typeless-Git/skillstheir own version, first seen Mar 30, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- rhesis-ai/rhesis★ 408same name
- biersoeckli/QuickStack★ 367same name
- autohandai/community-skills★ 14same name
- pyaephyo11979/rent4U★ 4same name
- Typeless-Git/skills★ 1same name
- jgamaraalv/delivery-loop★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-designSkill
- applied-ai-deliverySkill
- backend-code-reviewSkill
- backend-debuggingSkill
- backend-deploymentSkill
- backend-jobSkill
- car-part-retrievalSkill
- continuous-improvementSkill
- data-engineeringSkill
- documentationSkill
- internship-communicationSkill
- interview-prepSkill
- learning-roadmapSkill
- observabilitySkill
- production-deliverySkill
- skill-health-checkSkill
- software-internshipSkill
- thesis-helperSkill
- workflow-adapterSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Read the my-skill plugin's docs/workflow-profile.md.
- Very specific: line 47
Test framework and existing test conventions (JUnit 5 + Mockito, pytest, Go testing, Testcontainers?).
- Distinctive: line 60
Prefer meaningful behavioral tests over chasing a coverage percentage.
- Distinctive: line 61
Avoid brittle tests tied to implementation details (internal method order, exact log text, private state).
- Distinctive: line 62
Every suite must include negative and failure-path tests, not just happy paths.
- Distinctive: line 63
No network calls, no shared mutable state between tests.
- Distinctive: line 64
Never invent team test conventions.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Backend Testing
Purpose
Turn untested backend code into meaningfully tested backend code: choose the right test type per risk, name concrete cases, and generate runnable tests that won't rot.
When to use
- Writing tests for services, controllers, repositories, Kafka producers/consumers, or scheduled jobs.
- Planning the test strategy for a new feature or a bug fix.
- Covering a regression before a fix ships.
- Deciding what to mock vs. what to run for real (Testcontainers, in-memory DB, embedded Kafka).
When not to use
- Reviewing someone else's test quality →
backend-code-review. - Contract design for inter-service tests →
api-designfor the contract,backend-testingfor the test. - Implementation of the feature being tested →
backend-joborsoftware-internship.
Context intake
- The repository's existing test framework and conventions (detect, don't impose) and what risk class the change is (auth/money/data vs cosmetic). Detect or confirm before starting (ask at most what is genuinely needed):
- Which context: one of the contexts defined in
docs/workflow-profile.md("Contexts")? Readdocs/active-context.mdfirst: ifCurrentnames a context set within the last day, use it, apply its rules, and do not ask. Otherwise fall back to the active roles and projects indocs/workflow-profile.md; ask when it could be two different contexts. - What is the desired output: a plan, code, a review, tests, documentation, a deployment plan, or research notes? Confirm if ambiguous.
Workflow
- Read the my-skill plugin's
docs/workflow-profile.md. If it is missing, contradicts this request, or was last updated more than ~3 months ago, confirm or update it with Sothy before applying any role, project, or stack assumptions. - Identify code under test, dependencies, framework, and existing conventions. Match the conventions; don't introduce a competing style.
- Enumerate test cases in classes: happy path, input validation, failure paths, edge cases, concurrency, security/authorization.
- For each dependency, decide: real (integration), fake (in-memory), or mock (unit) — and justify briefly.
- Generate test code: deterministic, isolated, descriptive names (given/when/then style), one behavior per test.
- Give the commands to run the tests locally and in CI.
- Identify remaining coverage gaps — the cases that would still be untested and their risk.
Adaptation rules
- Framework follows the repo: JUnit/Mockito/Testcontainers, pytest, Go testing, JS - never introduce a competing style.
- Personal/thesis projects: pytest-first, lighter integration setups; ML experiment "tests" assert seeded metric ranges, not exact values.
- Same suite-shape rule everywhere: happy + validation + failure + edge + concurrency/security.
Inputs needed
- The code under test (method, class, endpoint) and its dependencies.
- Test framework and existing test conventions (JUnit 5 + Mockito, pytest, Go
testing, Testcontainers?). - What the code should do — expected behavior, not implementation details.
- Which integration points exist (PostgreSQL, Redis, Kafka) and whether the team runs real ones in tests.
Output contract
- Test objective — what behavior this test suite protects.
- Test cases — table or list, grouped by happy/validation/failure/edge/concurrency/security.
- Test code — complete, runnable test classes/functions.
- Mocks/fixtures — what's faked, how, and why.
- Commands to run tests — local + CI.
- Coverage gaps — what remains untested and the residual risk.
Rules and constraints
- Prefer meaningful behavioral tests over chasing a coverage percentage; never generate coverage-farming tests.
- Avoid brittle tests tied to implementation details (internal method order, exact log text, private state).
- Every suite must include negative and failure-path tests, not just happy paths.
- No network calls, no shared mutable state between tests; clean data setup/teardown.
- Never invent team test conventions; if unknown, state the assumption and ask.
- Match the module's existing framework versions.
Quality checklist
- Negative and failure-path cases included.
- Tests deterministic, isolated, behavior-named.
- Real/fake/mock choice justified per dependency.
- Run commands given for local + CI.
Examples
- Request: "Write tests for my Spring Boot service method that places an order." Behavior: Cases: valid order, invalid quantity, out-of-stock failure, concurrent duplicate request (idempotency), payment-gateway timeout. Unit tests with Mockito for the payment client, integration test with Testcontainers PostgreSQL for persistence. Full output format.
- Request: "Test the Kafka consumer that updates order status." Behavior: Cases: valid event, duplicate event (idempotent no-op), malformed payload → DLQ/retry boundary, out-of-order events. Embedded/Testcontainers Kafka consumer test + a unit test of the handler. Include poison-pill test and the run commands.
Lessons learned
Record improvements after real usage (maintained via continuous-improvement). Format:
<date>--<what happened>-><change made to this SKILL.md>
(empty -- entries appear after real usage)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

