File Data Source

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

The File data source gets data from the text file. It reads data line-by-line and assigns values separated by the specified symbol to the properties in the order they are listed in the editor.

Tip: When importing a CSV file, ReadyAPI will offer you to automatically create properties for the values from the file. For TXT files, you have to manually create all necessary properties before importing the values.

You can use File data sources in the Data Source test step in functional tests, and in virtual services.

Configuration

The File data source

Click the image to enlarge it.

File

Specifies the fully-qualified name of the data file.

Note: You can use property expansions to insert values into this field.

Separator

Specifies a character separating values in a file.

Charset

Specifies the necessary encoding to read the file.

Trim

Specifies whether ReadyAPI removes trailing or leading spaces from the retrieved value.

Quoted Values

Specifies whether ReadyAPI should omit double quotes. It is useful, when the file stores values in double quotes. To use values as they are specified within the file, disable this option.

Note: To command ReadyAPI not to omit a double quote character, specify a backslash character (\) before it.

Sample File

You can download the sample file and try to use it as a data source to check things out. The file contains two properties – City and Expected Result, with three rows of values.

The file uses the semicolon character (;) as a separator, so make sure to specify it in the Separator edit box.

See Also

Basic Concepts of Data-Driven Testing
Data Source Loop Test Step
Excel Data Source
Grid Data Source
Data Source Types

Highlight search results