With IBM Enterprise Build of Quarkus, you can continuously test your code changes as you develop your applications. Quarkus provides a continuous testing feature, which you can run immediately after you make and save a change to the code.

When you run continuous testing, testing is paused after you start the application. You can resume the testing as soon as the application starts. The Quarkus application determines which tests run so that tests are run only on code that has changed.

The continuous testing feature of Quarkus is enabled by default. You can choose to disable continuous testing by setting the quarkus.test.continuous-testing property in the src/main/resources/application.properties file to disabled.

Note: If you disabled continuous testing previously and want to enable it again, you must restart your Quarkus application before you can start testing.

Prerequisites
Procedure
  1. Start your Quarkus application.

    • If you created your Getting Started project by using the code.quarkus.ibm.com application or the Quarkus CLI, the Maven wrapper is provided when you generate the project. Enter the following command from your project directory:

      ./mvnw quarkus:dev

       

    • If you created your Getting Started project by using Apache Maven, which is installed on your machine, you can also choose the following command:

      mvn quarkus:dev

       

    • If you are running continuous testing in dev mode and are using the Quarkus CLI, enter the following command:

      quarkus dev

       

  2. View details of the testing status in the generated output log.

    Note: To view the output log, you might need to scroll to the bottom of the screen.

    • When continuous testing is enabled, the following message is displayed:

      Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>

       

    • When continuous testing is paused, the following message is displayed:

      Press [e] to edit command line args (currently ''), [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>

       

      Note: By default, when continuous testing is enabled, testing is paused after you start the application. To view the keyboard commands that are available for controlling how you run your tests, see Commands for controlling continuous testing.

  3. To start running the tests, press r on your keyboard.

  4. View the updated output log to monitor the test status and test results, check test statistics, and get guidance for follow-up actions. For example:

    All 2 tests are passing (0 skipped), 2 tests were run in 2094ms. Tests completed at 14:45:11.
    Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>

     

Verification
  1. Make a code change. For example, in a text editor, open the src/main/java/org/acme/quickstart/GreetingsResource.java file.

  2. Change the "hello" endpoint to return "Hello world" and save the file.

    import jakarta.ws.rs.GET;
    import jakarta.ws.rs.Path;
    import jakarta.ws.rs.Produces;
    import jakarta.ws.rs.core.MediaType;
    
    @Path("/hello")
    public class GreetingResource {
    
        @GET
        @Produces(MediaType.TEXT_PLAIN)
        public String hello() {
            return "Hello world";
        }
    }

     

  3. Verify that Quarkus immediately re-runs the test to test the changed code.

  4. View the output log to check the test results. In this example, the test checks whether the changed string contains the value "Hello from Quarkus REST". The test fails because the string was changed to "Hello world".

    2025-09-26 11:05:45,911 ERROR [io.qua.test] (Test runner thread) Test GreetingResourceTest#testHelloEndpoint() failed: java.lang.AssertionError: 1 expectation failed.
    Response body doesn't match expectation.
    Expected: is "Hello from Quarkus REST"
      Actual: Hello world
            at io.restassured.internal.ValidatableResponseOptionsImpl.body(ValidatableResponseOptionsImpl.java:238)
            at org.acme.quickstart.GreetingResourceTest.testHelloEndpoint(GreetingResourceTest.java:20)
    --
    1 test failed (1 passing, 0 skipped), 2 tests were run in 2076ms. Tests completed at 15:03:45.
    Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>

     

  5. To exit continuous testing, press Ctrl-C or q on your keyboard.

Note: If you change the value back to "Hello from Quarkus REST" again, the test automatically runs again.