Use the FTP test step to upload files on an FTP server. This step attempts to upload files on the specified server using the provided credentials.
Important
For now, only the basic FTP protocol is supported. This means you cannot specify whether you want the step to access the FTP server in explicit or implicit mode or use a client certificate for authorization.
Please note that the FTP step is meant to perform a passive mode FTP connection.
You can modify the settings of a test step in its editor:
![]() |
Important
Some fields of the editor allow you to use Property Expansions.
FTP Server Hostname
Required. The hostname (domain name) or IP address of the FTP server you need to access, without the protocol and server directory specified. For instance, example.com
.
Port
Required. The port number of the FTP server you need to access. By default, FTP servers use port 21.
User
The user account you use to access the FTP server.
Tip
If the server you try to access allows it, you can log in anonymously. To do that, omit both the login and password or use the anonymous
login and an arbitrary password.
Password
The password of the account you use to access the FTP server.
Source File
The fully qualified name of the file to be sent to the server. You can either type the name or click Browse and pick it by using the standard Open File dialog.
Remote Directory
The path to the FTP server directory you want to store the file in. If the directory does not exist, ReadyAPI will create it.
File Name
The name the remote copy of the file will receive after uploading.
Configure for SFTP
There is support to use SFTP in the FTP Test Step. Select Turn on SFTP to enable it. FTP is the default setting. SFTP works once ticked. You can also add a private key.
Besides the test step editor, you can adjust the test step's behavior by using its properties in the FTP Properties and Custom FTP Test Step Properties panels in the Navigator.
FTP Properties
Name | Description |
---|---|
Name | The test step name. |
Description | The text describes the test step. |
Keep session until test case ends |
NoteThis property affects only a single FTP test step when it is run in a Data Source loop. If there are several FTP test steps in a test case, ReadyAPI creates a new connection for each test step, so you need to specify FTP credentials for each test step. |
Custom FTP Test Step Properties
Values on the Custom FTP Test Step Properties tab are available to other test steps in your project. For instance, you can verify these property values with the Assertion test step, check them, and change the execution flow with the Conditional GoTo test step.
You can modify custom properties, load their values from a file, or save them to a file. To learn more, see About Properties.
This tab contains the following properties that provide access to the request and response data:
Name | Description |
---|---|
serverPath | The path to the FTP server directory to which you upload the file. |
fileName | The name the file will receive after uploading to the server. |
port | The port number of the FTP server you need to access. |
host | The hostname (domain name) of the FTP server you need to access. This name should not include the protocol and server directory (for instance, |
localPath | The fully qualified name of the file to be sent. |
If the connection to the FTP server has been established and the file was uploaded successfully, the test step passes. Otherwise, it fails.
In the log, you can see whether the test step failed or passed.