testing-patterns
Skill2 starsChanged 11 months agoMITView on GitHub
REST integration testing patterns with JUnit 5, Mockito, RestAssured. Use when writing integration tests that mock external dependencies, use Testcontainers/H2 for databases, and test endpoints with raw JSON bodies.
47 other projects use a version of this.
Adopted by
Most recently taken up by
- AtilaMedeiros/skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- rajdeepbhattacharyya25-pixel/agents-for-antigravity-their own version, first seen Nov 15, 2026
- xsovad06/sovatheir own version, first seen Nov 14, 2026
- gopalparashar421/agent-skillstheir own version, first seen Nov 8, 2026
- soilmass/motion-design-agenttheir own version, first seen Nov 8, 2026
Used with
Projects with it also use intelligent-routing, bash-linux and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SKB3002Skillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 5 projects that use this
xenitV1Skillbash-linux
Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.
Also in 7 projects that use this
xenitV1Skillred-team-tactics
Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.
Also in 7 projects that use this
ChrisWilesSkillformik-patterns
Formik form handling with validation patterns. Use when building forms, implementing validation, or handling form submission.
Also in 3 projects that use this
SKB3002Skillnextjs-react-expert
React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.
Also in 3 projects that use this
adybaSkillsafe-workflow
SAFe Agentic Workflow orchestrator. Teaches the full SAFe methodology adapted for AI agents: pattern discovery, exit states, quality gates, agent personas, and specs-driven development. Use when setting up a project with SAFe workflow, understanding the multi-agent methodology, or coordinating work across agent personas. Triggers: "SAFe workflow", "agent workflow", "safe harness", "specs-driven", "exit states", "quality gates", "multi-agent workflow".
Also in 3 projects that use this
- +5 more from xenitV1
Other versions47 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 47
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- ChrisWiles/claude-code-showcase★ 6.1ksame name
- ag2ai/faststream★ 5.4ksame name
- piomin/claude-ai-spring-boot★ 1.4ksame name
- bybren-llc/safe-agentic-workflow★ 405same name
- dilolabs/nosia★ 211same name
- xenitV1/Antigravity-Workflows★ 130same name
- langchain-ai/skills-benchmarks★ 116same name
- leather-io/mono★ 29same name
37 more not listed
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 repository9 other files it gives its agents.
- cdd-design-pillarsSkill
- clean-code-principlesSkill
- ddd-da-massaSkill
- gof-design-patternsSkill
- lombok-patternsSkill
- mapstruct-patternsSkill
- quarkus-panache-smellsSkill
- refactoring-catalogSkill
- rest-api-designSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write integration tests for REST endpoints using Quarkus test framework.
- Distinctive: line 46
Use: Test full request/response cycle through REST layer
- Distinctive: line 58
Use: Test against real PostgreSQL/MySQL
- Distinctive: line 70
Use: Test with exact JSON payloads (no object serialization)
“Common” is measured: kept by at least 6 in 10 of the 31 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
REST Integration Testing Patterns
Write integration tests for REST endpoints using Quarkus test framework.
Quick Start
Basic REST integration test with RestAssured:
@QuarkusTest
class OrderResourceTest {
@Test
void shouldCreateOrder() {
given()
.contentType(ContentType.JSON)
.body("""
{
"customerId": "cust-123",
"items": [{"productId": "prod-1", "quantity": 2}]
}
""")
.when()
.post("/orders")
.then()
.statusCode(201)
.body("id", notNullValue())
.body("status", equalTo("PENDING"));
}
}Core Patterns
REST Integration Tests
Use: Test full request/response cycle through REST layer
Stack: @QuarkusTest + RestAssured
Cookbook: rest-integration-tests.md
Mocking External Dependencies
Use: Isolate tests from external HTTP services, queues, etc.
Stack: @InjectMock with Mockito
Cookbook: mocking-dependencies.md
Database with Testcontainers
Use: Test against real PostgreSQL/MySQL
Stack: Quarkus DevServices or @Testcontainers
Cookbook: testcontainers-setup.md
Database with H2
Use: Fast in-memory alternative when container not needed
Stack: H2 with test profile
Cookbook: h2-setup.md
Raw JSON Request Bodies
Use: Test with exact JSON payloads (no object serialization)
Stack: Text blocks + JsonPath assertions
Cookbook: json-request-bodies.md
Test Structure & Lifecycle
Use: Organize tests with JUnit 5 features
Stack: @Nested, @BeforeEach, naming conventions
Cookbook: test-structure.md
Quick Reference
| Pattern | When to Use | Key Annotation/Tool |
| REST Integration | Test endpoint behavior | @QuarkusTest |
| Mock Dependencies | Isolate from external services | @InjectMock |
| Testcontainers | Need real database behavior | DevServices / Container |
| H2 In-Memory | Fast tests, simple queries | %test profile |
| Raw JSON Bodies | Exact payload control | Text blocks |
| Nested Test Classes | Group related scenarios | @Nested |
Cookbook Index
Core Testing: REST Integration Tests · Test Structure
Dependencies: Mocking Dependencies
Database: Testcontainers Setup · H2 Setup
Request/Response: JSON Request Bodies
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.

