@@ -250,18 +250,24 @@ If such test needs access to an `MBeanServer`, consider marking it dirty as well
250
250
251
251
include::code:MyJmxTests[]
252
252
253
+
254
+
253
255
[[features.testing.spring-boot-applications.metrics]]
254
256
==== Using Metrics
255
257
Regardless of your classpath, meter registries, except the in-memory backed, are not auto-configured when using `@SpringBootTest`.
256
258
257
259
If you need to export metrics to a different backend as part of an integration test, annotate it with `@AutoConfigureObservability`.
258
260
261
+
262
+
259
263
[[features.testing.spring-boot-applications.tracing]]
260
264
==== Using Tracing
261
265
Regardless of your classpath, tracing is not auto-configured when using `@SpringBootTest`.
262
266
263
267
If you need tracing as part of an integration test, annotate it with `@AutoConfigureObservability`.
264
268
269
+
270
+
265
271
[[features.testing.spring-boot-applications.mocking-beans]]
266
272
==== Mocking and Spying Beans
267
273
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
280
286
To use this feature with a different arrangement, listeners must be explicitly added, as shown in the following example:
281
287
282
288
include::code:listener/MyTests[]
283
-
284
289
====
285
290
286
291
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
493
498
include::code:GraphQlIntegrationTests[]
494
499
495
500
501
+
496
502
[[features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra]]
497
503
==== Auto-configured Data Cassandra Tests
498
504
You can use `@DataCassandraTest` to test Cassandra applications.
0 commit comments