O'Reilly logo

Mobile DevOps by Jhalak Modi, Rohin Tak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the AAA pattern

The Arrange-Act-Assert (AAA) pattern should be followed when writing a UITest, to achieve the best results and fast feedback from the test. As the name suggests, it consists of three steps:

  • Arrange: Eponymously, this step contains all the actions that help arrange the test, for example, initialization of things required later while running the test, setting up the environment, and much more.
  • Act: This is when the test performs the desired interaction with the application, such as entering text, pushing a button, and so on.
  • Assert: Assert is when our UITest asserts whether the interaction gave us the desired outcome or not, such as verifying that an error message was displayed.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required