How to set path to the file location in the "CSV Data Set Config" if csv.file is located in bitbucket
Solution 1
CSV Data Set config will accept
- Absolute path (the complete path like c:\path\to\csv\file.csv)
-
Relative path from the test (csvfolder\csvfile.csv)
csvfolder csvfile.csv .jmx
Assuming the 'csvfolder' folder is present where you have .jmx
If your folder structure is as given below,
csvfolder
csvfile
jmxfolder
jmx
then your CSV file path should be ../csvfolder/csvfile
Solution 2
Not sure about you specific combination, but usually if your files are in the same location you can refer to them by name only.
Let's say
%JMETER_HOME%\jmeter -n -t %LOAD_TESTS_RUNNER_%/_warmup.jmx
-Jusers=1 -Jrampup=5 -Jloop=2 -JpathToToken=Token.txt
Token.txt is just located in the same directory as *.jmx file.
Optionally, you could use system variables to contain your paths.
Solution 3
Depending on your Bitbucket underlying repository type you can configure Jenkins job to be triggered by commit using
So you will be able to refer paths to JMeter .jmx and .csv files just using their names. Or if you prefer full paths - you can use WORKSPACE
Jenkins variable like:
-
%WORKSPACE%
- for MS Windows Family -
$WORKSPACE
- for Linux/Unix/MacOSX
See Continuous Integration 101: How to Run JMeter With Jenkins article for more information on running JMeter tests from Jenkins
mariia
Updated on June 21, 2022Comments
-
mariia almost 2 years
I want to run Jmeter project in Jenkins. I commited project.jmx and related csv files in bitbucket. How can I set the path to the csv file located in bitbucket