Creating an external data source
Create a tab-delimited text file to supply data sets to your test.This external file provides the data for the same test created in the earlier lesson. It replaces the data set that was used previously.
Open the
Rented Cars
data set that was created earlier by double-clicking the Rented Cars node in the Data subtree of the TestArchitect explorer tree.In the editor, use your cursor to select only the cells that contain the row data of the data set:
Press
Ctrl+C
to copy the selected contents.Open an empty file in a text editor such as Windows Notepad.
Press
Ctrl+V
to paste the copied data onto the clipboardWhen you copy and paste from the TestArchitect editor, adjacent cells of a row are delimited by tabs, while rows are separated by linefeed characters. This satisfies the TestArchitect requirements for an external data file.
Notes:If you have a text editor that can visualize hidden characters, verify that all tabs and linefeeds are correctly positioned.Optional: Change some of the data in your file. For example, change the first occurrence of
Prius
toThunderbird
.By doing this you can verify that data is being pulled from the external file and not the
Rental Cars
data set.Save the file as
RentedCars
.tsv toC:\\data
or another location on your local drive.
Your external data source is now ready for use.