Forum Discussion

Nformation's avatar
Nformation
Contributor
12 years ago

Help with testing printed output

I've done a lot of searching and am having trouble finding a solid solution.



The software I'm testing prints reports.  So far, we've regression tested them manually by printing to pdf or xps, but we'd like to test report components using TestComplete.



What is the easiest way to test printed output?  Ideally, I'd like to open a PDF or XPS and have TestComplete verify that the "Current Date" field shows the current date, but I can't get access to those components.  I've tried using the MSAA plugin as suggested by SmartBear, but the PDFs I'm working with are not tagged and I'm otherwise having trouble extracting data from the PDFs this way. 



Is there another format I could print to that would make this easier?  Is there a program that can help me extract fields from a PDF or XPS?  I'm sure others have used TestComplete to test printed output, so how are they doing it?  Thanks.

2 Replies

  • Hi.



    Data from images can be extracted using TC OCR feature but my own experience shows that OCR is unreliable (you may try to use different document scaling of PDF output prior to recognition).



    As alternative approach you may try to use output to Generic Printer instead of XPS/PDF and save output into text file. In this case most likely you will get data dump (which looks like text garbage) but at least it can be parsed (if your are lucky) using low-level file reading. This method will defenitely fail if your application create picture images for printing.



    Honestly I don't know reliable approach for printed output automated testing.

    Printed outputs can be tested appropriately using manual testing only (manual tester should check not only consistency of data but common issues such as readability, font sizes, general layout, splitting tables across pages etc).



    In TC this manual testing section can be implemented using manual checkpoints feature.







  • Thanks, Andrey.



    OCR is not an option for me because I have the standard edition and it sounds like it doesn't work reliably anyway.  I have tried printing to a text file to confirm certain generated values, but the output from Windows' text printer is strangely formatting (has spaces everywhere), so what I get looks like this:



    thi     s     is      n      otread     able



    It would be difficult to parse reliably.  I was hoping TestComplete would be able to test print output, but I may have to using manual verification. Such is life.