Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 65105 invoked from network); 19 Jun 2006 16:34:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jun 2006 16:34:03 -0000 Received: (qmail 61069 invoked by uid 500); 19 Jun 2006 16:33:51 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 60964 invoked by uid 500); 19 Jun 2006 16:33:51 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 60925 invoked by uid 99); 19 Jun 2006 16:33:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 09:33:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of anton.luht@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Jun 2006 09:33:50 -0700 Received: by wr-out-0506.google.com with SMTP id i2so602909wra for ; Mon, 19 Jun 2006 09:33:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=A4eTlqWPT5d9zxviURQ8Z/4RRacvvnMDs3MusFWsFKfM1te0moEc9S6kVOa428zVKfCcfIeA09fWJr/MNMmHKIQUnOLOiMVNMLChlr2oBDJrh+yeZEjDgkcDmKTVuKmP2idyrrJNYIksS+Jg80stpasbckid051ND1WIBgaWfuw= Received: by 10.54.76.3 with SMTP id y3mr6297395wra; Mon, 19 Jun 2006 09:33:29 -0700 (PDT) Received: by 10.54.128.11 with HTTP; Mon, 19 Jun 2006 09:33:29 -0700 (PDT) Message-ID: Date: Mon, 19 Jun 2006 20:33:29 +0400 From: "Anton Luht" To: harmony-dev@incubator.apache.org Subject: Re: [classlib][testing]resource files: location and usage In-Reply-To: <6e47b64f0606190717i69b940e1n66d69f6f89a114e2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7273946b0606190419r3258874bs8f2fe15cb0add763@mail.gmail.com> <6e47b64f0606190717i69b940e1n66d69f6f89a114e2@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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/" + "" or > > "resources/" + "" + "/serialization/" > > with ".ser" or ".dat" extension. > > > > Other resource files are stored in "resources/" or in the > > "resources/" directory. > > > > I found two mechanisms of accessing resources in tests: > > 1) Get resource through ClassLoader.getResource("serialization/ > 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 > > -- Regards, Anton Luht, 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