New file control features, including zip filesby edA-qa mort-ora-y on Thursday November 27 2008 @ 15:19:38 (5/5 Points) |
|
| API ↪Reference ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
I've added a few more functions to support working with files, in particular to create a zip file (I needed to upload one to an FTP site).
The functions/units added are:
- DeleteFile
- ListFiles
- MakeDir
- ReadFile
- UnzipFile
- WriteFile
- ZipFiles
This the extract from the script which uses them.
call unit.file.WriteFile with
%Text% %SoapXML%
%Name% main.xml
%Encoding% iso-8859-1
end
call unit.file.WriteFile with
%Text% %UserXML%
%Name% user.xml
%Encoding% iso-8859-1
end
set %ZipName% Test-%Var:UniqueString%.zip
call unit.file.ZipFiles with
%Name% %ZipName%
%Files% withvector
main.xml
user.xml
end
end
call unit.ftp.SendFile with
%LocalFile% %ZipName%
%RemoteFile% %FTP.UploadPath%/%ZipName%
end
TestPlan New file control features, including zip files
