In this blog i will represent you how i read jmeter properties files . These properties can be used later in word documents, sending email, etc...
Jmeter properties files
Property file used in jmeter run:- RL_ParallelRuns=1
- RL_Repetitions=100
- RL_RampUpPeriod=1
- RL_TestDurration=30000
Here is part written in powershell how to rad jmeter properties file. Function 'convertfrom-stringddata' is used to parse structured text in property file. Property '-RAW' define that file is read as single string.
Here is example how to read jmeter properties file:
$file = "yourfile.properties"
$propertiesfile = convertfrom-stringdata (get-content $file -raw)
Once we have a read a file in '$propertiesfile' now is possible to read parameters by name:
$JMeterMaxThread= $propertiesfile.'RL_ParallelRuns'
$JmeterTestDuration= $propertiesfile.'RL_TestDurration'
$JmeterRepetitions = $propertiesfile.'RL_Repetitions'
Parameter 'RL_ParallelRuns' is defined in upper property file and can be reached in simple way just to write name of the varible which read file and property :
$propertiesfile.'RL_ParallelRuns'
Ni komentarjev:
Objavite komentar