Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass testing options #21

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

bogdan-manole
Copy link
Collaborator

@bogdan-manole bogdan-manole commented Jan 14, 2025

Fixes #9

NOTE:

works just with input-output-hk/minimal-ptt-examples#21 (the branch is in https://github.com/bogdan-manole/minimal-ptt-examples/tree/feat/testing-options )

for all available options use :
nix run .#ptt-cli -- run-tests -h or cabal run ptt-cli-test -- -h

ptt-cli run-tests — Run all tests

Usage: ptt-cli run-tests [--test TEST_NAME | --pattern PATTERN]
                         [-t|--timeout DURATION] [-c|--test-coverage]
                         [-j|--num-threads ARG] [--min-duration-to-report ARG]
                         [--quickcheck-tests ARG] [--quickcheck-replay ARG]
                         [--quickcheck-max-size ARG]
                         [--quickcheck-max-ratio ARG] [--quickcheck-shrinks ARG]

Available options:
  --test TEST_NAME         Run a single test
  --pattern PATTERN        Run all tests matching a pattern
  -t,--timeout DURATION    Timeout for individual tests (suffixes: ms,s,m,h;
                           default: s)
  -c,--test-coverage       Enable test coverage. Flag presence implies True.
  -j,--num-threads ARG     Number of threads to use for tests execution
                           (default: # of cores/capabilities)
  --min-duration-to-report ARG
                           The minimum amount of time a test can take before
                           tasty prints timing information (suffixes: ms,s,m,h;
                           default: s)
  --quickcheck-tests ARG   Number of test cases for QuickCheck to generate.
                           Underscores accepted: e.g. 10_000_000
  --quickcheck-replay ARG  Random seed to use for replaying a previous test run
                           (use same --quickcheck-max-size)
  --quickcheck-max-size ARG
                           Size of the biggest test cases quickcheck generates
  --quickcheck-max-ratio ARG
                           Maximum number of discared tests per successful test
                           before giving up
  --quickcheck-shrinks ARG Number of shrinks allowed before QuickCheck will fail
                           a test
  -h,--help                Show this help text

@bogdan-manole bogdan-manole changed the title refactor: removing unnecessarily Ord instances feat: pass testing options Jan 14, 2025
@bogdan-manole bogdan-manole marked this pull request as ready for review January 23, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant