Integer Incrementer
formatting...Unique incremented integer each time it is accessed.
Useful to generate unique ID for each request.
Format
The first value of an integer that is going to be used.
Arguments
Name | Type | Description | Default |
---|---|---|---|
step |
int |
how much the value should increment each time | 1 |
persist |
bool |
if the initial value should be persist and loaded from file | False |
Example
example.feature
And value for variable "AtomicIntegerIncrementer.unique_id" is "100 | step=10"
And value for variable "AtomicIntegerIncrementer.persistent" is "10 | step=5, persist=True"
This can then be used in a template:
Values of AtomicIntegerIncrementer.unique_id
, per run and iteration:
-
Run
-
100
-
110
-
120
-
...
-
-
Run
-
100
-
110
-
120
-
...
-
Values of AtomicIntegerIncrementer.persistent
, per run and iteration, for 4 iterations:
-
Run (
features/persistent/example.json
missing)-
5
-
15
-
20
-
25
-
-
Run (
features/persistent/example.json
created by Run 1, due topersistent=True
), initial value25 | step=5, persist=True
will be read from the file and override what is written inexample.feature
-
30
-
35
-
40
-
45
-