It’s possible to create your own flat-file parser and specify in the test-suite that you’ll be using the parser to read some files.
Create a custom parser
To create a custom parser for flat files, you’ll need to develop your own parser in C#. To achieve this, you’ll need to create a C# library project and compile it as a library. One of the class of your project should implement the interface IFlatFileReader from the namespace NBi.Extensibility.FlatFile and available in the nuget package NBi.Extensibility.
The following example, illustrates a TSV (table-separated values) parser skipping rows where the substring “10YBE” is not available.
Register the extension
You’ve to inform NBi that an extension is installed. To achieve this, you’ll have to edit your configuration file and add the section extensions to the nbi section of your file. for more information check how to register an extension for databases
Reference the custom parser
To specify that a flat file should be read with a specific custom parser, you’ll need to explictely tell it in the test definition. Immediately after the filename, add a exclamation point (!) and foolow it by the custom parser’s name (defined in the parameter extension of your config file).