Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 54 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 54
Topic #: 1
[All 2V0-72.22 Questions]

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

  • A. @TestApplicationContext is used to define additional beans or customizations for a test.
  • B. Test methods in a @SpringBootTest class are transactional by default.
  • C. @SpringBootTest is typically used for integration testing.
  • D. Test methods annotated with @SpringBootTest will recreate the ApplicationContext.
  • E. @SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Uteman
1 month, 2 weeks ago
D I mean, B is correct
upvoted 1 times
...
Uteman
1 month, 2 weeks ago
B - is not entirely true, Test methods annotated with @SpringBootTest do not recreate the ApplicationContext for each test method. Instead, the ApplicationContext is created once per test class, and it is cached and shared across multiple test methods in the same class (or even across different test classes), unless specifically instructed otherwise.
upvoted 1 times
...
Evoila_TrainingMaterial
3 months, 2 weeks ago
Selected Answer: BC
The correct answers are: B. Test methods in a @SpringBootTest class are transactional by default. C. @SpringBootTest is typically used for integration testing. Explanation: B. Test methods in a @SpringBootTest class are transactional by default. This means that any changes to the database made by a test method will be rolled back by default. C. @SpringBootTest is typically used for integration testing. It provides a full Spring ApplicationContext, including all of the infrastructure beans, as well as your application's beans. It is also capable of starting a web server, making it ideal for testing web applications, and testing a broad range of application components.
upvoted 1 times
...
2211094
5 months, 1 week ago
BC is correct answer.
upvoted 1 times
...
asaladino75
8 months, 3 weeks ago
Selected Answer: 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.
upvoted 2 times
...
Glothan
11 months, 1 week ago
Selected Answer: CD
A is wrong: there is no @TestApplicationContext annotation in Spring Testing.
upvoted 1 times
...
Tolo01
1 year, 3 months ago
Selected Answer: AC
I think A and C are the best answer
upvoted 1 times
nesreenmhd123
1 year, 1 month ago
There is no @TestApplicationContext annotation in Spring Testing.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...