# Automated API testing: check every response

> Automated API testing with approved assertions and schema campaigns. Inspect response checks, failed cases and the exact scope behind each result.

Source: https://cueapril.com/testing/api-testing
Updated: 2026-09-30
Index: https://cueapril.com/llms.txt

## What is API testing?

API testing sends requests to your API and checks each response against the expected result, including status codes, response bodies, schemas and access rules. It tests the service directly, below the user interface.

An endpoint can return the expected status and still return the wrong business result. With Cue April, test approved response expectations, input rules and supported access scenarios, then inspect the actual observations behind each outcome.

## Connect assertions to expected behaviour.

Define the operation, allowed actions, inputs and expected response in the approved testing scope. Supported assertions examine response status and declared values or schemas. This gives developers a specific comparison to investigate: what the API should have returned and what the executed check observed. The source revision and target remain part of that result.

## Exercise a reviewed set of invalid inputs.

Supported schema campaigns prepare a finite set of valid and schema-invalid JSON requests before review. Execution uses that approved set and preserves case identities, response observations and completion counts. A missing response, redirect or exhausted limit remains incomplete. A completed case with the wrong expected value fails, even when its HTTP status looks correct.

- Review the operation and expected rejection behaviour.
- Retain the request corpus identity and execution evidence.
- Investigate or replay the exact case associated with a failure.

## Agree the target before sending traffic.

An evaluation should identify a suitable environment, synthetic data, allowed effects and spending limit. Schema campaigns support a bounded schema and operation subset; broader workflows, authentication matrices and performance workloads have separate requirements. Production writes require explicit authority. We review those boundaries with you before a scoped run starts.

By Cue April. Updated 2026-09-30.

## Questions

### Is schema testing a complete security assessment?

Schema checks establish how the approved cases behaved. Security assessment needs its own scope and expectations, including relevant roles, tenant boundaries and authorised actions.

### Can a response teach the agent what should pass?

The expected result is approved before execution. Observed responses cannot silently rewrite that expectation or expand the reviewed request campaign.

### How do you test an API?

Decide the expected result for each request first: the status, body, schema and who may call it. Then send the requests to an agreed environment with synthetic data, compare each response with its expectation and keep the evidence for any failed case.

### Can API tests run automatically on every change?

Yes. Automated API testing runs the same checks whenever the code changes. With Cue April, approved API assertions and schema campaigns run inside the plan your team approved, and each failure keeps the exact case behind it.

## Related

- [Property-based testing](https://cueapril.com/testing/property-based-testing): Run a fast-check property-based testing example: find a delivery-rule boundary fault, replay its seed and counterexample, and verify the fix.
- [Playwright testing](https://cueapril.com/testing/playwright-testing): An AI testing agent runs your approved Playwright tests and keeps the results, source identity and gaps. Review accessibility scans alongside journeys.
- [Pull request testing](https://cueapril.com/use-cases/pull-request-testing): Test a pull request against agreed requirements, keep the tested revision and native results, and review a practical checklist before merging.
