I would suggest using  JCIFS library <https://jcifs.samba.org/>   from a 
JSR223 Sampler
<http://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler> 
, it will provide robust, reliable and cross-platform way of accessing Samba
shares. 

A very simple scenario would look like:


> def filePath  = 'smb://your_server_ip_or_hostname/folder/file.extension'
> NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("",'your
> username', 'your password');
> SmbFile file = new SmbFile(filePath,auth);
> SmbFileOutputStream out = new SmbFileOutputStream(file);
> out.write('hello world'.getBytes('UTF-8'));
> IOUtils.closeQuietly(out)

See  JCIFS examples <https://jcifs.samba.org/src/examples/>  ,  API
documentation <https://jcifs.samba.org/src/docs/api/>   and  Apache Groovy -
Why and How You Should Use It
<https://www.blazemeter.com/blog/groovy-new-black>   for more details. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to