Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I am not sure I fully understand the problem, but here is one idea. Collect a bunch of sample files that represent diverse formats and edge cases. Run the conversion to your DataTables and manually inspect the DataTables the first time to ensure they are correct. Then serialize the DataTable's to XML format and store them in your unit test suite along with your test case PDF files. </p> <p>Your automated unit tests could perform the conversion from PDF to DataTable and compare the results against the respective "approved" serialized DataTable representation. </p> <p>You could build up a library of test documents over time using this method. Failures in your unit tests would indicate that changes to the parsing routines have broken a particular edge case.</p> <blockquote> <p>There's one 'catch' though. I my first example I was talking of a .NET application. However, this new project with the 40 possibly 'scrubbing scripts' is written in VBA.... The input is an Excel Spreadsheet and the output is an Excel spreadsheet... how could I serialize this? Maybe do a checksum on the entire file????</p> </blockquote> <p>For the second example if the Excel spreadsheets are not too complicated you could try to create a cell by cell comparison routine like <a href="http://www.exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Excel/477.html" rel="nofollow noreferrer">this one</a>; perhaps you could wrap this into a custom Assert.AreExcelWorksheetsEqual(). You are right though, a checksum might work just as well.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload