How to Use External File Data within a Test Procedure

Previous Next

See Also

You can use USoft BenchMark to play a test that reads data from an external file. The contents of this file are described by an external set that is defined with USoft Batch.

To insert records that are defined in an external file into an application table within a test procedure:

1. First, record a test procedure that inserts a record with dummy values into the application table.
2. Save the recorded procedure.
3. Define a test that executes this procedure.
4. In USoft Batch, define an external set that describes the data to be inserted. This external set must have File Format: FIXEDVLE.

The names of the external set elements must correspond with the names of the columns in which values are inserted.

HINT:

You can ease this process and also define a Batch export task that exports existing records from the application table into an external file. This file can then be used as template.

For more details, see the USoft Batch Help topic: "How to Define External Sets and their Elements".

5. In BenchMark, open the Tests window, select the test defined in step 3, and click the Edit Procedure button.
6. In the Procedures Executed by this Test window, set Iterations to the number of records in the external file.
7. In the Set Name field, specify the name of the external set.
8. In the File Name field, specify the name of the external file.
9. Save your changes.
10. Play the test procedure.

The recorded insert is executed for all records defined in the external file. If a value is inserted in a column that occurs in the external set, the value is taken from the external file.

If a value is inserted in a column that does not occur in the external set, the recorded value in the test procedure is inserted.

The same mechanism applies when updating records and when entering query conditions.