SaTracking
ValidationNEWIntermediate

Choose between mocks fakes stubs and real dependencies

A practical guide to behavior verification, state verification, fidelity and contract risk, with repeatable methods, evidence and review criteria.

Download for AI (.txt)

Want to check this in your browser? Run the local audit.

Measurement topic illustration · SaTracking

This guide explains how to apply behavior verification, state verification, fidelity and contract risk in a repeatable analytical or delivery workflow. The aim is not to add ceremony: it is to make assumptions visible, reduce avoidable rework and produce evidence that another practitioner can review.

Start with the decision context

Before choosing a technique, state the decision or downstream task this work must support. Identify the people who will use the result, the system boundary, the relevant time period and the level of detail. Agree the vocabulary with domain owners. Record assumptions separately from confirmed facts, and identify which constraints are mandatory rather than preferred.

Apply a controlled method

Use a stub to supply controlled responses, a fake for a lightweight working implementation and a mock when interaction expectations matter; retain integration checks against real contracts; avoid mocking internal details unnecessarily.

Check quality and edge cases

A test double can drift from the real service. The more behavior it simulates, the more important contract tests become. Test the method with representative normal cases and deliberate edge cases. Include empty, duplicated, late, invalid or unusually large records when relevant. Compare a small hand-checked sample with the automated result. Keep a record of the input version, rule set, execution date and unresolved exceptions so the outcome can be reproduced.

Operationalize the result

Assign an accountable owner for definitions, thresholds and exceptions. Decide how often the work must be repeated and what event should trigger an earlier review. Make outputs discoverable to downstream teams, but do not publish a result until its limitations and acceptance criteria are clear. When the source, policy or business meaning changes, update the documentation and rerun the checks.

Review checklist

  • Is the intended decision and scope explicit?
  • Are terms, keys, units and time boundaries defined?
  • Can another person reproduce the result from recorded inputs and rules?
  • Have exceptions and known limitations been retained rather than hidden?
  • Is there an owner and a review trigger?

Further reading

Official references

EDITORIAL HISTORY

What changed

  1. v1.0
    Created an original bilingual guide from the collective source library with supporting references.
MEASUREMENT SUPPORT

Need a hand with your tracking?

Nicolas Salazar works with teams on analytics, tracking plans, data quality, consent, and implementation.