Continuous testing runs application tests in the background during Quarkus Dev mode. When a source change triggers a live reload, it generally triggers another test run if continuous testing is enabled. You can keep working with the development application while the tests run: they use a separate class loader and an isolated application instance within the same JVM. section 3.5
To try it with an existing test:
- With Dev mode running, press `r` in its terminal to start continuous testing. To enable it at application start instead, set `quarkus.test.continuous-testing=enabled`. section 3.5.1
- Change the response returned by `/hello`, either in the resource or through `application.properties`, and save the file. The test reruns immediately; check the terminal status line for a pass or a failure report. section 3.5.1
Listing 3.9 Source code for a simple test
@Test
void testHelloEndpoint() {
given()
.when().get("/hello")
.then()
.statusCode(200)
.body(is("Hello from Quarkus REST"));
}
The example uses RestAssured to send `GET /hello` and assert both HTTP 200 and the expected greeting. Changing that greeting makes the next automatic test run a visible check on the edit. section 3.5.1
Results also appear in Dev UI. The first run after starting Dev mode can take longer than subsequent runs; continuous testing does not require you to wait for a run to finish before interacting with the development application. section 3.5.1 section 3.7
