ApiBolt Test Engine (ABTestEngine)
A lightweight, powerful testing utility for validating API responses inside ApiBolt.
Core Idea
ABTestEngine provides multiple assertion layers:
status()HTTP status testingbody()Response body validationheaders()Headers validationcookies()Cookies validationgroup()Organize tests into blocksprint()Log values to consolecode()Log formatted code blockssummary()Generate visual summaryexpect()All-In-One Unified API (Recommended)Negation (.not)
Every assertion supports .not for logical inversion.
ts
ab.expect("Not 500").not.toBe(500);
ab.expect("No error").not.toBeServerError();
ab.expect("No password field").not.toHaveProperty("password");Summary Matrix
| Category | Primary Method |
|---|---|
| Status | expect() |
| Body | expect() |
| Headers | expect() |
| Cookies | expect() |
| Negation | .not |
Final Note & Philosophy
If you are separately calling ab.status(), ab.body(), ab.headers(), and ab.cookies(), you are doing more work than needed. The expect() method is designed to behave like a mini-Jest framework inside ApiBolt.
"One method. Full control. Zero confusion."