About FTP test step
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.
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.
Edit FTP test step
You can modify settings of a test step in its editor:
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: | It is possible to log in in the anonymous mode, if the server you try to access allows it. 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.
Property list
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 | View ↓
Name | Description | ||
---|---|---|---|
Description |
The text describing the test step. |
||
Keep session until test case ends |
|
||
Name |
The test step name. |
Name | Description | ||
---|---|---|---|
Name |
The test step name. |
||
Description |
The text describing the test step. |
||
Keep session until test case ends |
|
Custom FTP Test Step Properties | View ↓
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 or 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 |
---|---|
fileName |
The name the file will receive after uploading to the server. |
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. |
port |
The port number of the FTP server you need to access. |
serverPath |
The path to the FTP server directory to which you upload the file. |
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. |
Verify test step
If the connection to the FTP server had 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.