Spring Test Profiler Report

Understanding when and how many Spring ApplicationContexts are created in your test suite allows you to optimize build times by leveraging Spring TestContext's context caching feature, which reuses already started contexts.


Generated at: 2025-09-23 02:01:39

โ–ถ Understanding Spring TestContext Context Caching

Click to learn about Spring TestContext context caching principles and optimization tips

Test Execution Summary

Executed via: maven
Execution Time: 2025-09-23 02:01:39
Time Zone: Etc/UTC

Test Classes

36

Total Tests

289

Passed

124

Failed

0

Disabled

0

Aborted

0

Total Runtime

42.3s

Success Rate

42.9%

Available Processors

4

Spring Context Caching Statistics

Cache Size: 1 / 32
Cache Hits: 5717
Cache Misses: 1
Cache Hit Rate: 100.0%

๐Ÿ” Find Context by Test Class

Start typing to search for test classes. Results will appear after entering 3 or more characters.

Context Cache Entries

Context ID: context-0 513 beans
Load Time: 26ms
Heap Memory: 73.3MB
Test Classes: api.controllers.HeartbeatControllerTest, api.controllers.AuthenticationControllerTest$Login, api.controllers.AuthenticationControllerTest$Register, api.controllers.users.UserControllerTest$DeleteUser, api.controllers.AuthorityControllerTest$GetAuthority, api.controllers.users.UserControllerTest$GetUsers, api.controllers.users.UserAvatarControllerTest$DeleteMyAvatar, api.controllers.RoleControllerTest$GetRole, api.controllers.users.UserControllerTest, api.controllers.users.UserRoleControllerTest$SetUserRoles, api.controllers.users.UserRoleControllerTest, api.controllers.users.UserAvatarControllerTest, api.controllers.users.UserAvatarControllerTest$GetUserAvatar, api.controllers.users.UserControllerTest$UpdateMyPassword, api.controllers.users.UserRoleControllerTest$RemoveUserRoles, api.controllers.users.UserRoleControllerTest$AddUserRoles, api.services.storage.S3ObjectServiceTest, api.controllers.AuthorityControllerTest, api.controllers.users.UserControllerTest$GetUser, api.controllers.RoleControllerTest, api.controllers.AuthorityControllerTest$GetAuthorities, api.controllers.users.UserAvatarControllerTest$GetMyAvatar, api.services.storage.SimpleStorageServiceTest, api.controllers.RoleControllerTest$UpdateRole, api.controllers.RoleControllerTest$GetRoles, api.controllers.users.UserControllerTest$UpdateMe, api.controllers.users.UserRoleControllerTest$GetUserRoles, api.controllers.AuthenticationControllerTest, api.controllers.users.UserControllerTest$UpdateUser, api.controllers.users.UserAvatarControllerTest$DeleteUserAvatar, api.controllers.users.UserControllerTest$GetMe, api.controllers.users.UserAvatarControllerTest$UpdateUserAvatar, api.controllers.RoleControllerTest$CreateRole, api.controllers.RoleControllerTest$DeleteRole, api.controllers.users.UserAvatarControllerTest$UpdateMyAvatar, api.controllers.users.UserControllerTest$DeleteMe

๐Ÿ” Spring Test Context Visualizer

vs.

Spring Context Configurations

This section shows all unique Spring context configurations detected during test execution, grouped by their MergedContextConfiguration.


๐Ÿ”ง config-0
36 test classes
513 beans
configurationClasses:
[Application]
activeProfiles:
[]
contextLoader:
SpringBootContextLoader
properties:
3 properties
parentContext:
contextCustomizers:
[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@5b9396d3, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@5d21202d, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@38d17d80, org.springframework.boot.test.web.reactor.netty.DisableReactorResourceFactoryGlobalResourcesContextCustomizerFactory$DisableReactorResourceFactoryGlobalResourcesContextCustomizerCustomizer@43e9089, org.springframework.boot.test.autoconfigure.OnFailureConditionReportContextCustomizerFactory$OnFailureConditionReportContextCustomizer@a66e580, org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@3c3a0032, org.springframework.test.context.bean.override.BeanOverrideContextCustomizer@32c2745e, org.springframework.test.context.support.DynamicPropertiesContextCustomizer@0, org.springframework.boot.test.context.SpringBootTestAnnotation@1429c3e0]
locations:
contextInitializers:
[]
beanDefinitionCount:
513
Test classes using this configuration:
api.controllers.HeartbeatControllerTestapi.controllers.AuthenticationControllerTest$Loginapi.controllers.AuthenticationControllerTest$Registerapi.controllers.users.UserControllerTest$DeleteUserapi.controllers.AuthorityControllerTest$GetAuthorityapi.controllers.users.UserControllerTest$GetUsersapi.controllers.users.UserAvatarControllerTest$DeleteMyAvatarapi.controllers.RoleControllerTest$GetRoleapi.controllers.users.UserControllerTestapi.controllers.users.UserRoleControllerTest$SetUserRolesapi.controllers.users.UserRoleControllerTestapi.controllers.users.UserAvatarControllerTestapi.controllers.users.UserAvatarControllerTest$GetUserAvatarapi.controllers.users.UserControllerTest$UpdateMyPasswordapi.controllers.users.UserRoleControllerTest$RemoveUserRolesapi.controllers.users.UserRoleControllerTest$AddUserRolesapi.services.storage.S3ObjectServiceTestapi.controllers.AuthorityControllerTestapi.controllers.users.UserControllerTest$GetUserapi.controllers.RoleControllerTestapi.controllers.AuthorityControllerTest$GetAuthoritiesapi.controllers.users.UserAvatarControllerTest$GetMyAvatarapi.services.storage.SimpleStorageServiceTestapi.controllers.RoleControllerTest$UpdateRoleapi.controllers.RoleControllerTest$GetRolesapi.controllers.users.UserControllerTest$UpdateMeapi.controllers.users.UserRoleControllerTest$GetUserRolesapi.controllers.AuthenticationControllerTestapi.controllers.users.UserControllerTest$UpdateUserapi.controllers.users.UserAvatarControllerTest$DeleteUserAvatarapi.controllers.users.UserControllerTest$GetMeapi.controllers.users.UserAvatarControllerTest$UpdateUserAvatarapi.controllers.RoleControllerTest$CreateRoleapi.controllers.RoleControllerTest$DeleteRoleapi.controllers.users.UserAvatarControllerTest$UpdateMyAvatarapi.controllers.users.UserControllerTest$DeleteMe
Context Complexity: 513 bean definitions

Test Execution Details

Click on any test class below to expand and see detailed information about individual test methods, including execution times and failure details.

HeartbeatControllerTest
api.controllers
โฑ๏ธ 14ms ๐Ÿ“Š 1 tests โœ… 1
โœ… shouldReturnTrue_whenHeartbeat
9ms PASSED
AuthenticationControllerTest$Login
api.controllers
โฑ๏ธ 307ms ๐Ÿ“Š 3 tests โœ… 3
โœ… should401_whenIncorrectUsername
112ms PASSED
โœ… shouldLogin_whenAdmin
85ms PASSED
โœ… should401_whenIncorrectPassword
87ms PASSED
AuthenticationControllerTest$Register
api.controllers
โฑ๏ธ 283ms ๐Ÿ“Š 4 tests โœ… 4
โœ… should400_whenEmptyPassword
23ms PASSED
โœ… shouldRegister_whenNewUser
198ms PASSED
โœ… should400_whenEmptyUsername
11ms PASSED
โœ… should409_whenDuplicateUsername
16ms PASSED
UserControllerTest$DeleteUser
api.controllers.users
โฑ๏ธ 706ms ๐Ÿ“Š 3 tests โœ… 3
โœ… should403_whenUnauthorized
176ms PASSED
โœ… shouldDeleteUser
334ms PASSED
โœ… should404_whenNonexistent
174ms PASSED
AuthorityControllerTest$GetAuthority
api.controllers
โฑ๏ธ 206ms ๐Ÿ“Š 3 tests โœ… 3
โœ… should403_whenUnauthorized
164ms PASSED
โœ… shouldGetAuthority
15ms PASSED
โœ… should404_whenNonexistent
10ms PASSED
UserControllerTest$GetUsers
api.controllers.users
โฑ๏ธ 274ms ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
164ms PASSED
โœ… shouldGetUsers_whenQueryParametersExceedLimit
59ms PASSED
โœ… shouldGetUsers_whenNoQueryParameters
14ms PASSED
โœ… shouldGetUsers_whenQueryParameters
12ms PASSED
UserAvatarControllerTest$DeleteMyAvatar
api.controllers.users
โฑ๏ธ 1.4s ๐Ÿ“Š 3 tests โœ… 3
โœ… shouldDeleteMyAvatar
188ms PASSED
โœ… shouldDeleteAvatar_whenUserDeleted
194ms PASSED
โœ… should404_whenNonexistent
164ms PASSED
RoleControllerTest$GetRole
api.controllers
โฑ๏ธ 285ms ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
179ms PASSED
โœ… shouldContainAllAuthorities_whenGetAdminRole
33ms PASSED
โœ… shouldGetRole
22ms PASSED
โœ… should404_whenNonexistent
18ms PASSED
UserControllerTest
api.controllers.users
โฑ๏ธ 7.6s ๐Ÿ“Š 0 tests
UserRoleControllerTest$SetUserRoles
api.controllers.users
โฑ๏ธ 245ms ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
163ms PASSED
โœ… shouldSetUserRoles
28ms PASSED
โœ… shouldSetUserRoles_whenRolesNotFound
21ms PASSED
โœ… should404_whenNonexistentUser
11ms PASSED
UserRoleControllerTest
api.controllers.users
โฑ๏ธ 999ms ๐Ÿ“Š 0 tests
UserAvatarControllerTest
api.controllers.users
โฑ๏ธ 14.9s ๐Ÿ“Š 0 tests
UserAvatarControllerTest$GetUserAvatar
api.controllers.users
โฑ๏ธ 1.5s ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
167ms PASSED
โœ… should404_whenAvatarNonexistent
171ms PASSED
โœ… shouldGetUserAvatar
185ms PASSED
โœ… should404_whenUserNonexistent
173ms PASSED
UserControllerTest$UpdateMyPassword
api.controllers.users
โฑ๏ธ 715ms ๐Ÿ“Š 2 tests โœ… 2
โœ… should400_whenPasswordUnchanged
239ms PASSED
โœ… shouldUpdateMyPassword
465ms PASSED
UserRoleControllerTest$RemoveUserRoles
api.controllers.users
โฑ๏ธ 246ms ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
164ms PASSED
โœ… should404_whenNonexistentUser
12ms PASSED
โœ… shouldRemoveUserRoles
23ms PASSED
โœ… shouldNotRemoveUserRoles_whenRolesNotFound
26ms PASSED
UserRoleControllerTest$AddUserRoles
api.controllers.users
โฑ๏ธ 276ms ๐Ÿ“Š 5 tests โœ… 5
โœ… should403_whenUnauthorized
163ms PASSED
โœ… should404_whenNonexistentUser
12ms PASSED
โœ… shouldAddUserRoles
27ms PASSED
โœ… shouldAddUserRoles_whenRolesNotFound
23ms PASSED
โœ… shouldNotAddUserRoles_whenRolesAlreadyAdded
23ms PASSED
S3ObjectServiceTest
api.services.storage
โฑ๏ธ 13.3s ๐Ÿ“Š 1 tests โœ… 1
โœ… saveShouldFail_whenSizeTooLarge
130ms PASSED
AuthorityControllerTest
api.controllers
โฑ๏ธ 411ms ๐Ÿ“Š 0 tests
UserControllerTest$GetUser
api.controllers.users
โฑ๏ธ 507ms ๐Ÿ“Š 3 tests โœ… 3
โœ… should403_whenUnauthorized
163ms PASSED
โœ… shouldGetUser
164ms PASSED
โœ… should404_whenNonexistent
163ms PASSED
RoleControllerTest
api.controllers
โฑ๏ธ 2.8s ๐Ÿ“Š 0 tests
AuthorityControllerTest$GetAuthorities
api.controllers
โฑ๏ธ 197ms ๐Ÿ“Š 2 tests โœ… 2
โœ… should403_whenUnauthorized
171ms PASSED
โœ… shouldGetAuthorities
14ms PASSED
UserAvatarControllerTest$GetMyAvatar
api.controllers.users
โฑ๏ธ 2.1s ๐Ÿ“Š 3 tests โœ… 3
โœ… shouldGetMyAvatar
179ms PASSED
โœ… shouldGetMyAvatar_whenAvatarChanged
190ms PASSED
โœ… should404_whenNonexistent
162ms PASSED
SimpleStorageServiceTest
api.services.storage
โฑ๏ธ 1.4s ๐Ÿ“Š 2 tests โœ… 2
โœ… shouldMatchCaseSensitive
60ms PASSED
โœ… shouldMatchEdgeCases
1ms PASSED
RoleControllerTest$UpdateRole
api.controllers
โฑ๏ธ 668ms ๐Ÿ“Š 10 tests โœ… 10
โœ… shouldUpdateRole_whenNameNotChanged
74ms PASSED
โœ… should403_whenUnauthorized
189ms PASSED
โœ… shouldUpdateWithoutAuthority_whenAuthorityNonexistent
33ms PASSED
โœ… shouldUpdateRole_whenUpdateName
82ms PASSED
โœ… shouldUpdateRole_whenUpdateAuthorities
46ms PASSED
โœ… shouldUpdateRole_whenBodyIdIncorrect
35ms PASSED
โœ… should400_whenAdminRole
25ms PASSED
โœ… should404_whenRoleNonexistent
28ms PASSED
โœ… should400_whenNameEmpty
25ms PASSED
โœ… should409_whenDuplicateName
32ms PASSED
RoleControllerTest$GetRoles
api.controllers
โฑ๏ธ 236ms ๐Ÿ“Š 2 tests โœ… 2
โœ… should403_whenUnauthorized
174ms PASSED
โœ… shouldGetRoles
43ms PASSED
UserControllerTest$UpdateMe
api.controllers.users
โฑ๏ธ 1.2s ๐Ÿ“Š 6 tests โœ… 6
โœ… shouldUpdateMe_whenUsernameNotChanged
165ms PASSED
โœ… should409_whenDuplicateUsername
316ms PASSED
โœ… shouldUpdateMe_whenIdIncorrect
163ms PASSED
โœ… should400_whenUsernameEmpty
162ms PASSED
โœ… shouldUpdateMe_whenSomeNullValues
164ms PASSED
โœ… shouldUpdateMe_whenUsernameChanged
165ms PASSED
UserRoleControllerTest$GetUserRoles
api.controllers.users
โฑ๏ธ 215ms ๐Ÿ“Š 3 tests โœ… 3
โœ… should403_whenUnauthorized
167ms PASSED
โœ… shouldGetUserRoles
18ms PASSED
โœ… should404_whenNonexistentUser
12ms PASSED
AuthenticationControllerTest
api.controllers
โฑ๏ธ 602ms ๐Ÿ“Š 0 tests
UserControllerTest$UpdateUser
api.controllers.users
โฑ๏ธ 1.6s ๐Ÿ“Š 8 tests โœ… 8
โœ… should403_whenUnauthorized
165ms PASSED
โœ… shouldUpdateUser_whenUsernameChanged
196ms PASSED
โœ… shouldUpdateUser_whenUsernameNotChanged
176ms PASSED
โœ… should409_whenDuplicateUsername
326ms PASSED
โœ… should400_whenUsernameEmpty
175ms PASSED
โœ… shouldUpdateUser_whenBodyIdIncorrect
166ms PASSED
โœ… should404_whenNonexistent
178ms PASSED
โœ… shouldUpdateUser_whenSomeNullValues
169ms PASSED
UserAvatarControllerTest$DeleteUserAvatar
api.controllers.users
โฑ๏ธ 1.7s ๐Ÿ“Š 4 tests โœ… 4
โœ… should403_whenUnauthorized
169ms PASSED
โœ… should404_whenAvatarNonexistent
171ms PASSED
โœ… shouldGetUserAvatar
214ms PASSED
โœ… should404_whenUserNonexistent
184ms PASSED
UserControllerTest$GetMe
api.controllers.users
โฑ๏ธ 1.2s ๐Ÿ“Š 7 tests โœ… 7
โœ… shouldGetMe_whenJwtAuthentication
167ms PASSED
โœ… should401_whenJwtAuthenticationExpires
158ms PASSED
โœ… should401_whenBasicAuthenticationIncorrectUsername
233ms PASSED
โœ… should401_whenBasicAuthenticationIncorrectPassword
233ms PASSED
โœ… should401_whenNoAuthentication
5ms PASSED
โœ… should401_whenJwtAuthenticationInvalid
159ms PASSED
โœ… shouldGetMe_whenBasicAuthentication
233ms PASSED
UserAvatarControllerTest$UpdateUserAvatar
api.controllers.users
โฑ๏ธ 4.9s ๐Ÿ“Š 7 tests โœ… 7
โœ… should403_whenUnauthorized
170ms PASSED
โœ… shouldReplaceOldAvatar
207ms PASSED
โœ… should400_whenTooLarge
173ms PASSED
โœ… should400_whenMediaTypeInvalid
170ms PASSED
โœ… should400_whenFileNull
166ms PASSED
โœ… should404_whenUserNonexistent
172ms PASSED
โœ… shouldUpdateUserAvatar
179ms PASSED
RoleControllerTest$CreateRole
api.controllers
โฑ๏ธ 322ms ๐Ÿ“Š 5 tests โœ… 5
โœ… should403_whenUnauthorized
177ms PASSED
โœ… should409_whenDuplicateRoleName
23ms PASSED
โœ… shouldCreateWithoutAuthority_whenAuthorityNonexistent
24ms PASSED
โœ… should400_whenNameEmpty
29ms PASSED
โœ… shouldCreateRole
28ms PASSED
RoleControllerTest$DeleteRole
api.controllers
โฑ๏ธ 1.3s ๐Ÿ“Š 6 tests โœ… 6
โœ… should403_whenUnauthorized
202ms PASSED
โœ… shouldDeleteRole_whenUsed
808ms PASSED
โœ… should400_whenDeleteUserRole
27ms PASSED
โœ… shouldDeleteRole
59ms PASSED
โœ… should400_whenDeleteAdminRole
110ms PASSED
โœ… should404_whenNonexistent
23ms PASSED
UserAvatarControllerTest$UpdateMyAvatar
api.controllers.users
โฑ๏ธ 3.3s ๐Ÿ“Š 4 tests โœ… 4
โœ… should400_whenTooLarge
163ms PASSED
โœ… should400_whenMediaTypeInvalid
169ms PASSED
โœ… should400_whenFileNull
161ms PASSED
โœ… shouldUpdateMyAvatar
174ms PASSED
UserControllerTest$DeleteMe
api.controllers.users
โฑ๏ธ 1.4s ๐Ÿ“Š 7 tests โœ… 7
โœ… shouldDeleteMe_whenJwtAuthentication
164ms PASSED
โœ… should401_whenJwtAuthenticationExpires
163ms PASSED
โœ… should401_whenBasicAuthenticationIncorrectUsername
236ms PASSED
โœ… should401_whenBasicAuthenticationIncorrectPassword
234ms PASSED
โœ… should401_whenNoAuthentication
162ms PASSED
โœ… should401_whenJwtAuthenticationInvalid
160ms PASSED
โœ… shouldDeleteMe_whenBasicAuthentication
246ms PASSED