The CIFS example below illustrates the actions, directory/file and forms database needed to create and write a unique file to a file server or a DUT (device under test). Each user will create a unique file - ten files total named test1.txt to test99.txt. Modify the range in action SEQUENTIAL below if more files are needed. The example uses the Avalanche client and server as reference; modify your server IP address, username, password, directory, etc. as needed. For more information of the CIFS subcommands please refer to the Avalanche online help.
FSTREE=temp1 ASSIGN VARIABLE <fileIndex SEQUENTIAL 1 99> ASSIGN VARIABLE <txt ".txt"> ASSIGN VARIABLE <combine fileIndex txt> ASSIGN VARIABLE <name "test"> ASSIGN VARIABLE <add name combine> ASSIGN VARIABLE <srcFile Form_0002.$1>
CIFSNG://192.168.1.1 USER=test PASSWD=test123 AUTH_TYPE=NTLM AUTHDOMAIN=spirent.com CONNECTION_TREE=\\192.168.1.1\temp1 CIFS_SUB_CMD CIFS_READ_BLK_SIZE = 16384 CIFS_SUB_CMD CIFS_WRITE_BLK_SIZE = 16384
CIFS_SUB_CMD OPEN_NEW FILENAME_VAR=<APPLY add> CIFS_SUB_CMD WRITE FILENAME_VAR=<APPLY add> OFFSET=1 BYTE_SIZE=120000 INPUT_SOURCE_VAR=<APPLY srcFile> INPUT_OFFSET=1 CIFS_SUB_CMD CLOSE FILENAME_VAR=<APPLY add>
You will need to specify a source file (located on your PC) to support the INPUT_SOURCE_VAR action. In the Client > Actions > Directories tab, create a new directory called temp1. Please refer to picture below:
Note the directory/folder with test.1.txt is located on your local PC. Create the directory and a file with some contents if needed.
Next refer to the picture below, create a Forms database called Form_0002 to support the actions ASSIGN VARIABLE <srcFile Form_0002.$1> and INPUT_SOURCE_VAR=<APPLY srcFile>