From e19aa818136c103e59b70fee47c21e6cb5579cc3 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 21 Apr 2023 23:18:44 -0700 Subject: [PATCH] Polish formatting --- .../src/docs/asciidoc/features/testing.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc index 21c2c10e97..0c5724ef87 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc @@ -250,18 +250,24 @@ If such test needs access to an `MBeanServer`, consider marking it dirty as well include::code:MyJmxTests[] + + [[features.testing.spring-boot-applications.metrics]] ==== Using Metrics Regardless of your classpath, meter registries, except the in-memory backed, are not auto-configured when using `@SpringBootTest`. If you need to export metrics to a different backend as part of an integration test, annotate it with `@AutoConfigureObservability`. + + [[features.testing.spring-boot-applications.tracing]] ==== Using Tracing Regardless of your classpath, tracing is not auto-configured when using `@SpringBootTest`. If you need tracing as part of an integration test, annotate it with `@AutoConfigureObservability`. + + [[features.testing.spring-boot-applications.mocking-beans]] ==== Mocking and Spying Beans When running tests, it is sometimes necessary to mock certain components within your application context. @@ -280,7 +286,6 @@ If your test uses one of Spring Boot's test annotations (such as `@SpringBootTes To use this feature with a different arrangement, listeners must be explicitly added, as shown in the following example: include::code:listener/MyTests[] - ==== The following example replaces an existing `RemoteService` bean with a mock implementation: @@ -493,6 +498,7 @@ When a MOCK environment is configured, you can also request an `HttpGraphQlTeste include::code:GraphQlIntegrationTests[] + [[features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra]] ==== Auto-configured Data Cassandra Tests You can use `@DataCassandraTest` to test Cassandra applications.