07.02 - Target

FTP

Category-name: ftp.target

What: a ftp target is exactly what you think it is.

Configuration: A simple .properties file dropped in the 'targets' directory of your test project. The file must include the shebang on the very first line: '#!ftp' and it must contain AT LEAST 'squashtest.ta.ftp.host'.

Available properties:

    • squashtest.ta.ftp.host: Supply the host name (mandatory)

    • squashtest.ta.ftp.username: The username to log to

    • squashtest.ta.ftp.password: The corresponding password

    • squashtest.ta.ftp.port: An alternate command port

    • squashtest.ta.ftp.filetype: The default files type. Currently supported: ascii or binary (either uppercase or lowercase).

    • squashtest.ta.ftp.system: The host system type. Currently supported: unix, vms, windows, os/2, os/400, as/400, mvs, l8, netware, macos (either uppercase or lowercase).

Note that unlike the ftp Repository there is no caching option. It is so because, since the content of the ftp Target may be altered by some commands it could lead to inconsistencies with the cache.

Example: valid configuration file

#!ftp

squashtest.ta.ftp.host = myhost

squashtest.ta.ftp.username = tester

squashtest.ta.ftp.password = _tester

squashtest.ta.ftp.port = 50000

squashtest.ta.ftp.filetype = ascii

squashtest.ta.ftp.system = os/400

Remark: Meaning of the 'squash.ta.ftp.filetype': During the download/upload on/from the FTP server:

    • If the property 'squashtest.ta.ftp.filetype has the value 'binary', the file is identicaly transfered.

    • If the property has the 'ascii' value, the file is converted during the transfer (encoding, end-lines and end-file characters). The transfer mode 'ascii' permits to transfer files between heterogeneous systems. The server converts the file from its original format to a standard format '8-bit NVT-ASCII' then the client converts the file at '8-bit NVT-ASCII' format to the arrival format. Consequently when a binary file is transferred in 'ascii' mode, generally he's corrupted during the transfer.