Pages

Thursday, August 30, 2007

Data source to a text file

Record a web test that does something - enter 01/01/2007 in a form field; now you want to change which values are entered in the form field without recording a new test for each value.

Add data source to web test
select OLE DB Provider = Microsoft Jet 4.0 OLE DB Provider
Enter the path to the text file (without including the filename) under Server or filename
Click Advanced
Extended Properties at the top enter "Text;" (without quotes) if the file has a header row or "Text;HDR=NO;" (make sure it's HDR not Hdr & no quotes) if there is no header row
click Test Connection and OK
Select one or more text files in the dialog to select the tables

Edit the text file and enter the values you want to test with

Select the input field where you entered the date under Form Post Parameters
Right click and select Properties
Drop down the Choice list next to Value and select your input file

Run the test to send over the dates from the input file

No comments: