Package org.apache.juneau.microservice.test
package org.apache.juneau.microservice.test
JUnit 5 whole-microservice integration-test support — the
@SpringBootTest analog for the
standalone Juneau microservice.
@MicroserviceTest boots a whole
Microservice (config + lifecycle + embedded Jetty on an
ephemeral port) for a test class, composing the existing juneau-junit5
@TestBean mock-bean substrate for collaborator substitution and
resolving a RestClient bound to the booted server for tests.
Use it for genuine full-microservice integration tests (real server, connectors, lifecycle, over HTTP). For an
in-JVM single-@Rest-resource test, use MockRestClient directly.
- Since:
- 10.0.0
-
ClassDescriptionA
@Configurationthat supplies a JettyServerbound to an OS-assigned ephemeral port (port0) for use by@MicroserviceTest-driven integration tests.JUnit 5 extension behind@MicroserviceTest: boots a wholeMicroservice(config + lifecycle + embedded Jetty on an ephemeral port) for the test class, with@TestBeanmock-bean injection and convenience parameter resolution.Boots a wholeMicroservice(config + lifecycle + embedded Jetty server) for the annotated JUnit 5 test class — the standalone-microservice analog of Spring's@SpringBootTest.