Talk: Property-based testing: extending examples to a specification
Speakers directory
Speaker:
Giorgio Sironi
Talk description
Title:
Property-based testing: extending examples to a specification
Short synopsis:
Property-based testing, introduced in the functional programming world by QuickCheck, is an effective way of reaching a great test coverage with low maintenance costs. The practice is based on randomized input and invariant properties of the system under test; as the saying goes, don't write your test: generate them.
Max size: 500 chars
Long synopsis (optional):
Example-based testing is all the rage in our unit and acceptance test suites: Given/When/Then is commonly implemented as driving a system with an initial state and a command, and checking the output is equal to what is expected. Property-based testing lets the programmer generate a set of possible inputs to the System Under Test, and check invariant properties that should always be satisfied. For example, testing a sorting algorithm consists in verifying that its output is always sorted, and more. The interesting aspects of property-based testing are: - the coverage of test data, wider than what can possibly be created by a human. - The lower maintenance costs of properties with respect to hand-written expected value assertions. - The time savings of checking multiple properties over the same run of the tests.
Max size: 5000 chars
Tags:
Speaker directory:
Listed in directory
Not listed
Speakers directory