Summary

It must have been evident from this chapter how useful property-based testing is to remove redundant tests and have maximum coverage. Both, table-driven and Generator-driven property checks have their own niche. They also have some downsides, as the test data is not well documented, especially when Generator-driven checks are used to test properties. They can be clubbed with more detailed examples or BDD instructions, which provide for the documentation aspect.

Get Scala Test-Driven Development 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.