HTF- The Haskell Test Framework

Safe HaskellNone



This module defines the commandline options of the test driver provided by HTF.



data CmdlineOptions Source #

Commandline options for running tests.




parseTestArgs :: [String] -> Either String CmdlineOptions Source #

Parse commandline arguments into CmdlineOptions. Here is a synopsis of the format of the commandline arguments:


  where PATTERN is a posix regular expression matching
  the names of the tests to run.

  -q          --quiet                     Only display errors.
  -n PATTERN  --not=PATTERN               Tests to exclude.
  -l          --list                      List all matching tests.
  -j[N]       --threads[=N]               Run N tests in parallel, default N=1.
              --shuffle=BOOL              Shuffle test order. Default: false
  -o FILE     --output-file=FILE          Name of output file.
              --json                      Output results in machine-readable JSON format (incremental).
              --xml=FILE                  Output results in junit-style XML format.
              --split                     Splits results in separate files to avoid file locking (requires -o/--output-file).
              --colors=BOOL               Use colors or not.
              --history=FILE              Path to the history file. Default: ./.HTF/<ProgramName>.history
              --fail-fast                 Fail and abort test run as soon as the first test fails.
              --sort-by-prev-time         Sort tests ascending by their execution of the previous test run (if available). Default: false
              --max-prev-ms=MILLISECONDS  Do not try to execute tests that had a execution time greater than MILLISECONDS in a previous test run.
              --max-cur-ms=MILLISECONDS   Abort a test that runs more than MILLISECONDS.
              --prev-factor=DOUBLE        Abort a test that runs more than DOUBLE times slower than in a previous run.
              --timeout-is-success        Do not regard a test timeout as an error.
  -h          --help                      Display this message.

helpString :: String Source #

The string displayed for the --help option.