poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Schwarze <...@admadic.de>
Subject Testing generated doc/... files
Date Tue, 31 Oct 2006 21:59:53 GMT

I'm thinking about how to "semi automate" testing of doc files which
were created by HWPF. I'll explain what runs through my mind and
would like to know, if anybody has an opinion on that and which tools
would be ok or not.

The first thing which came to my mind is using jacob (java COM
bridge) in a Windows environment to let Winword open and save a test
file. If the process doing that is still active after a certain time,
the test is declared as failed and the Winword instance is killed.
I'm not into COM programming and I'm not sure how much it takes to do
it that way, but I'm trying.

I would prefer a jacob based solution. But if for any reason jacob is
not suitable, I would bet that such a thing can be created simply
without using Java. It should at least be possible to run two
programs and let one do the COM stuff and the other watch it. If the
test program hangs, the watch program could find running instances of
winword and the test program and kill them - hopefully not leaving
too many resources hanging around after that.

Such kind of tests obviously run on Windows only (don't want to think
about remote access to a Windows machine which runs the tests and
returns the results) so its not part of the unit tests. With a few
dozen test cases (= generated Word files) it feels bad to open those
files manually and check that they are working. (Personally I can
feel my mood go down drastically when looking at 30 tick boxes on a
sheet of paper representing really ugly work...)

Apart from simple crashes/crashes-not testing this could be extended
to a test tool checking for instance whether the bold formatting
created in HWPF is really bold when asking Winword. But thats surely
something to discuss after the crashes/crashes-not part is done.

Now the questions:

Are there any objections against such a tool in general? (besides
from "only runs on Windows" :-) )

Is there a better approach for that?

Should jacob not be suitable, which "development environment" would
be recommended? 
(VC8Express, Watcom, gcc(?); don't know yet whether one needs the
Platform SDK for that or not...)

Best wishes,
(He who is tired of the open-save-cycle and
occasionally-killing-Winword-instances :-) )

To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

View raw message