Create File Test Step

Applies to ReadyAPI 3.52, last modified on April 18, 2024

About Create File test step

The Create File test step creates a file with arbitrary contents and can wait until the file is deleted by some other software.

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 Create File test step

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

Create File test step editor
Tip: You can use Property Expansions in the editor.

Folder name

Specifies the folder where the file will be created.

The folder must exist. If it does not, the test step will fail.

File name

Specifies the name and extension of the created file.

File encoding

Specifies the format of symbols in the file. Possible values include Unicode (UTF-16, 16-bit characters) and US-ASCII (8-bit characters).

File content

Specifies the data to be stored to the file. Enter text here. If needed, include property values by using Property Expansions.

Overwrite existing file

Specifies the test step’s actions if it detects that the specified file exists in the specified directory. If selected, ReadyAPI will overwrite the existing file with the File Content field data. Otherwise, the test step will fail if the target file already exists.

Wait for file deletion

If selected, the test step will pause the test run until the file is deleted or the specified time passes.

Wait for deletion

Specifies the number of seconds or milliseconds to wait for file to be deleted. If the file remains on the disk after this period ends, the test step fails. Otherwise, it passes. The time period starts after ReadyAPI has created the file and saved data to it. This property is only used if you select the Wait for file deletion option.

Property list

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

Name Description
Name

The test step’s name.

Description

Text describing the test step.

This tab contains the following properties that provide access to the request and response data:

You can modify custom properties, load their values from a file, or save them to a file. To learn more, see About Properties.

Values on the Custom Create File 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.

Name Description
fileName

Same as the File name text box in the editor.

FolderPath

Same as the Folder name text box in the editor.

fileContent

Same as the File content text box in the editor.

Verifying test step

Test evaluation is affected by the Wait for file deletion option.

Wait for file deletion Pass Criteria Comment
Selected File created. Fails if the file was not created or written to.
Not selected File created and deleted within the specified time. Fails if the file was not created, written to or deleted.

See Also

Test Steps
File Wait Test Step

Highlight search results