What is Arrange-Act-Assert (AAA) phase in Unit testing?

 Posted by Rajnilari2015 on 10/31/2016 | Category: Others Interview questions | Views: 2506 | Points: 40

Broadly speaking, a "Unit Test" can be visualized as a three phase pattern - Arrange-Act-Assert (AAA). This means -

a) Arrange all necessary preconditions and inputs. This can also be call as Setup/Initialization phase.
b) Act on the object/method under test. This can also be call as Exercise phase.
c) Assert that the expected results have occurred. This can also be call as Verify phase.

So the Arrange-Act-Assert (AAA) mechanism ensures for proper operation of a System under test (SUT). A proper SUT also ensures maturity of the system since system test is the successor of integration test in the testing cycle.

| Alert Moderator 

Comments or Responses

Login to post response