Wrapping Up
Targeted properties are still very new, and few people have had the opportunity to put them in practice in real world projects at the time of this writing. In this chapter, we’ve covered what targeted properties look like and explored how they work, including simulated annealing.
You’ve seen how to write a neighbor selection function, although how to write a good one is still not extremely obvious. But to help with that, we have seen how targeted properties used with search macros (EXISTS and NOT_EXISTS) within regular properties can make up for some less-than-ideal neighbor functions. The ability to nest searches this way also explained some of the more annoying weaknesses of targeted properties—the inability to gather metrics and ...
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.