Good day, It seems to me that some tests may require resources that can't be put to SVN, for example, non-readable files. Non-writable files may fall in this category, too - I think (sorry it I'm wrong) that after commit/checkout from SVN they become writable by the owner. Another example of such resources may be huge files. It's impossible to put such resources to SVN but they may be created in the build process or on fly before executing tests. Maybe it's worth to specify a common approach for such resources, maybe a build target or something like that.
It is not a good idea to put creation of such resources in something like setUp() method in JUnit test because who knows if a read-only file created by VM under test is really read-only or not :) On 6/19/06, Stepan Mishura <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Regards, Anton Luht, Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
