Skip to content

Robot Pattern

Devrath edited this page Jun 28, 2021 · 5 revisions

What is the use case to use a robot pattern

  • Consider a scenario where there is a check-box and we have a logic that sets it checked/not-checked based on logic.
  • Now if we change the check-box to a image-view then a lot of things need to be modified.

Solution - Separate what from how

  • By separating what and the how our tests are more maintainable.
  • In above example,
    • What -> whether the checkbox needs to be checked.
    • How -> whether the widget is checked.

Robot Pattern

  • This pattern exposes an API that separates what and the how.

Clone this wiki locally