harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib][testing]resource files: location and usage
Date Tue, 20 Jun 2006 12:11:25 GMT
2006/6/20, Vladimir Ivanov <ivavladimir@gmail.com>:
> >> described on testing and serialization convention pages.
> >
> >
> >Yes, it'll be useful. But currently few resource files follow conventions
>
> Not only resource files.
> The "Testing convention" document (testing.html) says:
> 1) "Tests, their resources, and support classes are located under
> <modulename>/src/tests "
> but actually they are located under
> <modulename>/src/test
> In this case seems the document should be updated.

thanks! fixed.

>
> 2) document says:
> "<modulename>/src/tests/api - Implementation-independent tests"
> but many modules miss this level and define 'classpath tests' on this level.
> In this case tests should be relocated.

Not necessarily. the doc says: "This document provides general
guidlines and recomendations that might be adapted/modified to reflect
module specifics"

So if a module does not have some type of tests or platform division it might
skip extra folders

Thanks,
Mikhail

>
> Anyway, when one is not sure whether or not he puts the tests correctly, he
> can just run the script and receive all warnings.
>  Thanks, Vladimir
>
>
> On 6/20/06, Stepan Mishura <stepan.mishura@gmail.com> wrote:
> >
> > On 6/20/06, Vladimir Ivanov wrote:
> > >
> > > Thanks Stepan,
> > >
> > > 1. The decision about other resource files is: they should be stored
> > into
> > > "src/test/resources/" without further naming convention. Right? – then,
> > > a)       Ideally, can we specify further (after src/test/resources/)
> > > naming
> > > convention for resource files as it is done for serialization files?
> >
> >
> > Resource files for testing serialization is the first case. To work out
> > further conventions we should at least understand what kinds of resource
> > files are required for testing. For example, we may agree that resource
> > files for net-based tests should be put separately in 'net' sub-folder.
> > And
> > I'd suggest  to put all other resources into 'other' folder
> > (i.esrc/test/resources/other).
> >
> > b)       At least, specify that resource file name should contain test
> > name
> > > – for easy resource file search?
> >
> >
> > Agree.
> >
> > c)       Shouldn't we move content of "<trunk>/support/" into
> > corresponding
> > > module's src/test/resources/ directories? – if yes, I can do it.
> >
> >
> > No. IIRC we agreed to move 'things' used across different modules to
> > "<trunk>/support/".
> >
> > 2. Can we add a link to the
> > >
> > >
> > http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_testing.htmldocument
> > > at the testing page?
> >
> >
> > Sure.
> >
> > I want to create a script which checks that tests are stored as it is
> > > described on testing and serialization convention pages.
> >
> >
> > Yes, it'll be useful. But currently few resource files follow conventions
> > :-)
> >
> > Thanks,
> > Stepan.
> >
> > Thanks,
> > > Vladimir
> > >
> > > On 6/19/06, Stepan Mishura < stepan.mishura@gmail.com> wrote:
> > > >
> > > > On 6/19/06, Vladimir Ivanov wrote:
> > > > >
> > > > > It would be good if the page
> > > > >
> > > > >
> > > >
> > >
> > http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.htmldescribes
> > > > > also location, name convention and
> > > > > access model for resource files used for testing, specifically, for
> > > > > testing
> > > > > serialization.
> > > > >
> > > > > At the present moment test's resource files stored in
> > > > "src/test/resources"
> > > > > directory in modules structure.
> > > > > Serialization data stored as
> > > > >    "resources/" +  "serialization/"  + "<package name>" or
> > > > >    "resources/" +  "<package name>" + "/serialization/"
> > > > > with ".ser" or ".dat" extension.
> > > > >
> > > > > Other resource files are stored in "resources/" or in the
> > > > > "resources/<package name>" directory.
> > > > >
> > > > > I found two mechanisms of accessing resources in tests:
> > > > > 1) Get resource through ClassLoader.getResource
> > > ("serialization/<package
> > > > > name>")
> > > > > 2) Get resource through reading file System.getProperty(RESOURCE_DIR
> > +
> > > > > filename).
> > > >
> > > >
> > > > Hi Vladimir,
> > > >
> > > > The second mechanismis used in 'security' testing framework (used by
> > > > auth/crypto/security/x-net modules). We are agreed to merge two
> > existing
> > > > framework for testing serialization. Currently I'm preparing update
> > for
> > > > the
> > > > 'security' framework - it will replace the second mechanism it with
> > the
> > > > first.
> > > >
> > > > Suggestion:
> > > > > 1) Ideal from my point of view variant: lets uniform access to
> > > resources
> > > > > throughout all tests (I can do it).
> > > >
> > > >
> > > > Agreed. We should work out uniform access to resources. IIRC we agreed
> > > to
> > > > access *all* resources via classpath.
> > > >
> > > > 2) If it's not good idea, then, lets just describe technique of
> > working
> > > > > with resources on testing conventions page to limit the number of
> > > access
> > > > > techniques to only two (I can do it).
> > > > >
> > > > > Thoughts?
> > > >
> > > >
> > > > see [1] for name conventions for serialization resource files.
> > > >
> > > > Thanks,
> > > > Stepan.
> > > >
> > > > [1]
> > > >
> > > >
> > >
> > http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_testing.html
> > > >
> > > > ------------------------------------------------------
> > > > 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
> >
> > > >
> > > >
> > >
> > >
> >
> > ------------------------------------------------------
> > 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
> >
> >
>
>

---------------------------------------------------------------------
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


Mime
View raw message