Adjusting the Model: Better Statistics
Let’s learn how the statistics of the tests could be improved using the optional weight call back.
We'll cover the following
Adding the call back
Let’s take a look at the call-backs
The call back is in the test/break_test.exs
file in the code below between line 78 and line 90. It has been highlighted.
The call raises the probability of any call forcing a transition from ok
to tripped
and also increases the probability of all error calls in the ok
state. The rest of calls, such as error calls that are already in the tripped
state and manual blocks, remain neutral in terms of probabilities.
Let’s run the code and see what we get.
Running the code
Get hands-on with 1400+ tech skills courses.