Quarkus Dev Services and Testing
Install this skill
No account required. Pick your tool, then copy.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install github-copilot-quarkus-dev-services-and-testingWhat this does: Quarkus Dev Services and testing: zero-config containers, @QuarkusTest, @QuarkusIntegrationTest, test resources, RestAssured, @InjectMock, profiles and continuous testing. Use when writing or fixing tests in a Quarkus project.
Manual setup by platform
Claude Code
~/.claude/skills/github-copilot-quarkus-dev-services-and-testing/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Instructions
Quarkus Dev Services and Testing
Check the project's Quarkus version first. Framework-neutral Testcontainers usage can use the optional java-testcontainers skill if installed (otherwise see https://java.testcontainers.org/); this skill covers only Quarkus-specific features.
Dev Services
In dev and test modes Quarkus starts containers (PostgreSQL, MySQL, Kafka, Redis, Keycloak, ...) automatically when the related extension is present and no connection is configured (Docker or Podman required).
# Global switch
quarkus.devservices.enabled=true
%dev.quarkus.datasource.devservices.image-name=postgres:17
# Reuse container across restarts (also requires testcontainers.reuse.enable=true in ~/.testcontainers.properties)
quarkus.datasource.devservices.reuse=true
# Fixed port (optional)
quarkus.datasource.devservices.port=5432
# Share between apps in dev mode
quarkus.kafka.devservices.shared=true
Disable one with quarkus.<ext>.devservices.enabled=false; configuring a URL/host explicitly also disables it. Dev UI (/q/dev-ui) lists running services.
Tests
@QuarkusTest
class GreetingResourceTest {
@Test
void hello() {
given().when().get("/hello").then().statusCode(200).body(is("Hello"));
}
}
Dependencies, test scope: io.quarkus:quarkus-junit (3.31+, what the 3.40 template generates) or quarkus-junit5 (3.27 template; still published and resolvable on 3.40) and io.rest-assured:rest-assured. Keep whichever the project already uses.
- Inject beans in tests with
@Inject; mock CDI beans withio.quarkus.test.InjectMock(quarkus-junit-mockito, formerlyquarkus-junit5-mockito; verified mocking aPanacheRepositorybean on 3.40.1). - Security:
@TestSecurity(user="alice", roles="admin")(quarkus-test-security). - Profiles:
@TestProfile(MyProfile.class)withQuarkusTestProfile#getConfigOverrides(); restarts the app, so use sparingly. - Transactions:
@TestTransactionrolls back after the test. @QuarkusIntegrationTestruns against the packaged artifact (jar, native binary or container); you cannot inject beans there, only call it over HTTP.
Test resources
public class WireMockResource implements QuarkusTestResourceLifecycleManager {
public Map<String,String> start() { /* start, return config overrides */ return Map.of(); }
public void stop() { }
}
@QuarkusTest
@WithTestResource(WireMockResource.class) // io.quarkus.test.common.WithTestResource
class MyTest { }
@WithTestResource (verified on 3.40.1) applies to the annotated test class; Quarkus restarts the app when the set of resources changes. The older @QuarkusTestResource still compiles and runs on 3.40.1 but applies globally to all tests unless restrictToAnnotatedClass = true. Do not put @ConfigProperty injection points for resource-supplied values in a test class: test classes are scanned as beans, and the app fails to start for other test classes that lack the resource. Prefer Dev Services over custom resources when an extension supports it.
Running
./mvnw test # unit/@QuarkusTest
./mvnw verify -DskipITs=false # also runs *IT via maven-failsafe-plugin
Gotcha: *IT classes (@QuarkusIntegrationTest) are run by Failsafe in the verify phase, and need the quarkus-maven-plugin build goal and the failsafe config (with java.util.logging.manager and maven.home system properties) generated by the project template. ./mvnw test silently skips them, and the 3.27 and 3.40 templates also set <skipITs>true</skipITs>, so plain ./mvnw verify skips them too (verified): pass -DskipITs=false (or -Dnative, whose profile flips it). With -Dnative and a container build on macOS or Windows, the binary is a Linux ELF and the IT fails with Exit code is: '126'; use a local Mandrel/GraalVM build for those.
Continuous testing: run ./mvnw quarkus:dev and press r to start or re-run tests and p to pause them (h lists the hotkeys); once running, tests re-run on code changes (quarkus.test.continuous-testing=enabled|paused|disabled).
Verified on Quarkus 3.40.1 (JDK 26, Docker Desktop): @QuarkusTest with Dev Services PostgreSQL (postgres:18 by default), @TestTransaction, @TestProfile, @TestSecurity, @InjectMock, *IT via Failsafe. @QuarkusTest and Dev Services on 3.27.6 as well.
Checklist
- Use Dev Services before writing a custom resource.
- Keep
@QuarkusTestclasses sharing the same profile/resources to avoid restarts. - Do not hard-code ports; RestAssured uses
quarkus.http.test-portautomatically.
See also: https://quarkus.io/guides/dev-services, https://quarkus.io/guides/getting-started-testing; for upgrades use quarkus update (https://quarkus.io/guides/update-quarkus).
Security
Reviews (0)
Related skills
Browse all →More from GitHub Copilot
View source →More Build skills
Browse category →You might also like
- GuideGitHub Copilot Browser Tools Are GA: AI Agents Now Verify Their Own Front-End WorkAs of July 1, 2026, GitHub Copilot's browser tools hit general availability in VS Code — letting AI coding agents drive a real browser to verify their own front-end changes. Here's what changed, how it works, and how to apply the same pattern in Claude Code and Cursor.7 min read
- GuideKimi K2.7 Code in GitHub Copilot: The First Open-Weight Model in a Mainstream AI Coding AssistantMoonshot AI's Kimi K2.7 Code landed in GitHub Copilot on July 1 — the first open-weight model in the five-lab model picker. MIT-licensed weights on Hugging Face, hosted on Azure, billed at GPT-5.4 mini tier pricing. Here's what it means for your workflow.7 min read
- GuideGitHub Copilot AI Credits: First-Week Reality Check (June 2026)On June 1, GitHub Copilot dropped flat-rate billing and switched to token-based AI Credits. One week in: some developers report bills jumping from $29 to $750/month. Here's the math, who gets hit hardest, and how to stay in budget.8 min read
Frequently asked questions about quarkus-dev-services-and-testing
What does the quarkus-dev-services-and-testing skill do?
Quarkus Dev Services and testing: zero-config containers, @QuarkusTest, @QuarkusIntegrationTest, test resources, RestAssured, @InjectMock, profiles and continuous testing. Use when writing or fixing tests in a Quarkus project. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the quarkus-dev-services-and-testing skill?
Run `npx @skills-hub-ai/cli install github-copilot-quarkus-dev-services-and-testing` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/github-copilot-quarkus-dev-services-and-testing/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does quarkus-dev-services-and-testing work with?
quarkus-dev-services-and-testing runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the quarkus-dev-services-and-testing skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use quarkus-dev-services-and-testing after installing it?
In Claude Code, type `/github-copilot-quarkus-dev-services-and-testing` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the quarkus-dev-services-and-testing skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.