Package net.jqwik.api
Annotationsschnittstelle Property
@Target({METHOD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Documented
@Testable
@API(status=STABLE,
since="1.0")
public @interface Property
Use
@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.
- Siehe auch:
-
Optionale Elemente - Übersicht
Modifizierer und TypOptionales ElementBeschreibungint
The maximum ratio of tried versus actually checked property runs in case you are using Assumptions.Controls how shrinking is done when falsified property is found.int
Tries are the test runs with different parameters.Controls how to behave if aseed()
is present. -
Feldübersicht
-
Felddetails
-
TRIES_NOT_SET
static final int TRIES_NOT_SET- Siehe auch:
-
MAX_DISCARD_RATIO_NOT_SET
static final int MAX_DISCARD_RATIO_NOT_SET- Siehe auch:
-
SEED_NOT_SET
- Siehe auch:
-
STEREOTYPE_NOT_SET
- Siehe auch:
-
-
Elementdetails
-
tries
int triesTries are the test runs with different parameters. By default it is 1000. You can override globally in the property file (see jqwik.properties, or here, inProperty
annotation.- Gibt zurück:
- number of tries to run
- Standard:
0
-
maxDiscardRatio
int maxDiscardRatioThe maximum ratio of tried versus actually checked property runs in case you are using Assumptions. If the ratio is exceeded jqwik will report this property as a failure.The default is 5 which can be overridden in jqwik.properties.
- Gibt zurück:
- the maximum ration
- Standard:
0
-
seed
String seed- Standard:
""
-
shrinking
ShrinkingMode shrinkingControls how shrinking is done when falsified property is found.Default value is
ShrinkingMode.BOUNDED
, i.e. shrinking is tried to a depth of 1000 steps maximum per value.- Gibt zurück:
- the shrinking mode
- Standard:
NOT_SET
-
stereotype
String stereotype- Standard:
""
-
generation
- Standard:
NOT_SET
-
afterFailure
- Standard:
NOT_SET
-
edgeCases
- Standard:
NOT_SET
-
whenFixedSeed
Controls how to behave if aseed()
is present.Default value is the value from the global
jqwik.seeds.whenfixed
configuration property.- Gibt zurück:
- the fixed seed mode
- Standard:
NOT_SET
-