Search⌘ K

Adjusting the Model: Fixing the Issue

Explore how to detect and correct discrepancies between a state machine model and the real system during property based testing. Understand failure sequences, refine state transitions, and adapt your model for accurate testing of systems like circuit breakers.

Finding the issue

The first step of any stateful failure is to figure out which failing sequence caused the problem. Shrinking does most of the job, but we still have to extract meaning out of it. We have something similar to the following:

Test failure output
Test failure output

This creates a sequence of events and state transitions as follows:

At least, that’s the expectation from the history we have. But for the last error call, we’d expected to see {error, {circuit_breaker, _}} since we’re in the tripped ...