Been there, done that, don't bother. In theory it's great, in practice you
will have differences that fail the test but visually look good and are, in
fact, no error. JUnit could be used to compile the tests and see if an
exception is thrown. The real test must be done visually.

Paulo

----- Original Message ----- 
From: "Carsten Hammer" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, December 02, 2006 12:08 PM
Subject: Re: [iText-questions] JUnit tests


> Hi Paulo,
> what about implementing a junit test that uses jpedal or ghostscript to
> rasterize pdf files into png image files? itext could do some
> manipulations and it would be easy to compare manipulated and
> unmanipulated png files to be identical. One easy test would be to run
> pdfstamper to produce another pdf *without* modifications. In that case
> it should be always the same result.
> Of course it then relys on ghostscript or jpedal to work well.
> Another test could be to run pdfstamper on a file again and again. The
> result should not grow or shrink much after the second cycle.
> Another test that could be done is create a pdf file using itext and
> then readout some information from this pdf file using itext. (Metadata,
> Pagesize, Rights, whatever..)
> Most of the junit tests look silly as long as everything works:)
> Best regards,
> Carsten
>
> Paulo Soares schrieb:
>> The PDF format is not suited to JUnit testing, or any other automated
>> testing. Of course, we could have tests that could build PDFs but the
>> correctness of the PDF would still have to be done visually.
>>
>> Paulo
>>
>> ----- Original Message ----- 
>> From: "William L. Thomson Jr." <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Friday, December 01, 2006 11:07 PM
>> Subject: [iText-questions] JUnit tests
>>
>> Greetings,
>>
>>  Recently I took over maintaining the iText ebuild/package on Gentoo
>> Linux. During our recent stabilization of 1.4.5, we had a bit of an
>> issue when it came for our arch teams to test iText. Since we compile
>> everything from source, it's part of our stabilization process to test
>> packages in some manner.
>>
>>  With most Java apps we do this by running the JUnit tests. To my
>> knowledge, and please excuse me if I am getting this wrong. It does not
>> seem like iText has any JUnit tests. Would it be possible for future
>> releases of iText to have JUnit tests. With a target for them in the
>> build.xml file for iText. That would allow us to run tests after
>> compiling and would really help out.
>>
>>  Otherwise very pleased with iText, so my thanks and compliments on the
>> good work ;)
>>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to