- Overview
- Getting started
- User Guide
-
Reference
-
Steps
- addToInt
- awaitAllResponses
- awaitDelay
- awaitInt
- awaitVar
- breakSequence
- clearHttpCache
- conditional
- fail
- foreach
- httpRequest
- json
- log
- loop
- nextSequence
- noop
- pullSharedMap
- pushSharedMap
- randomCsvRow
- randomFile
- randomInt
- randomItem
- scheduleDelay
- set
- setInt
- stop
- stopwatch
- stringToInt
- template
- thinkTime
- unset
- Processors
- Actions
-
Steps
- Custom extensions
- Controller API
- Release notes
randomFile
Reads bytes from a randomly chosen file into a variable. Two formats are supported: Example 1 - without weights:
toVar: myVar
files:
- /path/to/file1.txt
- file2_relative_to_benchmark.txt
Example 2 - with weights (the second file will be returned twice as often):
toVar: myVar
files:
/path/to/file1.txt: 1
file2_relative_to_benchmark.txt: 2
Property | Type | Description |
---|---|---|
filenameVar | String | Optional variable to store the filename of the random file. |
files | Builder | Potentially weighted list of files to choose from. |
toVar | String | Variable where the chosen byte array should be stored. |
files
Property | Type | Description |
---|---|---|
<any> | <list of strings> | Item as the key and weight (arbitrary floating-point number, defaults to 1.0) as the value. |
<list of strings> | <list of strings> | Item as the key and weight (arbitrary floating-point number, defaults to 1.0) as the value. |