Adjusting the Model

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

 [{set,{var,8},{call,break_shim,success,[]}},
  {set,{var,9},{call,break_shim,timeout,[]}},
  {set,{var,10},{call,break_shim,ignored_error,[ignore1]}},
  {set,{var,11},{call,break_shim,timeout,[]}},
  {set,{var,12},{call,break_shim,timeout,[]}},
  {set,{var,13},{call,break_shim,err,[whatever]}}]
 History: [{{unregistered,{data,3,0,0}},success},
  {{ok,{data,3,0,0}},{error,timeout}},
  {{ok,{data,3,0,1}},{error,ignore1}},
  {{ok,{data,3,0,1}},{error,timeout}},
  {{ok,{data,3,0,2}},{error,timeout}},
  {{tripped,{data,3,0,3}},{error,whatever}}] ...

Get Property-Based Testing with PropEr, Erlang, and Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.