AI DevelopmentMethodology6 min readPublished September 7, 2026

AI Agent Test Data: What to Fake and What to Keep Real

Choose what to simulate in AI agent tests and what needs a real check. A reference for test data, mocked responses, side effects and honest evidence limits.

DA
Digital Applied Team
Research and practical implementation
PublishedSeptember 7, 2026
ReviewedSeptember 7, 2026

Fake the inputs that make a test safe and repeatable, while keeping the behavior under examination real. If an agent is supposed to save a report, a test that replaces the save operation with a success message can verify the agent’s response to that message. It cannot establish that a report was stored.

Use this reference to ask what each passing test demonstrates. “Real” means that the relevant implementation runs in a controlled environment; it does not require customer data or live commercial effects.

Key takeaways
  1. 01
    Choose the claim first.Decide whether the test examines an interface, a calculation, a permission boundary or a persisted outcome.
  2. 02
    Label every substitute.Record which inputs, tools and responses were supplied by the test instead of the system.
  3. 03
    Inspect the resulting state.A success-shaped message is weak evidence when the claimed result is a file or record elsewhere.

01Match each test case to a bounded claimMatch each test case to a bounded claim

A mock is a controlled replacement for part of the system. A fixture is a prepared input or starting state. Both are useful. The table identifies what must remain exercised for the named test to mean anything, then names the claim that still needs separate evidence. Rows are choices for test design, not a ranking from bad to good.

Complete selected editorial classification; informed by the primary sources discussed below. As of September 7, 2026.
Test case and groupControlled setupWhat stays real and what remains unproven
Inputs: Identifiers, gaps and duplicatesUse consistent synthetic identifiers, deliberate missing values and duplicate records.Keep matching and validation real; selected cases do not establish production prevalence or complete identity coverage.
Inputs: Free-text contentUse authored examples with relevant ambiguity and length.Keep parsing real; a small example set does not measure broad language coverage.
Inputs: Dates and time zonesUse fixed boundary dates and explicit zones.Keep conversion logic real; a fixed clock does not test real scheduling delay.
Responses: Tool successReturn a controlled success payload.Exercise downstream handling; the actual tool operation remains untested.
Responses: Tool rejectionReturn a documented error shape.Exercise the recovery branch; real permission enforcement is a separate check.
Responses: Delayed answerIntroduce a controlled delay or timeout.Exercise waiting behavior; this is not a service latency measurement.
Responses: Malformed contentSupply missing fields or invalid types.Exercise validation; distinguish your fixture from a captured service response.
Destinations: Local filesUse a disposable directory with the real writer.Reopen the output; remote storage and audience access remain outside this check.
Destinations: Database recordsUse controlled records in a test database.Exercise actual constraints; production configuration is not established.
Destinations: MessagesUse a capture destination instead of real recipients.Inspect payload and routing; public transport delivery is not demonstrated.
Destinations: Paid actionsUse a supported test environment or a local substitute.Inspect the request path; settlement and live commercial effects are excluded.
Outcomes: Browser success stateKeep the real interface and assert its visible result.A success view does not independently prove a remote write.
Outcomes: Persisted artifactRead the output through a separate inspection step.Check content and identity; existence alone is insufficient.
Outcomes: Report and answer checkSpecify expected values or properties independently, then compare observed state with the agent’s report.The checker must be able to reject a plausible explanation; disclose judgment gaps instead of treating the explanation as the answer key.

02Why a mock needs an explicit boundaryWhy a mock needs an explicit boundary

Playwright’s testing guidance recommends user-visible checks, isolated tests and controlled data. It also recommends mocking third-party dependencies. These are useful ways to test the application you own. They do not turn a substituted dependency into evidence of a live integration.

03Separate a report test from a delivery testSeparate a report test from a delivery test

In Playwright’s API examples (read September 9, 2026), route.fulfill returns a chosen response without contacting the intercepted API. The contrasting example calls route.fetch, changes the returned data and then fulfills the request with the patched response. The first tests how the page handles a replacement; the second also exercises the API request, while the displayed data is still modified.

Label that difference in the result: “page behavior checked against a replacement response” or “API response obtained and patched before display.” Neither proves an unmodified live workflow. Keep an independent destination check for any write or delivery claim.

The delivery-state reference helps describe the resulting boundary. The file-output acceptance reference supplies the checks for the actual copy. A passing local test should not silently acquire a claim about recipient access.

04Preserve the difficult properties of the inputPreserve the difficult properties of the input

Synthetic data becomes misleading when it removes the difficulty the tool must handle. A parser expected to accept names with accents should not be tested only with short plain-English names. A calculation that handles missing values needs deliberate missing cases, not a spreadsheet where every cell is populated.

Preserve relationships as well as individual values. If two records are meant to refer to the same entity, give them a consistent synthetic identifier. If a duplicate is intentional, label why it is present. Otherwise a test can pass because the fixture accidentally avoids the business rule under examination.

Our own-traffic evaluation guide addresses whether tasks represent intended use. This reference addresses what gets replaced within those tasks. Representative examples still need clear substitution boundaries; realistic-looking records alone do not make an integration real.

05Keep a substitution note beside the resultKeep a substitution note beside the result

For each test, write: claim, fixture, substituted boundaries, implementation exercised, observed result and remaining check. Include the test version so someone can tell whether a later run used the same setup. This note is more useful than a single “all tests passed” message when the reader must decide whether work is ready.

Do not invent a universal minimum number of examples. Choose cases from the behavior you promise and the failures you need to distinguish. A controlled expiry response can examine recovery logic; an authorized expired credential in a test environment examines whether the real boundary produces the expected denial. Neither alone estimates how often expiry happens.

Keep expected outcomes separate from the agent’s own assertions. For a transformation, use an independently specified expected value or a property the output must satisfy. For a write, inspect the destination through a separate read path where practical. The test should have a way to reject a plausible explanation of a result that never occurred.

Methodology
Scope
Controlled inputs, responses, destinations and independent outcome checks.
As-of date
September 7, 2026. Actual source collection and review date; assigned publication is September 7, 2026.
Collection
Read Playwright guidance on mocked requests and test isolation. Select cases involving inputs, responses, destinations and outcome checks. For each, specify the exercised behavior and the claim that remains outside the test.
Sources and interpretation
Playwright documents replacing requests, patching fetched responses and test isolation. The broader agent test-design map is editorial analysis; no live integration or model run was measured.
Exclusions
No vendor census, model benchmark, search-volume estimate, measured savings or failure rate. Worked examples are hypothetical; no customer operations were tested.
Gaps and limitations
UNVERIFIED means the required evidence was not inspected, was inaccessible or remains ambiguous after inspection. A selected case can overlap others in practice; preserve the specific claim and its uncertainty.

06DecisionWhat to do next

Practical decision

Make every pass say what was exercised.

Keep the relevant behavior real, replace what makes the test unsafe or unstable, and name each substitution. Inspect the resulting state before making a claim that crosses a simulated boundary.

For implementation support, explore our AI transformation services.

Build reliable AI workflows

Turn a promising workflow into work you can verify.

Digital Applied helps teams define acceptance checks, connect the right tools and make AI work reviewable.

Clear scopeReviewable resultsPractical implementation
Implementation

From evidence to operation

  • Define the decision and its limits
  • Choose the appropriate tool access
  • Verify results before delivery
Questions and answers

Common questions

No. They can isolate behavior and make failures repeatable. The problem is claiming that a substituted boundary was actually exercised.