I have two questions and they are related.
- How to make gatling print out the currently used data-folder location?
- Does the data-folder have to be current working directory?
I think the second one is no that is why there is a data-folder option on the command line but I am seeing some weird behavior using gatling 2.2.0 snapshot.
If I am in a different directory and execute
/Users/ggao/Programs/gatling/bin/gatling.sh -sf /SomePath/user-files/simulations -s TestSim -df /tmp
GATLING_HOME is set to /Users/ggao/Programs/gatling
Simulation PostThenPatch started…
…//SKIPS MANY LINES and don’t see the post.json show up in the request log
---- Errors --------------------------------------------------------------------
Your problem here however is that you’re probably not using a feeder or not entered ‘id’ as a header in your data file.
So there is no way of overriding the data folder path on the command line? I thought that was the option -df is used for. As for the sbt, I don’t think we can install sbt on the server box so we will have to use the gatling shell script to do everything.
Yes, you can use ‘-df’ option to override the data folder (https://github.com/gatling/gatling/blob/59dc48a7b4791d39ca8e3419a17416747c12c1ce/src/sphinx/general/configuration.rst#command-line-options).
Sometimes, I feel that when servers are locked down are you are being held-up by bureaucracy, it may be worth just to run your tests from The Cloud. Google Cloud gives you two months free or up to $300. The interface and command tools are pretty clean and when you do pay, you pay by the minute not the hour.
I guess I didn’t make my question clear. I am using the -df option to override the data folder. However, if I am in a folder other than the directory that contains my data I get file does not exist error. If I cd into the /tmp directory based on my example, then the test is able to find the post.json.
If I execute /Users/ggao/Programs/gatling/bin/gatling.sh -sf /SomePath/user-files/simulations -s TestSim -df /tmp from /Users/ggao/Tests, the error says post.json does not exists.
If I execute /Users/ggao/Programs/gatling/bin/gatling.sh -sf /SomePath/user-files/simulations -s TestSim -df /tmp from /tmp then everything works.
I am not sure why.
After reading through the link you provided, I have finally figured it out. Since I am using the post.json in the body of the request, it have to be using -bdf to specify the location.
I guess the default is trying the current directory?
data is for feeders.
body-files is for bodies.