Search⌘ K
AI Features

Limitations of Targeted Properties

Explore the limitations of targeted properties in property-based testing with Erlang. Understand challenges such as incompatibility with recursive generators and the inability to gather automated statistics. Learn about search macros like ?EXISTS and ?NOT_EXISTS, and see how targeted properties offer unique validation methods despite their constraints.

Limitations of targeted properties

Targeted properties do not allow all the same facilities as we’d get with regular properties. They don’t work well with recursive generators, whether we use ?LAZY or not. Using that combination may yield infinite loops. In those cases, it is best to stick to rather straightforward combinations of default generators.

They also don’t allow the gathering of statistics and metrics using collect/2 and aggregate/2, so any validation and accounting that needs to be done will ...