Framework Design interview questions — Medium

250 medium-level Framework Design questions from our Automation Testing bank, each with the correct answer and an explanation of why it is correct.

What this covers

Framework Design appears throughout Automation Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.

20 example questions

  1. 1. "Utility constructing valid domain objects for tests" — in Framework Design, this describes which of the following?

    • A. Fluent interface.
    • B. Locator repository.
    • C. Test data builder.correct
    • D. BaseTest class.

    Why: test data builder: Utility constructing valid domain objects for tests.

  2. 2. Which of the following statements about Framework Design is TRUE?

    • A. The test pyramid recommends having the most tests at the UI layer.
    • B. The test pyramid recommends many unit tests, fewer integration tests, and fewest UI tests.correct
    • C. Test code does not require code review because it never ships to users.
    • D. Duplication across tests is preferable to shared helper functions.

    Why: Lower layers are faster and cheaper, so they carry most coverage.

  3. 3. "Method-chaining style returning page objects for readable flows" — in Framework Design, this describes which of the following?

    • A. Test data builder.
    • B. Configuration manager.
    • C. Fluent interface.correct
    • D. BaseTest class.

    Why: fluent interface: Method-chaining style returning page objects for readable flows.

  4. 4. "Design dividing the application into independently tested modules" — in Framework Design, this describes which of the following?

    • A. Fluent interface.
    • B. Modular framework.correct
    • C. BaseTest class.
    • D. Keyword-driven framework.

    Why: modular framework: Design dividing the application into independently tested modules.

  5. 5. "Component resolving environment-specific settings" — in Framework Design, this describes which of the following?

    • A. Locator repository.
    • B. Configuration manager.correct
    • C. Reporting listener.
    • D. Fluent interface.

    Why: configuration manager: Component resolving environment-specific settings.

  6. 6. "Tests composed of reusable action keywords, often in tables" — in Framework Design, this describes which of the following?

    • A. Locator repository.
    • B. Test data builder.
    • C. BaseTest class.
    • D. Keyword-driven framework.correct

    Why: keyword-driven framework: Tests composed of reusable action keywords, often in tables.

  7. 7. Identify the accurate statement about Framework Design:

    • A. Duplication across tests is preferable to shared helper functions.
    • B. The test pyramid recommends many unit tests, fewer integration tests, and fewest UI tests.correct
    • C. Hard-coding environment URLs inside every test is a best practice.
    • D. The Page Object Model requires putting all assertions inside page classes.

    Why: Lower layers are faster and cheaper, so they carry most coverage.

  8. 8. Which statement correctly describes Framework Design?

    • A. Hard-coding environment URLs inside every test is a best practice.
    • B. The Page Object Model requires putting all assertions inside page classes.
    • C. A data-driven framework embeds all data directly in test methods.
    • D. The Page Object Model encapsulates page locators and actions behind a class interface.correct

    Why: Tests call intent-revealing methods instead of raw selectors.

  9. 9. "Central store of element selectors" — in Framework Design, this describes which of the following?

    • A. Locator repository.correct
    • B. Modular framework.
    • C. BaseTest class.
    • D. Reporting listener.

    Why: locator repository: Central store of element selectors.

  10. 10. Which Framework Design concept matches this description: "Hook that logs results and captures artifacts on events"?

    • A. Reporting listener.correct
    • B. Modular framework.
    • C. Test data builder.
    • D. Keyword-driven framework.

    Why: reporting listener: Hook that logs results and captures artifacts on events.

  11. 11. In Framework Design, which of the following is described as: "Common parent handling setup/teardown shared by tests"?

    • A. Reporting listener.
    • B. BaseTest class.correct
    • C. Fluent interface.
    • D. Keyword-driven framework.

    Why: BaseTest class: Common parent handling setup/teardown shared by tests.

  12. 12. In the context of Framework Design, which of the following is a correct statement?

    • A. Duplication across tests is preferable to shared helper functions.
    • B. The Page Object Model requires putting all assertions inside page classes.
    • C. Test code deserves code review and refactoring like production code.correct
    • D. A data-driven framework embeds all data directly in test methods.

    Why: Treating tests as first-class code keeps suites maintainable.

  13. 13. Which Framework Design concept matches this description: "Tests composed of reusable action keywords, often in tables"?

    • A. Keyword-driven framework.correct
    • B. Reporting listener.
    • C. Configuration manager.
    • D. Test data builder.

    Why: keyword-driven framework: Tests composed of reusable action keywords, often in tables.

  14. 14. Which Framework Design concept matches this description: "Component resolving environment-specific settings"?

    • A. Fluent interface.
    • B. Reporting listener.
    • C. Modular framework.
    • D. Configuration manager.correct

    Why: configuration manager: Component resolving environment-specific settings.

  15. 15. Which Framework Design concept matches this description: "Design dividing the application into independently tested modules"?

    • A. Fluent interface.
    • B. Configuration manager.
    • C. Reporting listener.
    • D. Modular framework.correct

    Why: modular framework: Design dividing the application into independently tested modules.

  16. 16. In Framework Design, which of the following is described as: "Method-chaining style returning page objects for readable flows"?

    • A. BaseTest class.
    • B. Reporting listener.
    • C. Keyword-driven framework.
    • D. Fluent interface.correct

    Why: fluent interface: Method-chaining style returning page objects for readable flows.

  17. 17. In Framework Design, which of the following is described as: "Component resolving environment-specific settings"?

    • A. Test data builder.
    • B. Configuration manager.correct
    • C. Fluent interface.
    • D. Keyword-driven framework.

    Why: configuration manager: Component resolving environment-specific settings.

  18. 18. In Framework Design, which of the following is described as: "Tests composed of reusable action keywords, often in tables"?

    • A. BaseTest class.
    • B. Keyword-driven framework.correct
    • C. Reporting listener.
    • D. Configuration manager.

    Why: keyword-driven framework: Tests composed of reusable action keywords, often in tables.

  19. 19. In Framework Design, which of the following is described as: "Hook that logs results and captures artifacts on events"?

    • A. Test data builder.
    • B. Configuration manager.
    • C. BaseTest class.
    • D. Reporting listener.correct

    Why: reporting listener: Hook that logs results and captures artifacts on events.

  20. 20. In Framework Design, which of the following is described as: "Utility constructing valid domain objects for tests"?

    • A. Locator repository.
    • B. Configuration manager.
    • C. Modular framework.
    • D. Test data builder.correct

    Why: test data builder: Utility constructing valid domain objects for tests.

Related Automation Testing topics