FTP Test Step

Applies to ReadyAPI 3.56, last modified on November 21, 2024

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:

FTP test step editor

Click the image to enlarge it.

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.

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.

Name Description
Name

The test step name.

Description

The text describing the test step.

Keep session until test case ends

true or false. Specifies whether the connection to the FTP server should remain active until the test case ends. This, for example, allows you to upload multiple files within one test case and avoid providing the same credentials multiple times, or use the connection for some other purposes.

Note: This 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.

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
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, example.com).

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.

See Also

Test Steps
Create File Test Step

Highlight search results