How to reference files on the host system in Blazemeter test when using an OPL in docker?
search cancel

How to reference files on the host system in Blazemeter test when using an OPL in docker?


Article ID: 213567


Updated On:




 Hi Support,

I have an upcoming test that will need to be automated and run on a regular basis, however, I'm facing a challenge because this test involves uploading PDFs into the application.
However, the problem we're facing is that we have around 400 PDFs ranging in various sizes up to 100MB in size.
Our organization has dedicated OPLs which we have uploaded all these PDFs to and they sit in a particular path which is "/mnt/projects/".
What we are trying to do is to get Blazemeter to recognize the location of these files. Since Blazemeter is sitting inside a docker container is it possible to point Blazemeter to those files?
I know in the past we had a similar issue with zip files and support suggested we put them on the host system, but I forget what the full recommendation is.
Please let me know as soon as you can as this is a high-priority project and if we can't use Blazemeter it'll be a big problem for our team. 


OPL Docker


Currently, when we build a docker command for the agent we use the -v option for the tmp volumn.
docker run -d 
-v /var/run/docker.sock:/var/run/docker.sock 
-w /usr/src/app/ 
-v /tmp:/tmp

The suggestion:
you might be able to do this by adding the "-v [host directory path]:[container directory path]" option to the docker run command to start the agent.  
Then any file located in the [host directory path] should be accessible in the container using the [container directory path].  
Your scripts would then access the files in the test script using the [container directory path] absolute pathname.

This is not documented in BlazeMeter that I can find, but it is documented in docker:

This has not been officially tested by the dev team and Q&A so is currently not officially supported.

If you need it to be officially supported please do open an enhancement request via the BlazeMeter Ideation page.