Skip to content

FAQ

The questions people ask first, each answered in a few lines, with where to read more.

No. Keep the examples that say something exact, a format a person depends on, and add properties for the rules behind them. A property can keep your cases as examples that run first, every time. Migrating from example tests shows both side by side.

No. A property is a call inside a plain @Test, forAll(…).check(…), and your test framework runs it as any other test: JUnit 5 or 4, TestNG, Kotest, Spock, or a plain main. With your test framework has each.

100 random ones a property, unless .tries(…), PROPTASTIC_TRIES or a profile says otherwise, after its examples and anything saved from earlier runs. A small domain can run every value instead, with .exhaustively(). Profiles and budgets and Every value say more.

Each run picks a new seed unless you set one, so each run checks different inputs, which is how it finds what the last one missed. A failure prints its seed, and the same seed draws the same inputs on any machine, so any failure can be run again exactly. Set PROPTASTIC_SEED, or .seed(…) on a property, for a run that’s the same every time. Seeds and replay

proptastic shrinks a failing input to the smallest that fails the same way, so what you read is the bug and little else. Shrinking

No: a pass says the rule held for the inputs drawn. Drawing many, and the edges on purpose, finds far more than a few hand-picked cases, and How sure is a pass? works out what one is worth. Running every value of a small domain, with .exhaustively(), is the exception: there a pass has checked them all.

A run doesn’t: it draws inputs and checks a rule, and doesn’t watch which lines run. A search with the proptastic command’s fuzz does, with the agent jar, to steer toward inputs that reach new branches, but what it keeps for later runs is inputs, and it claims no coverage. To see how often each kind of input came up, use classify; to know whether your tests would catch a bug, run mutastic.

Yes: steps on threads, every interleaving within a bound, with .threads(n), and an optional agent for code written without proptastic in it. Concurrency and Races in plain code

The Rust edition is being built, and Swift is planned, each with the same words and failures. Editions

Privacy