I am facing a problem in master-slave mode, we have a own jar to
create some files after test, but when we run the test in master-slave
mode, each slave will create one file, but we only need a summary file
in master.
Since all the slaves can access the master machine, you can create a common shared file where in the slaves can make their entries based on the data that they have received. This can be done in 2 ways:
- You can use a JSR223 sampler or a Beanshell sampler to write files to a common location thereby having just one master copy of the file
- You can modify the JAR that you are utilizing right now to do the same work
is there a way can instead of master-slave mode, let us use one jmeter
server to test 2000~5000 threads? or change some setting to make the
files only create in master?
No. This is currently not a feasible option since the JAR that has been uploaded will be applicable on all the slave machines and hence will create multiple copies of the file.
Besides, if your master machine could generate 2000-5000 threads, I don't think you would have gone for a distributed load test in the first place.
Hope this helps!