@Target(value={METHOD,ANNOTATION_TYPE})
@Retention(value=RUNTIME)
@Documented
@Testable
@API(status=STABLE,
since="1.0")
public @interface Property
@Property
to mark methods that serve as properties.
Those methods usually have one or more parameters annotated with ForAll.
They are executed (tried) several times,
either until they fail or until the configured number of tries()
has been reached.
Just like methods annotated with Example example, annotated methods
must not be private. They can either return Boolean
, boolean
or void
.
For more info, you can have a look at the user guide, optional-property-parameters.
Example
,
ShrinkingMode
,
GenerationMode
,
AfterFailureMode
,
EdgeCasesMode
,
Data
Modifier and Type | Fields and Description |
---|---|
static int |
MAX_DISCARD_RATIO_NOT_SET |
static java.lang.String |
SEED_NOT_SET |
static java.lang.String |
STEREOTYPE_NOT_SET |
static int |
TRIES_NOT_SET |
Modifier and Type | Optional Element and Description |
---|---|
AfterFailureMode |
afterFailure |
EdgeCasesMode |
edgeCases |
GenerationMode |
generation |
int |
maxDiscardRatio
The maximal number of tried versus actually checked property runs in case you are using Assumptions.
|
java.lang.String |
seed |
ShrinkingMode |
shrinking
Controls how shrinking is done when falsified property is found.
|
java.lang.String |
stereotype |
int |
tries
Number of tries (test runs with different parameters).
|
public abstract int tries
Property
annotation.public abstract int maxDiscardRatio
The default is 5 which can be overridden in jqwik.properties.
public abstract ShrinkingMode shrinking
Default value is ShrinkingMode.BOUNDED
, i.e. shrinking is tried to a depth of 1000 steps maximum per value.
@API(status=MAINTAINED, since="1.0") public abstract GenerationMode generation
@API(status=MAINTAINED, since="1.0") public abstract AfterFailureMode afterFailure
@API(status=EXPERIMENTAL, since="1.3.0") public abstract EdgeCasesMode edgeCases