This may be a unique situation. I currently develop my test plans on my desktop 
which is running Microsoft Windows. The load agents that are responsible for 
the stress tests, however, are on Linux servers. Is there a way Jmeter can 
detect which OS it's running on? The one case where this is needed is when 
defining the location of the data files. From my desktop, I define the path to 
a network share (e.g. \\netshare\jmeter\data). On the Linux agents, we mounted 
that network share to /mnt. So when the test plan runs on the Linux agent, it 
needs to get the data files from /mnt/jmeter/data. 
For now, I've made the data file path a parameter that I can pass in to the 
test plan, but was hoping a I can define both paths and have Jmeter decide 
which one to use depending on which OS it's running on. 
One way is to use an OS sampler in the setUp thread and try to perform a 
Windows only command (dir ?) and see if it returns and error. I can then assume 
we're on a Linux server. 
Thanks,
Marcelo                                           

Reply via email to