[erlang-questions] PropER generator for list of records with a sequence number

Frans Schneider fchschneider@REDACTED
Mon Dec 10 08:30:38 CET 2018


Hi list,

In PropER, I am looking for a way to generate records with one field 
being a sequence number which is incremented for each instance.

-record(cache_change, {sequence_number :: sequence_number(),
		       ...
		       data_value :: term()).

Every cache entry is supposed to have a new sequence number which is 
normally generated by the application, but I now want PropER to generate 
the sequence numbers to test drive the cache in isolation.

How does one create a custom generator for this?

Another, related question, is how to start an unregistered process (the 
cache) in PropER and use its pid? Normally, the caches are started from 
a simple-one-for-one supervisor. The cache should be restarted for every 
test run. PropER documentation and examples always show registered 
processes and not unregistered processes.

Thanks,

Frans



More information about the erlang-questions mailing list