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:
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
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.
Properties | View ↓
Name | Description |
---|---|
Description |
Text describing the test step. |
Name |
The test step’s name. |
Name | Description |
---|---|
Name |
The test step’s name. |
Description |
Text describing the test step. |
Custom Create File Test Step Properties | View ↓
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 |
---|---|
fileContent |
Same as the File content text box in the editor. |
fileName |
Same as the File name text box in the editor. |
FolderPath |
Same as the Folder name text box in the editor. |
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. |