harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ivanov" <ivavladi...@gmail.com>
Subject [classlib][testing]resource files: location and usage
Date Mon, 19 Jun 2006 11:19:47 GMT
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).

Suggestion:
 1) Ideal from my point of view variant: lets uniform access to resources
throughout all tests (I can do it).
 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?

 Thanks,
  Vladimir

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message