Latest change Feb. 6, 2023

Instructions for how to use FsCheck in the DVA229 Lab Course

  1. Download labs.zip, and unpack where your project is located.
  2. For Lab 1 load the script file fsi.fsx into F# interactive (fsi). This will load the included version of FsCheck and load the code files in correct order.
  3. The Test module contains wrappers for running the tests. In fsi you can run all tests using Test.all();;. This will also happen if you compile and run the project directly.
  4. Alternatively: use the individual test functions in Test.fs one by one.
  5. Similarly for Lab 2 (fsi.fsx will load all of Tree.fs, BST.fs, List.fs followed by Test.fs and finally Program.fs from DVA229Lab2/).

We suggest that you use the lab skeleton files as templates for your solutions to the assignments. These files are Lab1.fs for Lab 1, and List.fs, Tree.fs, BST.fs for Lab 2. If you use them, then functions and modules will have the correct names that are used when the test functions are run by FsCheck.


Björn Lisper
bjorn.lisper (at) mdh.se