Skip to content

jabrena/plinth / skills/422-frameworks-quarkus-testing-integration-tests

422-frameworks-quarkus-testing-integration-tests

Verified

Use when you need to write or improve integration tests for Quarkus — including @QuarkusTest, Dev Services for automatic container provisioning, Testcontainers via QuarkusTestResourceLifecycleManager, WireMock for external HTTP stubs, @QuarkusIntegrationTest for black-box testing against packaged artifacts, REST Assured, data isolation strategies (@TestTransaction vs @BeforeEach cleanup), and Maven Surefire/Failsafe three-tier split (*Test, *IT, *AT). This should trigger for requests such as Add or improve integration tests in a Quarkus project; Configure Testcontainers or Dev Services for Quarkus tests; Add WireMock stubs for external HTTP dependencies in Quarkus integration tests; Set up @QuarkusIntegrationTest for packaged artifact or native binary testing; Fix test data isolation or configure Maven Surefire/Failsafe split. Part of Plinth Toolkit

references/422-frameworks-quarkus-testing-integration-tests.md

View on GitHub
---
name: 422-frameworks-quarkus-testing-integration-tests
description: Use when you need to write or improve integration tests for Quarkus — including @QuarkusTest, Dev Services for databases and messaging, Testcontainers when Dev Services are insufficient, @QuarkusIntegrationTest for black-box tests, REST Assured against @TestHTTPManager, persistence with @Transactional rollback, and clear separation of *IT tests in Failsafe.
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Quarkus Integration Testing

## Role

You are a Senior software engineer with extensive experience in Quarkus integration testing

## Goal

Integration tests in Quarkus validate real wiring: CDI, persistence, HTTP stack, and extensions. Use `@QuarkusTest` for in-JVM integration (default continuous testing friendly). Prefer **Dev Services** to provision databases, Kafka, and similar locally and in CI without manual Docker compose. When you need explicit containers, use Testcontainers with Quarkus configuration (`%test.quarkus.datasource.*` or `QuarkusTestResource`). Black-box tests against a running app use `@QuarkusIntegrationTest`. Keep tests independent and use `@Transactional` rollback on persistence tests when appropriate.

**Choosing test infrastructure (Quarkus — not Spring Boot)**:
- **Dev Services** — Default for PostgreSQL, Kafka, Redis, and other stacks where the Quarkus extension can auto-provision containers via `%test`. Minimal code; pin Docker image tags in `%test` configuration for reproducible CI.
- **`QuarkusTestResourceLifecycleManager`** — Use when Dev Services cannot model the scenario: custom init scripts, multi-container topologies, third-party images without Dev Services support, **WireMock**, or any case where you must return property overrides from `start()` before the application boots. Do not use `System.setProperty` in `@BeforeEach` for datasource or broker URLs.
- **Do not apply Spring Boot Testcontainers wiring here** — `@ServiceConnection`, `@DynamicPropertySource`, and `@ImportTestcontainers` belong to `@322-frameworks-spring-boot-testing-integration-tests`. Quarkus uses Dev Services, `%test` properties, and `@QuarkusTestResource` / `QuarkusTestResourceLifecycleManager` instead.

**Shared integration infrastructure**: When multiple `*IT` classes share the same `@QuarkusTest` profile, Dev Services or `@QuarkusTestResource` registrations, and REST Assured defaults, implement an **abstract** `BaseIntegrationTest` first under `src/test/java/{root-package}/`, then concrete `*IT` classes that extend it. This mirrors `BaseAcceptanceTest` in `@423-frameworks-quarkus-testing-acceptance-tests`. One-off tests can remain standalone; add a base when setup would be duplicated across several classes.

## Constraints

Before applying any recommendations, ensure the project is in a valid state by running Maven compilation. Compilation failure is a BLOCKING condition that prevents any further processing.

- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change
- **PREREQUISITE**: Project must compile successfully and pass basic validation checks before any test refactoring
- **CRITICAL SAFETY**: If compilation fails, IMMEDIATELY STOP and DO NOT CONTINUE with any recommendations
- **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding with integration test changes
- **NO EXCEPTIONS**: Under no circumstances should testing recommendations be applied to a project that fails to compile
- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements

## Examples

### Table of contents

- Example 1: HTTP integration
- Example 2: Persistence test rollback
- Example 3: Dev Services for automatic test infrastructure
- Example 4: Testcontainers via QuarkusTestResourceLifecycleManager
- Example 5: WireMock for external HTTP service stubs
- Example 6: @QuarkusIntegrationTest for packaged artifact validation
- Example 7: Data isolation strategies
- Example 8: Test naming conventions and Maven build split
- Example 9: Abstract BaseIntegrationTest, then concrete *IT classes

### Example 1: HTTP integration

Title: @QuarkusTest + REST Assured
Description: Boot the application in test mode and call HTTP endpoints with REST Assured.

**Good example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
class HelloResourceIT {

    @Test
    void hello() {
        given()
            .when().get("/hello")
            .then()
            .statusCode(200)
            .body(is("hello"));
    }
}
```

**Bad example:**

```java
@QuarkusTest
class HelloResourceIT {
    @Test
    void hello() {
        // Bad: calling resource methods directly — bypasses filters, serialization, routing
    }
}
```

### Example 2: Persistence test rollback

Title: @Transactional on test method
Description: Annotate test methods with `@Transactional` to roll back database changes and keep tests isolated.

**Good example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import jakarta.transaction.Transactional;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

@QuarkusTest
class BookRepositoryIT {

    @Inject
    BookRepository books;

    @Test
    @Transactional
    void persistsAndRollsBack() {
        books.persist(new Book());
        assertThat(books.count()).isPositive();
    }
}
```

**Bad example:**

```java
// Bad: assumes empty database and never cleans up — breaks parallel CI
@Test
void persists() {
    books.persist(new Book());
    assertThat(books.count()).isEqualTo(1);
}
```

### Example 3: Dev Services for automatic test infrastructure

Title: Let Quarkus spin up containers automatically — no manual Docker Compose
Description: Quarkus Dev Services provision real Docker containers (PostgreSQL, Kafka, Redis, and more) automatically when a datasource or extension is configured and no running service is detected. Enable them in `application.properties` with `%test` profile overrides. Prefer Dev Services over manual Testcontainers boilerplate for standard infrastructure. Pin the Docker image tag to keep CI reproducible.

**Good example:**

```properties
# src/main/resources/application.properties

# Production datasource (points to real DB)
quarkus.datasource.db-kind=postgresql
quarkus.datasource.jdbc.url=${DATABASE_URL}

# Test profile: Dev Services provisions a PostgreSQL container automatically
%test.quarkus.datasource.devservices.enabled=true
%test.quarkus.datasource.devservices.image-name=postgres:16-alpine
%test.quarkus.hibernate-orm.database.generation=drop-and-create
```

**Bad example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;

// Bad: no Dev Services config — test relies on a developer's locally running PostgreSQL;
// breaks on CI and on team members with different local setups
@QuarkusTest
class BookRepositoryIT {

    @Test
    void countBooks() {
        given()
            .when().get("/books/count")
            .then()
                .statusCode(200); // may fail because no DB is running
    }
}
```

### Example 4: Testcontainers via QuarkusTestResourceLifecycleManager

Title: Pin images, run init scripts, and wire properties when Dev Services do not suffice
Description: Use `QuarkusTestResourceLifecycleManager` when you need containers with custom initialization scripts, pinned schemas, multi-service topologies, or third-party containers that Dev Services do not support. Implement `start()` to launch the container and return a `Map` of Quarkus property overrides; implement `stop()` to terminate it. Annotate the test class with `@QuarkusTestResource`.

**Good example:**

```java
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.PostgreSQLContainer;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;

// Lifecycle manager: starts the container and returns property overrides
public class PostgreSQLTestResource implements QuarkusTestResourceLifecycleManager {

    private PostgreSQLContainer<?> postgres;

    @Override
    public Map<String, String> start() {
        postgres = new PostgreSQLContainer<>("postgres:16-alpine")
            .withInitScript("db/init-schema.sql"); // custom init script
        postgres.start();
        return Map.of(
            "quarkus.datasource.jdbc.url",  postgres.getJdbcUrl(),
            "quarkus.datasource.username",  postgres.getUsername(),
            "quarkus.datasource.password",  postgres.getPassword()
        );
    }

    @Override
    public void stop() {
        if (postgres != null) {
            postgres.stop();
        }
    }
}

@QuarkusTest
@QuarkusTestResource(PostgreSQLTestResource.class)
class OrderRepositoryIT {

    @Inject
    OrderRepository orders;

    @Test
    void savesAndRetrievesOrder() {
        var order = new Order(42L, "SKU-A", 2);
        orders.persist(order);

        assertThat(orders.findByCustomerId(42L)).hasSize(1);
    }
}
```

**Bad example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.PostgreSQLContainer;

@QuarkusTest
class OrderRepositoryIT {

    // Bad: static container managed outside Quarkus lifecycle —
    // Quarkus starts before BeforeAll runs, so the container URL
    // is not available when Quarkus configures its datasource
    static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:16-alpine");

    @BeforeAll
    static void startContainer() {
        postgres.start(); // too late — Quarkus already chose its datasource config
        System.setProperty("quarkus.datasource.jdbc.url", postgres.getJdbcUrl());
    }

    @AfterAll
    static void stopContainer() {
        postgres.stop();
    }

    @Test
    void savesOrder() { }
}
```

### Example 5: WireMock for external HTTP service stubs

Title: Stub outbound REST calls with QuarkusTestResourceLifecycleManager
Description: When the application calls external REST APIs, register a WireMock server as a `QuarkusTestResourceLifecycleManager` to stub those endpoints. Return the WireMock base URL as a property override so the application's REST client points at the stub instead of the real service. Verify call counts and request bodies after the act step to confirm the application's outbound contract.

**Good example:**

```java
import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import java.util.Map;
import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
import static org.assertj.core.api.Assertions.assertThat;

public class PaymentWireMockResource implements QuarkusTestResourceLifecycleManager {

    static WireMockServer wireMockServer;

    @Override
    public Map<String, String> start() {
        wireMockServer = new WireMockServer(options().dynamicPort());
        wireMockServer.start();
        WireMock.configureFor(wireMockServer.port());
        stubFor(post(urlEqualTo("/api/charge"))
            .willReturn(aResponse()
                .withStatus(200)
                .withHeader("Content-Type", "application/json")
                .withBody("{\"charged\":true,\"transactionId\":\"txn-123\"}")));
        return Map.of("payment.api.base-url", wireMockServer.baseUrl());
    }

    @Override
    public void stop() {
        if (wireMockServer != null) {
            wireMockServer.stop();
        }
    }
}

@QuarkusTest
@QuarkusTestResource(PaymentWireMockResource.class)
class PaymentServiceIT {

    @Inject
    PaymentService paymentService;

    @Test
    void placeOrder_chargesPaymentGateway() {
        // When
        boolean charged = paymentService.charge(1L, 99.0);

        // Then — application charged successfully
        assertThat(charged).isTrue();
        // Verify outbound call was made with correct path
        PaymentWireMockResource.wireMockServer.verify(
            postRequestedFor(urlEqualTo("/api/charge")));
    }
}
```

**Bad example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.mockito.InjectMock;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.when;
import static org.assertj.core.api.Assertions.assertThat;

@QuarkusTest
class PaymentServiceIT {

    // Bad: @InjectMock replaces the REST client with a Mockito mock —
    // the actual HTTP client configuration, headers, retries, and serialization
    // are never exercised; this is a unit test, not an integration test
    @InjectMock
    PaymentGatewayClient paymentGatewayClient;

    @Inject
    PaymentService paymentService;

    @Test
    void placeOrder_chargesPaymentGateway() {
        when(paymentGatewayClient.charge(1L, 99.0)).thenReturn(true);
        assertThat(paymentService.charge(1L, 99.0)).isTrue();
        // HTTP plumbing never tested
    }
}
```

### Example 6: @QuarkusIntegrationTest for packaged artifact validation

Title: Black-box tests run against the built JAR or native binary
Description: `@QuarkusIntegrationTest` runs test methods against the packaged application (JAR or native binary) started by the Failsafe lifecycle. The test does not have access to CDI beans or internal state — it is purely black-box. Use it to validate that the built artifact starts, responds to health probes, and handles key HTTP flows. Run it after `mvn package` in CI.

**Good example:**

```java
import io.quarkus.test.junit.QuarkusIntegrationTest;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;

// Runs against the packaged JAR or native binary — purely black-box HTTP assertions
@QuarkusIntegrationTest
class ApplicationHealthIT {

    @Test
    void healthEndpointReturnsUp() {
        given()
            .when().get("/q/health")
            .then()
                .statusCode(200)
                .body("status", equalTo("UP"));
    }

    @Test
    void livenessProbeReturnsUp() {
        given()
            .when().get("/q/health/live")
            .then()
                .statusCode(200)
                .body("status", equalTo("UP"));
    }

    @Test
    void readinessProbeReturnsUp() {
        given()
            .when().get("/q/health/ready")
            .then()
                .statusCode(200)
                .body("status", equalTo("UP"));
    }
}
```

**Bad example:**

```java
import io.quarkus.test.junit.QuarkusIntegrationTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

// Bad: @Inject inside @QuarkusIntegrationTest is not supported —
// CDI beans are not accessible in a black-box test against a packaged artifact;
// use @QuarkusTest if you need CDI injection
@QuarkusIntegrationTest
class BookServiceIT {

    @Inject // ← fails at runtime — CDI context not available
    BookService bookService;

    @Test
    void shouldFindBook() {
        assertThat(bookService.findById(1L)).isNotNull();
    }
}
```

### Example 7: Data isolation strategies

Title: @TestTransaction for automatic rollback; @BeforeEach cleanup for HTTP-driven flows
Description: Choose the isolation strategy that matches the test scenario. `@TestTransaction` wraps the test in a transaction that rolls back automatically — ideal for Panache repository tests. Explicit `@BeforeEach` cleanup (wrapped in `@Transactional`) is better when the test exercises HTTP endpoints that manage their own transactions internally and therefore cannot be rolled back from the test method.

**Good example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.TestTransaction;
import jakarta.inject.Inject;
import jakarta.transaction.Transactional;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.equalTo;

@QuarkusTest
class BookIT {

    @Inject
    BookRepository books;

    // Strategy 1: @TestTransaction — rolls back after each test
    // Use for direct repository tests where no HTTP transaction is involved
    @Nested
    class RepositoryTests {

        @Test
        @TestTransaction
        void persistsBook() {
            var book = new Book("Quarkus Guide", "Jane");
            books.persist(book);

            assertThat(book.id).isNotNull();
            assertThat(books.count()).isPositive();
            // rolled back automatically after test
        }
    }

    // Strategy 2: Explicit @BeforeEach cleanup
    // Use when the test exercises HTTP endpoints that commit their own transactions
    @Nested
    class HttpTests {

        @BeforeEach
        @Transactional
        void cleanDatabase() {
            books.deleteAll(); // ensure a known empty state before each test
        }

        @Test
        void createBook_returns201AndPersists() {
            given()
                .contentType("application/json")
                .body("""{"title":"New Book","author":"Alice"}""")
                .when().post("/books")
                .then()
                    .statusCode(201);

            assertThat(books.count()).isEqualTo(1L);
        }
    }
}
```

**Bad example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

// Bad: no isolation — second test assumes the row created by the first still exists;
// tests are order-dependent and break when run in parallel
@QuarkusTest
class BookIT {

    @Inject
    BookRepository books;

    private static Long savedId;

    @Test
    void testA_createBook() {
        var book = new Book("Quarkus Guide", "Jane");
        books.persist(book); // committed — stays in DB for all subsequent tests
        savedId = book.id;
    }

    @Test
    void testB_findBook() {
        // Bad: depends on testA having run first; fails if test order changes
        assertThat(books.findById(savedId)).isNotNull();
    }
}
```

### Example 8: Test naming conventions and Maven build split

Title: *Test / *Tests for Surefire; *IT and *AT for Failsafe — same pattern as other Java Enterprise prompts
Description: Use suffix conventions that Maven Surefire and Failsafe recognise out of the box: `*Test` / `*Tests` for fast unit tests (Surefire, `test` phase); `*IT` for integration tests with `@QuarkusTest`, Dev Services, or Testcontainers (Failsafe, `integration-test` / `verify`); `*AT` for acceptance / Gherkin-driven full-stack tests (also Failsafe). Quarkus classes that start Docker via Dev Services or `@QuarkusTestResource` should not use the `*Test` suffix — name them `*IT` or `*AT` so they are excluded from the fast Surefire pass. Configure both plugins with explicit `<includes>` and Surefire `<excludes>` for `*IT` and `*AT` to prevent double execution.

**Good example:**

```xml
<build>
    <plugins>

        <!-- Surefire: fast unit tests (*Test, *Tests) — "test" phase -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.5.5</version>
            <configuration>
                <includes>
                    <include>**/*Test.java</include>
                    <include>**/*Tests.java</include>
                </includes>
                <excludes>
                    <exclude>**/*IT.java</exclude>
                    <exclude>**/*AT.java</exclude>
                </excludes>
            </configuration>
        </plugin>

        <!-- Failsafe: integration (*IT) and acceptance (*AT) — "integration-test" + "verify" phases -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>3.5.5</version>
            <configuration>
                <includes>
                    <include>**/*IT.java</include>
                    <include>**/*AT.java</include>
                </includes>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

    </plugins>
</build>
<!--
    mvn test    → Surefire: *Test, *Tests only (fast)
    mvn verify  → Surefire: *Test, *Tests  +  Failsafe: *IT, *AT (full safety net, Dev Services / Testcontainers)
-->
```

**Bad example:**

```java
// File: src/test/java/com/example/BookRepositoryTest.java
// Bad: @QuarkusTest with Dev Services named *Test — Surefire runs it during "mvn test",
// triggering Docker container startup in the fast unit-test phase.
// Container startup adds 5–10 s to every local compile-test cycle.

import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.TestTransaction;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

@QuarkusTest                      // ← needs Dev Services (Docker) — wrong phase for *Test
class BookRepositoryTest {        // ← should be BookRepositoryIT

    @Inject BookRepository books;

    @Test
    @TestTransaction
    void persistsBook() {
        books.persist(new Book("Guide", "Jane"));
        assertThat(books.count()).isPositive();
    }
}
```


### Example 9: Abstract BaseIntegrationTest, then concrete *IT classes

Title: Share @QuarkusTest, test resources, and REST Assured base URI
Description: **Workflow**: (1) Define `abstract class BaseIntegrationTest` with `@QuarkusTest`, shared `@QuarkusTestResource` annotations (Testcontainers, WireMock lifecycle managers), `%test` configuration patterns, and any `@BeforeEach` reset (for example `wireMockServer.resetAll()`). (2) Add concrete `*IT` classes extending the base with feature-specific `@Test` methods. Prefer a base when several integration tests repeat the same Quarkus test bootstrap; keep slice-style or radically different profiles as separate hierarchies or standalone classes.

**Good example:**

```java
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public abstract class BaseIntegrationTest {
    // Shared @QuarkusTestResource, @TestHTTPManager, or helpers used by all ITs in this suite
}

class HelloResourceIT extends BaseIntegrationTest {

    @Test
    void hello() {
        given().when().get("/hello").then().statusCode(200).body(is("hello"));
    }
}
```

**Bad example:**

```java
// Bad: every *IT repeats the same @QuarkusTest + identical @QuarkusTestResource
// list — extract BaseIntegrationTest and extend it.
```


## Output Format

- **ANALYZE** integration tests: scope vs unit overlap, whether Dev Services suffices or `QuarkusTestResourceLifecycleManager` is required (and that Spring Boot `@ServiceConnection` does not apply), HTTP assertion quality, data isolation strategy, naming conventions, container lifecycle efficiency, and whether duplicated Quarkus test setup should become an abstract `BaseIntegrationTest`
- **CATEGORIZE** findings by impact (FLAKINESS for shared state or order-dependent tests, SPEED for per-method containers or missing Dev Services, CLARITY for missing assertions or vague test names)
- **APPLY** improvements: enable Dev Services for standard infrastructure, introduce `QuarkusTestResourceLifecycleManager` for custom containers or WireMock stubs, add `@TestTransaction` or `@BeforeEach` cleanup for data isolation, use REST Assured for HTTP assertions, add `@QuarkusIntegrationTest` for packaged artifact validation
- **IMPLEMENT** incrementally; keep `mvn verify` green after each step; align test class suffixes (`*Test` / `*Tests` for Surefire, `*IT` / `*AT` for Failsafe) and configure both Maven plugins explicitly; when several `*IT` classes share bootstrap, **define an abstract `BaseIntegrationTest` first**, then concrete subclasses (same layering as `BaseAcceptanceTest` in `@423-frameworks-quarkus-testing-acceptance-tests`)
- **EXPLAIN** when to use `@421-frameworks-quarkus-testing-unit-tests` vs `@QuarkusTest` vs `@QuarkusIntegrationTest` if concerns are being mixed
- **VALIDATE** with `./mvnw compile` before and `./mvnw clean verify` after substantive test changes


## Safeguards

- **BLOCKING SAFETY CHECK**: Run `./mvnw compile` or `mvn compile` before ANY integration test refactoring — compilation failure is a HARD STOP
- **CRITICAL VALIDATION**: Run `./mvnw clean verify` after changes to confirm both Surefire unit tests and Failsafe integration tests pass
- **DOCKER**: Dev Services and Testcontainers require Docker (or a compatible OCI runtime) in CI — document this prerequisite in the project README and gate CI jobs accordingly
- **DATA SAFETY**: Never point integration tests at production or shared developer databases; always use isolated Dev Services containers or explicit `QuarkusTestResourceLifecycleManager` containers
- **TEST PROFILE RESTARTS**: Each distinct `@QuarkusTestProfile` triggers a Quarkus application restart — consolidate config overrides across test classes to minimize restart overhead and total test runtime
- **INCREMENTAL SAFETY**: Add or refactor one integration test class at a time; verify isolation and naming conventions (`*IT` / `*AT` for Failsafe) before moving to the next change
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall