User Tools

Site Tools


arrange_act_assert

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arrange_act_assert [2025/09/09 16:00] plidaarrange_act_assert [2025/09/09 16:24] (current) plida
Line 4: Line 4:
 ====== Arrange Act Assert (AAA) ====== ====== Arrange Act Assert (AAA) ======
  
-Time passes, and tests become unreadable. In just one test there can be way too much arrangement, several actions and dozens of checks. Such a test breaks the main principle: test must explain, not confuse.+Time passes, and [[software_testing|tests]] become unreadable. In just one test there can be way too much arrangement, several actions and dozens of checks. Such a test breaks the main principle: test must explain, not confuse.
  
 Pattern AAA divides test into 3 logical blocks: Pattern AAA divides test into 3 logical blocks:
  
-  * arrange -- environment and data preparation; +  - Arrange -- environment and data preparation. 
-  * act -- calling the action being tested; +  - Act -- calling the action being tested. 
-  * assert -- result check.+  - Assert -- result check.
  
 ==== Arrange ==== ==== Arrange ====
Line 30: Line 30:
 ==== Comparing AAA and GWT ==== ==== Comparing AAA and GWT ====
  
-AAA and GWT are very similar:+AAA and [[given_when_then|GWT]] are very similar:
   * Arrange = Given.   * Arrange = Given.
   * Act = When.   * Act = When.
arrange_act_assert.1757433627.txt.gz · Last modified: by plida