The Micro Focus Unit Testing Framework supports data-driven tests when connecting to data sources in comma separated values (CSV) format.
You can incorporate a data source into your traditional unit tests by specifying a data source descriptor, MFU-MD-TESTDATA, in the metadata entry point; for example:
ENTRY "MFUM_MYTESTCASE". move "csv:MyCSVSource.csv" to MFU-MD-TESTDATA.
move "Surname = Jones" to MFU-MD-DD-CSV-FILT-CONDYou can also selectively run the test case against a single row within the source if you are using the -csv-line-filter option from the command line test runner syntax.
To use the data in your test cases, you define external COBOL items in the Working Storage that correspond to the column headers; for example, to define and use data in a column titled EarnedPoints, define the COBOL item as such:
01 mfu-dd-EarnedPoints is MFU-DD-VALUE external.
You can then use the item in your source code as you would any other data item.