You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Denis Kishenko <dk...@gmail.com> on 2006/09/28 13:44:37 UTC

[classlib][test] Test input/output files location

I am going to fix some commented tests from java.awt.geom package. I
have several organizational questions before start to do.

1. Where is the best place to put test resource files (golden files)?
Testing conventions [1] keep silence about this. There are many such
files located near the tests, for example
modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
modules\awt\src\test\api\java\common\java\awt\shapes\*

2. Where is the best place to put test output files? Now it is
modules\awt\bin\test\java\awt\shapes\output
modules\awt\bin\test\java\awt\geom\shapes\output

[1] http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html

-- 
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test] Test input/output files location

Posted by Mark Hindess <ma...@googlemail.com>.
On 28 September 2006 at 15:44, "Denis Kishenko" <dk...@gmail.com> wrote:
> I am going to fix some commented tests from java.awt.geom package. I
> have several organizational questions before start to do.
> 
> 1. Where is the best place to put test resource files (golden files)?
> Testing conventions [1] keep silence about this. There are many such
> files located near the tests, for example
> modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
> modules\awt\src\test\api\java\common\java\awt\shapes\*

As someone else said, these should be in the parallel resources tree.
At build time, they should be copied to modules\awt\bin\test so that
they can be located at run time using the classpath.  (This will allow
them to be packaged as a jar of tests.)

> 2. Where is the best place to put test output files? Now it is
> modules\awt\bin\test\java\awt\shapes\output
> modules\awt\bin\test\java\awt\geom\shapes\output

A temp directory - preferably not $HOME as some tests seem to at the 
moment.

Regards,
 Mark.






---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test] Test input/output files location

Posted by Denis Kishenko <dk...@gmail.com>.
Thanks a lot.

P.S. It would be good to add this instruction to conventsion.

2006/9/29, Paulex Yang <pa...@gmail.com>:
> Denis Kishenko wrote:
> > I am going to fix some commented tests from java.awt.geom package. I
> > have several organizational questions before start to do.
> >
> > 1. Where is the best place to put test resource files (golden files)?
> > Testing conventions [1] keep silence about this. There are many such
> > files located near the tests, for example
> > modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
> > modules\awt\src\test\api\java\common\java\awt\shapes\*
> I cannot find it in the archive, but IIRC, this topic was discussed
> before, and the conclusion was they should be in the
> modules\awt\src\test\resources\<package structure>
> >
> > 2. Where is the best place to put test output files? Now it is
> > modules\awt\bin\test\java\awt\shapes\output
> > modules\awt\bin\test\java\awt\geom\shapes\output
> If they are used temporarily, they should be removed after the test
> execution, so IMHO the position is not so significant, but maybe the
> user temp directory is good place to go.
> >
> > [1]
> > http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html
> >
> >
>
>
> --
> Paulex Yang
> China Software Development Lab
> IBM
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test] Test input/output files location

Posted by Denis Kishenko <dk...@gmail.com>.
Alexey, thanks it will be very useful

2006/10/2, Alexey Petrenko <al...@gmail.com>:
> 2006/9/29, Paulex Yang <pa...@gmail.com>:
> > Denis Kishenko wrote:
> > > I am going to fix some commented tests from java.awt.geom package. I
> > > have several organizational questions before start to do.
> > >
> > > 1. Where is the best place to put test resource files (golden files)?
> > > Testing conventions [1] keep silence about this. There are many such
> > > files located near the tests, for example
> > > modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
> > > modules\awt\src\test\api\java\common\java\awt\shapes\*
> > I cannot find it in the archive, but IIRC, this topic was discussed
> > before, and the conclusion was they should be in the
> > modules\awt\src\test\resources\<package structure>
> > >
> > > 2. Where is the best place to put test output files? Now it is
> > > modules\awt\bin\test\java\awt\shapes\output
> > > modules\awt\bin\test\java\awt\geom\shapes\output
> > If they are used temporarily, they should be removed after the test
> > execution, so IMHO the position is not so significant, but maybe the
> > user temp directory is good place to go.
> I think that File.createTempFile and File.deleteOnExit are good here.
>
> SY, Alexey
>
> --
> Alexey A. Petrenko
> Intel Middleware Products Division
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test] Test input/output files location

Posted by Alexey Petrenko <al...@gmail.com>.
2006/9/29, Paulex Yang <pa...@gmail.com>:
> Denis Kishenko wrote:
> > I am going to fix some commented tests from java.awt.geom package. I
> > have several organizational questions before start to do.
> >
> > 1. Where is the best place to put test resource files (golden files)?
> > Testing conventions [1] keep silence about this. There are many such
> > files located near the tests, for example
> > modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
> > modules\awt\src\test\api\java\common\java\awt\shapes\*
> I cannot find it in the archive, but IIRC, this topic was discussed
> before, and the conclusion was they should be in the
> modules\awt\src\test\resources\<package structure>
> >
> > 2. Where is the best place to put test output files? Now it is
> > modules\awt\bin\test\java\awt\shapes\output
> > modules\awt\bin\test\java\awt\geom\shapes\output
> If they are used temporarily, they should be removed after the test
> execution, so IMHO the position is not so significant, but maybe the
> user temp directory is good place to go.
I think that File.createTempFile and File.deleteOnExit are good here.

SY, Alexey

-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [classlib][test] Test input/output files location

Posted by Paulex Yang <pa...@gmail.com>.
Denis Kishenko wrote:
> I am going to fix some commented tests from java.awt.geom package. I
> have several organizational questions before start to do.
>
> 1. Where is the best place to put test resource files (golden files)?
> Testing conventions [1] keep silence about this. There are many such
> files located near the tests, for example
> modules\awt\src\test\api\java\common\java\awt\geom\shapes\*
> modules\awt\src\test\api\java\common\java\awt\shapes\*
I cannot find it in the archive, but IIRC, this topic was discussed 
before, and the conclusion was they should be in the 
modules\awt\src\test\resources\<package structure>
>
> 2. Where is the best place to put test output files? Now it is
> modules\awt\bin\test\java\awt\shapes\output
> modules\awt\bin\test\java\awt\geom\shapes\output
If they are used temporarily, they should be removed after the test 
execution, so IMHO the position is not so significant, but maybe the 
user temp directory is good place to go.
>
> [1] 
> http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html 
>
>


-- 
Paulex Yang
China Software Development Lab
IBM


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org