api-boltAPIBolt

ApiBolt Test Engine (ABTestEngine)

A full-featured API testing DSL inside ApiBolt. Every line executes immediately and stores a test result.

Core Idea

ABTestEngine provides multiple assertion layers:

status()HTTP status testing
body()Response body validation
headers()Headers validation
cookies()Cookies validation
ab.envEnvironment variable access
group()Organize tests into blocks
print()Log values to console
code()Log formatted code blocks
summary()Generate visual summary
expect()All-In-One Unified API — dual mode: value or response

Negation (.not)

Every assertion supports .not for logical inversion. It flips only the last executed test.

ts

Summary Matrix

CategoryPrimary Method
Statusexpect()
Bodyexpect()
Headersexpect()
Cookiesexpect()
Environmentab.env
Negation.not

Final Rules & Philosophy

  • Every call immediately creates a test result.
  • expect() is dual mode — pass a value, or test the full response.
  • No chaining like Jest — each assertion is independent.
  • Headers are case-insensitive.
  • Cookies support optional name lookup or full-list access with ab.cookies().
  • .not flips only the last executed test.
  • Grouping isolates test blocks for clean reporting.

"One method. Full control. Zero confusion."