Exam 2v0-7222 All QuestionsBrowse all questions from this exam
Question 54

Which two statements are true regarding Spring Boot Testing? (Choose two.)

    Correct Answer: C, E

    Spring Boot Testing involves specific annotations and configurations to facilitate testing. @SpringBootTest is commonly used for integration testing because it loads the full application context. Additionally, @SpringBootTest without any configuration classes assumes there is only one class annotated with @SpringBootConfiguration in the application context. This ensures that the test class can properly load the application's context.

Discussion
asaladino75Option: E

I think the E answere is correct. see https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/test/context/SpringBootTest.html the @SpringBootTest is not applicable at method level.

2211094Options: BC

BC is correct answer.

GlothanOptions: CD

A is wrong: there is no @TestApplicationContext annotation in Spring Testing.

Tolo01Options: AC

I think A and C are the best answer

nesreenmhd123

There is no @TestApplicationContext annotation in Spring Testing.