seckey wrote:We use a lot of reports in our application, It would be great if we could add some regression tests that would validate that reports are displaying the relevant data. The easiest way would be to just match a working file with the latest version by comparing the binary structure. But this is very susceptible to breaking. A better way would be if we could drill into the data on the report, searching for the expected value.
We can view reports in either PDF or Crystal Reports. Does anyone know of a good way to test reports?
This is a tough issue, but it is one that we hear a lot of requests for.
It would be great if there were an easy way to compare two reports for identicality, wouldn't it?
Unfortunately, there is just too much information in a a composed output report, either as a PDF file or in Crystal Reports format, for that to be very easy to do. The composition process in most cases discards the key structural information at the last stage before rendering the final version and once that is gone it is very hard to get it back.
The best you can do is to operate on bits and pieces of the object, using the image comparison commands (which are also image synchronization commands). With them, if you are careful in what you choose to view and checksum you can get a reliable compare-equal outcome in your tests.
--The eValid Team