LESSON 11 / 16·2 min readIntermediate

Why Scripted Testing Matters

Should knowConcept lesson
01 Understand02 Recall03 Prepare

An important lesson is to test the deterministic engine without depending on live LLM variability.

A scripted model can return fixed extraction results, while scripted connectors return predefined API responses. With a controlled clock and stable workflow content, the same scenario can be replayed repeatedly.

Example scenario:

yaml
scenario: unrecognized_transaction
turns:
  - user: "I don't recognize a charge."
    extracted_intent: report_unrecognized_transaction
  - user: "It was $249.99."
    extracted_amount: 249.99
expected:
  next_step: ask_for_transaction_identification

The exact test format depends on the engine. The principle is to assert not just the final message, but also:

  • state and ledger updates;
  • visited nodes and transitions;
  • mandatory questions and confirmations;
  • connector calls and idempotency behavior;
  • audit events;
  • termination and failure paths.

Golden scenarios are particularly useful: they preserve known expected behavior and detect unintended changes during refactoring.

PAUSE & RECALL

Can you explain it without the notes?

Why Scripted Testing Matters

Use your own words. Explain an example and one limitation before checking the explanation.

Check your explanation

An important lesson is to test the deterministic engine without depending on live LLM variability.

CONNECT IT TO YOUR INTERVIEW

Turn this concept into a clear answer.

Practice this concept
YOUR NEXT STEP

Keep connecting the ideas.

Next lesson: Reusable Engine vs. Application

Adapted from 19_deterministic_workflow_engine_learnings.md · “10. Why Scripted Testing Matters”. Examples are study fragments; framework behavior can depend on your version.