Overview
Property Based Testing is an automated testing approach that allows you to zero in on the expected behavior of a system by describing its properties, then using randomly generated test data to execute tests.
QuickCheck (or QuickCheck2, QC2) is a Haskell-based library for random testing of program properties. It takes the specification of a program — the properties that a function should satisfy — and tests that those properties hold in many randomly generated cases.
In this instructor-led, live training, participants will learn how to write the specifications of a program in the form of properties, then provide them as input to QuickCheck for automatic generation of test cases.
By the end of this training, participants will be able to:
- Write general properties that replace and/or compliment hand-written unit test cases
- Write tests at the higher level of property specifications
- Set up a testing environment and integrate QuickCheck into an end-to-end deployment processes
Audience
- Software test engineers
- Developers
Format of the course
- Part lecture, part discussion, exercises and heavy hands-on practice
Requirements
- Some test automation experience is helpful
- Haskell programming experience
Course Outline
Introduction
- Property based testing vs unit testing
Overview of Haskell and QuickCheck
Setting up the test environment
Using combinators
Defining properties
Observing the distribution of test data
Defining test data generators
Generating test cases
Executing tests
Debugging and modifying of properties
Integrating QuickCheck into a continuous testing and deployment environment
Other available frameworks
- SmallCheck
Closing remarks