.agents/skills/writing-tests/SKILL.md
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)
.addAsResource("application.properties"));
@Test
void testFeature() {
// test with RestAssured or similar
}
# 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
@QuarkusTest in deployment module tests — use QuarkusExtensionTestintegration-tests/, not in extension modules.github/native-tests.json