File Wait Test Step

Applies to ReadyAPI 3.51, last modified on March 21, 2024

About File Wait test step

Use the File Wait test step to check whether a file exists on your hard drive. The test step pauses the test run until the specified file is found or until the specified time period is over.

Requirements

To use this test step, you need a ReadyAPI Test license. If you do not have it, you can request it on our web site or start a trial.

Editing File Wait test step

You can modify settings of a test step in its editor:

File Wait test step editor

Click the image to enlarge it.

You can use Property Expansions in the editor.

File name

The fully qualified name of the needed file. You can either type the name, or click Browse and pick it by using the standard Open File dialog.

The maximum size of a file is 5 Mb. If the file size is larger, the test step will fail.

Timeout

The number of seconds or milliseconds to wait. The zero value (default) means an infinite waiting time.

Delete File

Specifies whether ReadyAPI should remove the found file.

Property list

Besides the test step editor, you can adjust the test step’s behavior by using its properties in the FileWaitRequestTestStep Properties and Custom File Wait Test Step Properties panels in the Navigator.

Name Description
Name

The test step’s name.

Description

Text describing the test step.

File name

The fully qualified name of the needed file. This property is read-only. You can specify the file name in the test step editor, or in the fileName property on the Custom File Wait Test Step Properties tab.

Values on the Custom File Wait 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
deleteFile

true or false. Specifies whether the test step will remove the found file.

fileName

The fully qualified name of the desired file.

fileContent

The contents of the desired file. ReadyAPI populates this property only if the test step passed.

timeout

The wait time in milliseconds.

Verifying test step

If the file was found during the specified period, the test step passes. Otherwise, it fails.

In the log, you can see whether the test step failed or passed.

If the test step passed, the fileContent property contains data from the specified file. You can use the Contains or Equals assertions to verify the file contents.

See Also

Test Steps
Create File Test Step

Highlight search results