What does a test need to observe?
A first note on choosing signals that help explain the result of a software test.
At an electronics test bench, choosing where to put a probe is part of designing the test. That choice determines what you can observe and which questions you can answer later. I want to explore the same decision in software testing.
From signals to evidence
Imagine a test for a service that accepts a request and processes it asynchronously. An acknowledgement confirms that the service received the request. If we want to check that the work completed, we need to observe another point in the system.
We could record the request ID when we send it and look for that same ID in the result the service produces. Before running the test, it helps to define what counts as a result and how long we expect to wait. If it does not appear, the test can report exactly what happened: the request was accepted, but the expected result was not observed within the time allowed.
Three questions for the next experiment
- What claim do I want to check? State it before deciding what to record.
- Where can I observe it? Choose a point that distinguishes receipt of a request from completion of the work.
- What evidence should I keep? Record enough context to explain the result later.
One question remains open for me: what is the smallest set of signals that can explain a failure without tying the test to internal details? I want to return to it with an example I can run and repeat.