Starting Continuous Testing

  1. Go back to the terminal and at the bottom of the screen you should see the following:

    testshere
  2. Press r to initate continuous testing. You should see the status change down the bottom of the screen as they are running, and it should finish with the following error:

    testshere
  3. This is because you changed the greeting in an earlier step. In GreetingResource, change Hola back to Hello (in the GreetingResource class) and the tests will run again automatically.

  4. Confirm all tests pass in the terminal:

    INFO  [io.qua.test] (Test runner thread) All tests are now passing
    --
    All 1 test is passing (0 skipped), 1 test was run in 351ms. Tests completed at 01:19:02 due to changes to GreetingResource.class.
    Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>
  5. Add a new test to the existing GreetingResourceTest.java class under the // add more tests marker that tests the /hello/greeting endpoint by copying this code below the existing test:

        @Test
        public void testGreetingEndpoint() {
            given()
              .pathParam("name", "quarkus")
              .when().get("/hello/greeting/{name}")
              .then()
                .statusCode(200)
                .body(startsWith("hello "));
        }
  6. You will see the new test result instantly in the terminal:

    --
    All 2 tests are passing (0 skipped), 2 tests were run in 401ms. Tests completed at 01:20:05 due to changes to GreetingResourceTest.class.
    Press [e] to edit command line args (currently ''), [r] to re-run, [o] Toggle test output, [:] for the terminal, [h] for more options>