February 2018
Intermediate to advanced
304 pages
7h 11m
English
Classic example-based unit testing relies on the programmer to test a function by writing a series of example inputs, then writing assertions about the return value when the function is invoked with each input.
In comparison, generative testing is a technique that produces thousands of random inputs, runs a procedure, and verifies a set of properties for each output. Generative testing is a great technique for getting broader test coverage of your code.
Spec can automatically perform generative testing for functions that have function specs. Let’s see how that’s done and then explore ways to influence those tests for more accurate coverage.
Spec implements automated generative testing with the ...