ワンクリックで
writing-tests
Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
How to build, preview, and verify Quarkus documentation locally: root Maven build, docs rebuild, Jekyll preview via Podman/Docker.
Quarkus code style conventions: formatting, visibility, naming, logging, and general style rules for the Quarkus codebase.
How to add a Dev UI page to a Quarkus extension: deployment processors, runtime-dev JSON-RPC services, and Lit web components.
How to build and test Quarkus: Maven commands, build flags, incremental builds, justfile aliases, and important build rules.
Rules for preparing pull requests and commits in the Quarkus project: title conventions, description format, commit hygiene, labels, and contribution policies.
Quarkus split classloading model, runtime-dev module wiring, conditional dependencies, and common classloading mistakes.
| name | writing-tests |
| description | Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests. |
Quarkus uses JUnit 5 with custom extensions. Tests and documentation are mandatory for contributions.
@QuarkusTest — Starts a full Quarkus application. Use for integration
tests in integration-tests/.@QuarkusIntegrationTest — Tests against a built artifact (JAR or native
binary). In the main repo, most run only with -Dnative.@RegisterExtension)QuarkusExtensionTest — Used in deployment module tests. Creates a
synthetic application defined in the test. This is the primary way to test
build-time behavior. Replaces the deprecated QuarkusUnitTest.QuarkusDevModeTest — Tests hot reload / dev mode behavior.extensions/<name>/deployment/src/test/integration-tests/QuarkusExtensionTest, NOT @QuarkusTest@RegisterExtension
static final QuarkusExtensionTest config = new QuarkusExtensionTest()
.withApplicationRoot((jar) -> jar
.addClasses(MyResource.class, MyService.class));
@Test
void testFeature() {
// test with RestAssured or similar
}
If the tests have to set Quarkus configuration, then using QuarkusExtensionTest#overrideConfigKey for build time configuration and QuarkusExtensionTest#overrideRuntimeConfigKey for runtime configuration is preferable.
# Run tests for an extension
./mvnw verify -f extensions/<name>/
# Run a single test class
./mvnw test -f integration-tests/<name>/ -Dtest=MyTest
# Run a single test method
./mvnw verify -Dtest=fully.qualified.ClassName#methodName
# Native integration tests
./mvnw verify -f integration-tests/<name>/ -Dnative
Native tests are split into parallel categories for CI performance. Each new
integration test module must be registered in .github/native-tests.json
to have its native tests run in CI. Without this, -Dnative tests will not
execute for the module.
Note: @QuarkusIntegrationTest tests in the main repo only run when
-Dnative is passed — even verify with -DskipITs=false will not
trigger them.
The tcks/ module contains MicroProfile TCK tests (Config, JWT, Fault
Tolerance, Health, Metrics, OpenAPI, Telemetry, REST Client, Reactive
Messaging, Context Propagation). If your work touches any of these areas,
run the TCKs:
# Run all TCKs
./mvnw verify -f tcks/ -Ptcks
# Run a specific TCK
./mvnw verify -f tcks/<area>/ -Ptcks
org.assertj.core.api.Assertions.assertThat) over JUnit 5
assertions (org.junit.jupiter.api.Assertions). AssertJ provides fluent,
readable assertions and better failure messages.@QuarkusTest in deployment module tests — use QuarkusExtensionTestintegration-tests/, not in extension modules.github/native-tests.jsonnever trust a test you haven't seen fail adage