Forum Discussion
HKosova
Alumni
12 years ago
An application generates a CSV file or Excel file, and I would check all the columns except for a set of columns with a CSV file reference.
For-example, the application generates export.csv, and i would compare all columns with reference.csv, except for columns 2, 7, and 9.
Database checkpoints can check just a subset of columns. You just need a connection string to connect to your CSV or Excel file as a database. For example, CSV connection strings look like this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\CSVFileFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited";
C:\CSVFileFolder\ is the folder that contains the CSV file.
HDR=Yes means that the first row in the CSV file contains column names. If not, use HDR=No.
FMT=Delimited means the separator is a comma.
The only thing is that database checkpoints don't compare two files, they check the same file you created the checkpoint for. For example, if you created a checkpoint for the baseline file C:\reference.csv, then your application must export data to C:\reference.csv during the test run.