proptastic run
Run the properties with the build's own test runner, with the settings asked for, and summarise them. Each option that is a setting reaches the tests as its PROPTASTIC_ variable, and every PROPTASTIC_ variable already set passes through. Words after -- go to the build as they are.
Usage
proptastic run [DIR] [OPTIONS] [-- BUILD-ARGUMENTS]proptastic runproptastic run --replayproptastic run --at=src/test/java/shop/SortTest.java:31 -- --offlineOutput
As the command printed it, run on a sample project: each is held to a real run by the command's own tests.
proptastic run Failed ────────────────────────────────────────────────────────────────
✗ SortTest#sortKeepsSize counterexample ca97c5d54 expected: <2> but was: <1>
sortKeepsSize failed after 1 try (seed 0x2fc03457e2e24c2) shrunk counterexample: xs = [0, 0] pin it: .example(List.of(0, 0)) rerun: proptastic run --only='SortTest#sortKeepsSize()' --seed=0x2fc03457e2e24c2
Next: proptastic run --only='SortTest#sortKeepsSize()' --seed=0x2fc03457e2e24c2
Properties ✗ 1 failed (1) Ran ./gradlew test --rerun Reports build/proptastic/report/report.json · build/proptastic/report/index.html
registered 1 property; later runs run only thoseproptastic run ✓ SortTest#sortKeepsSize 100 tries · seed 0x5b9d79b7fb51deb1
Properties ✓ 1 passed (1) Ran ./gradlew test --rerun --tests SortTest.sortKeepsSize Reports build/proptastic/report/report.json · build/proptastic/report/index.htmlExit status
0 when every property passed; 1 when a property has a counterexample; 2 for a mistake in the command, the environment or a file, or a build proptastic couldn't read; 3 when the build, or a test that isn't a property, failed before any property ran; 4 when proptastic itself went wrong; 130 when stopped with Ctrl-C: the build was stopped, and nothing it left is reported. The errors behind 2, 3 and the refusals are on Command errors; every code is on Environment and exit codes.
Options
--only=PROPERTY
Only this property, by its id as the manifest has it, or by its name alone when exactly one property has that name.
proptastic run --only=SortTest#sortKeepsSize--at=PATH:LINE
Only the property whose forAll is on this line.
proptastic run --at=src/test/java/shop/SortTest.java:31--edition=EDITION
Which edition's build to run, when DIR's build files could be either's.
One of java, rust, swift.
proptastic run --edition=java--profile=PROFILE
Sets PROPTASTIC_PROFILE: how hard to search, pr when CI is set and local otherwise.
One of local, pr, nightly.
proptastic run --profile=nightly--seed=SEED
Start from this seed, 0x and hex digits, as a failure prints it. Sets PROPTASTIC_SEED.
proptastic run --seed=0x5eed--tries=N
Tries per property, in place of the profile's; fuzz stops searching a property after that many. Sets PROPTASTIC_TRIES.
proptastic run --tries=10000--replay
No new tries: the pinned examples, the saved counterexample and the corpus only. Sets PROPTASTIC_TRIES=0.
proptastic run --replay--no-shrink
Report the first counterexample as found. Sets PROPTASTIC_SHRINK=false.
proptastic run --no-shrink--statistics
Print what classify counted for each property, pass or fail. Sets PROPTASTIC_STATISTICS=on.
proptastic run --statistics--report=KIND[:PATH]
proptastic's own report of the run, beside the build's test report: json, html or sarif, each into report/ in proptastic's directory unless a path follows the kind, or none; json and html when not given.
One of json, html, sarif, none.
proptastic run --report=json--format=FORMAT
How proptastic answers: agent for coding agents, jsonl for tools; full on a terminal, concise elsewhere.
One of full, concise, agent, jsonl.
When it isn't given: PROPTASTIC_FORMAT, PROPTASTIC_AGENT.
proptastic run --format=agent--color=WHEN
Sets PROPTASTIC_COLOR: whether what proptastic and the properties print is in colour, auto when not given.
One of auto, always, never.
When it isn't given: PROPTASTIC_COLOR, NO_COLOR, FORCE_COLOR.
proptastic run --color=never