This tool is a property-based testing application developed in Haskell specifically designed for exams, homeworks. It automatically runs tests and evaluates them based on properties specified by the instructor, generating a report afterwards. The tasks provided by the instructor, along with their properties, are processed and stored in a database for future use.
- Automated testing based on predefined properties
- Evaluation and report generation
- Processing and storage of tasks and their properties in a database
- CLI-based user interface
- JSON formatted reports
The program is intended to run on a Linux operating system or Windows Subsystem for Linux 2 (WSL2) environment. To compile, install and run this application, the following software is required:
- Glasgow Haskell Compiler (GHC) 9.2.7 (with base-4.16.4.0)
- Cabal 3.6.2.0
At present, the simplest and recommended way to ensure a suitable software environment is through the use of GHCup.
-
Clone the repository.
-
To compile the program, run the following command:
cabal build tester
Upon issuing this command, the dependencies recorded in the .cabal file will be downloaded for compilation and installation.
-
For the program to operate correctly, the QuickCheck package must also be available in the global GHC environment. To install QuickCheck, run the following command:
cabal install QuickCheck --lib
-
Install the application with the following command:
cabal install tester
After installing the application, you can check the available commands and options by running:
tester -h
- QuickCheck: for running property-based tests
- hint: for runtime interpretation of Haskell code
- sqlite-simple: for interfacing with SQLite databases
- optparse-applicative: for parsing command-line options and arguments
- async: for higher-level operations on threads and asynchronous I/O
- random: for generation of random numbers
- aeson: for encoding and decoding JSON
- aeson-pretty: for encoding JSON in a human-readable format
- text: for efficient string manipulation
- time: for time-related functionality
- directory: for file and directory manipulation
- filepath: for manipulating FilePath values in a cross-platform way
If you would like to contribute, please fork the repository and use a feature branch.
The tool is open-sourced under the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.