Implementation of the monkey testing idea.
Create BlockSequence
with one of following keywords:
blocks
- runs all blocks once with respect to their probabilitiesall
- run all possible block combinations. Ignores block probabilitiessome(n: Int)
- run blocksn
times (works like for-loop or repeat for now)
Each block is executed with a particular probability:
block
- 100% probability (always executed)usually
- 80%sometimes
- 20%rarely
- 5%chance(p: Double)
- execute with a probability ofp
(in range 0..1)
You can change probabilities of block execution in Configuration class
It is possible to intercept a block call by adding an Interceptor.
Method intercept(block: Block, isRan: Boolean)
is called on each following block, regardless of whether it is ran or
not (parameter isRan
shows just that).