You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Chris Haddad <ch...@cobia.net> on 2003/01/15 18:42:38 UTC
Interoperability tests
I'm currently looking at the source for the POI test cases (which run
successfully on my copy of the nightly build), and would like to know where
output XLS files are stored to test interoperability with real-world
version
of Excel. For example, i desire to run code similar to
TestHSSFCell.testActiveCell() and determine if the file can be loaded into
my version of Excel.
does POI have these kinds of tests in the build?
Re: Interoperability tests
Posted by "Andrew C. Oliver" <ac...@apache.org>.
There are no tests which try to actually load the file into excel.
Rationale:
1. The nightly build runs on a headless linux box.
2. That would require the use of OLE Automation to load excel
3. That would be ungodly slow
4. When Excel dies, it usually just crashes. I suppose hanging the
testcase would be a reasonable way to note that "yes virginia, the test
failed" but it wouldn't be exactly automated.
Where the files go is dependent on platform. On UNIX they generally go
in /tmp. On Windows they go in different places depending on variety.
In the case of Windows 2k they go in D:\Documents and
Settings\username\Local Settings\Temp (and BTW, the build never deletes
them...which can use a lot of space up if you don't remember to go after
them).
Since we've estabilished its not possible to use excel in the manner you
suggest from a unit test, loading these up manually seems to be the most
reasonable approach.
So what good are the unit tests?
The unit tests ensure that HSSF/POI and friends do not cause exceptions
The better of the unit tests take some real world peice of data and
compare the output of POI/HSSF to it.
We can catch:
most order errors (meaning Record X must go before Record Y)
most binary syntax errors (If I set cell format to Bla then there
should be a new record here with these values, etc)
We can't catch:
Weird things excel expects to be true
Unintended usage which we did not presuppose
Total misusage (some folks do some creative things -- interperating even
the most obvious of the APIs to mean what they want it to mean... these
people don't generally read any of the javadoc and quick guide first...)
The effect of structures we haven't implemented (or discovered) on the
result after modification. (meaning the effect of words we don't know
on the grammar of what we write. For instance if you say "The dog ate
the cat" and you tell me to make the dog big, I don't need to know what
the cat is in order to make it "The big dog ate the cat" -- however if
you tell me to change the operation to "drank" I'll produce an invalid
operation "The big dog drank the cat" since I don't know what a cat is
-- whats worse is Excel uses some things to mean different things based
on context -- so some things that might mean one thing mean another...)
I'll write more on debugging POI and stick it in the wiki.
-Andy
Chris Haddad wrote:
> I'm currently looking at the source for the POI test cases (which run
> successfully on my copy of the nightly build), and would like to know where
> output XLS files are stored to test interoperability with real-world
>version
> of Excel. For example, i desire to run code similar to
> TestHSSFCell.testActiveCell() and determine if the file can be loaded into
> my version of Excel.
>
> does POI have these kinds of tests in the build?
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>
Re: Interoperability tests
Posted by Danny Mui <da...@muibros.com>.
For windows 2000-> xp, they're at:
c:\Documents and Settings\{user id}\Local Settings\temp
Chris Haddad wrote:
> I'm currently looking at the source for the POI test cases (which run
> successfully on my copy of the nightly build), and would like to know where
> output XLS files are stored to test interoperability with real-world
>version
> of Excel. For example, i desire to run code similar to
> TestHSSFCell.testActiveCell() and determine if the file can be loaded into
> my version of Excel.
>
> does POI have these kinds of tests in the build?
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>