Pragma Labs mcp studio
Docs

[ E2E Testing ]

Programmable Assertions

The built-in assertion modes (exact, shape, ignore) cover most cases — but some tests need custom logic. Programmable assertions let you write code to validate each step instead of relying on a fixed comparison strategy.

Coming soon

This feature is on the roadmap and still being designed. The goal is to let you drop into code at any test step — similar to writing a matcher in Jest or Chai — and assert on the live result with full expressiveness. The API will be kept as simple as possible.

What it will enable

Custom matchers per step

Write a function that receives the live result and returns pass or fail with a message — for logic that exact or shape mode cannot express.

Cross-step validation

Reference the output of a previous step inside a later assertion, e.g. verify that a created resource ID from step 1 appears in the list returned by step 3.

Conditional checks

Assert different things depending on runtime values — handle optional fields, variable-length lists, or environment-specific responses.

Share your idea

We are actively shaping the design of this feature and want to hear from the people who will use it. If you have a use case, an API shape in mind, or just a scenario that current assertions can't handle — send us a proposal.

Send a proposal