Arrange Act Assert
ELI5 — The Vibe Check
Arrange Act Assert is just the full name for AAA. You arrange the stage (set up data), act out the scene (call your function), and assert the result (check what happened). Think of it like a play: set, action, review.
Real Talk
Arrange Act Assert is a pattern that structures unit tests into three distinct phases. Arrange sets up test data and preconditions. Act invokes the system under test with those inputs. Assert verifies the outputs or side effects match expectations. It's the foundational structure of clean unit tests.
When You'll Hear This
"Every test in this codebase follows Arrange-Act-Assert — keep it consistent." / "The test is too long because the Arrange section is doing too much setup."
Related Terms
AAA Pattern (AAA)
AAA stands for Arrange, Act, Assert.
Given When Then
Given When Then is AAA's cousin from the BDD world. Given = the setup situation. When = what the user/system does. Then = what should happen as a result.
Test Case
A test case is one specific scenario you want to check. 'Does the login work with a correct password?' — that's a test case.
Unit Test
A unit test is like checking that one single LEGO brick isn't broken before you use it in your big castle.