← All Spring Framework Flashcard Decks

Quality Control & Assurance Flashcards

7 cards from real Spring Framework practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Quality Control & Assurance flashcards as text
  1. Which Spring Boot feature allows you to override specific properties only during tests without modifying application.properties?

    Answer: @TestPropertySource or properties attribute in @SpringBootTest

    @TestPropertySource or the properties/args attribute on @SpringBootTest injects test-specific property values that override the main configuration.

  2. What is the purpose of the spring.test.mockmvc.print property or .andDo(print()) in MockMvc tests?

    Answer: Prints the full HTTP request and response details to the console for debugging

    .andDo(print()) outputs the complete request/response details including headers, body, and status to the console during test execution.

  3. In Spring Boot, which annotation enables support for Spring Security in @WebMvcTest slices?

    Answer: @WithMockUser is sufficient without any additional annotation

    @WithMockUser from the Spring Security Test module sets up a mock authenticated user for controller tests without additional configuration.

  4. What does code coverage measurement in a Spring Boot project typically analyze?

    Answer: The percentage of production code lines or branches executed by the test suite

    Code coverage tools like JaCoCo measure what percentage of source code lines and branches were executed during the test suite run.

  5. Which Spring Cloud Contract feature helps ensure API contracts are met between microservices?

    Answer: Generates producer-side tests from consumer-defined contracts and stubs for consumer tests

    Spring Cloud Contract generates tests for the producer side and stubs for consumers based on shared contract definitions, preventing breaking API changes.

  6. Which metric exposed by Spring Boot Actuator is most useful for detecting memory leaks in a running application?

    Answer: jvm.memory.used

    jvm.memory.used tracks heap and non-heap memory consumption over time; a consistently rising trend indicates a potential memory leak.

  7. In a Spring Boot test, what is the recommended way to test exception handling in a REST controller using MockMvc?

    Answer: Use .andExpect(status().is4xxClientError()) or specific status matchers after triggering the error condition

    MockMvc's result matchers like status().isBadRequest() or status().isInternalServerError() assert the HTTP error response returned by exception handlers.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. docs.broadcom.com — Test delivery, retake policy, exam information · verified Oct 2026
  2. spring-academy.broadcom.com — Eligibility · verified Oct 2026
  3. broadcom.com — Fees, exam format, passing score, time limit · verified Oct 2026