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.
Specifies the fully-qualified name of the data file.
|Note:||You can use property expansions to insert values into this field.|
Specifies a character separating values in a file.
Specifies the necessary encoding to read the file.
Specifies whether ReadyAPI removes trailing or leading spaces from the retrieved value.
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 (
You can download the sample file and try to use it as a data source to check things out. The file contains two properties –
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.