Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 32440 invoked from network); 20 Jun 2006 12:11:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 12:11:52 -0000 Received: (qmail 99190 invoked by uid 500); 20 Jun 2006 12:11:48 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 99151 invoked by uid 500); 20 Jun 2006 12:11:48 -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 99140 invoked by uid 99); 20 Jun 2006 12:11:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 05:11:48 -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 mloenko@gmail.com designates 66.249.82.206 as permitted sender) Received: from [66.249.82.206] (HELO wx-out-0102.google.com) (66.249.82.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 05:11:47 -0700 Received: by wx-out-0102.google.com with SMTP id s6so1037848wxc for ; Tue, 20 Jun 2006 05:11:26 -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=OLc1YqYW0VYaxcmrpKRt700ZF12W9dJlR5a7Eazj64VIqu63YwIOkrmYWxehp+1K8vdJP6GDlqjGRcJdUdzL90/JsBkD4m0BRjZezrkiisHdA8IKV2uBf8rKMODCBNVTwzyx6VuWqzN46gzEtaX/yvSx3DaJ5t+a8ItPyc+R+fo= Received: by 10.70.108.12 with SMTP id g12mr10319032wxc; Tue, 20 Jun 2006 05:11:25 -0700 (PDT) Received: by 10.70.28.12 with HTTP; Tue, 20 Jun 2006 05:11:25 -0700 (PDT) Message-ID: <906dd82e0606200511t20b5172fi50cb79ae5d49d7c5@mail.gmail.com> Date: Tue, 20 Jun 2006 19:11:25 +0700 From: "Mikhail Loenko" To: harmony-dev@incubator.apache.org Subject: Re: [classlib][testing]resource files: location and usage In-Reply-To: <7273946b0606200409t3511db0fqb5f13bdeafa9149@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7273946b0606190419r3258874bs8f2fe15cb0add763@mail.gmail.com> <6e47b64f0606190717i69b940e1n66d69f6f89a114e2@mail.gmail.com> <7273946b0606192248w4076228eoedc248b4becef970@mail.gmail.com> <6e47b64f0606200152o343409afo5253d655372e143c@mail.gmail.com> <7273946b0606200409t3511db0fqb5f13bdeafa9149@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 2006/6/20, Vladimir Ivanov : > >> described on testing and serialization convention pages. > > > > > >Yes, it'll be useful. But currently few resource files follow convention= s > > Not only resource files. > The "Testing convention" document (testing.html) says: > 1) "Tests, their resources, and support classes are located under > /src/tests " > but actually they are located under > /src/test > In this case seems the document should be updated. thanks! fixed. > > 2) document says: > "/src/tests/api - Implementation-independent tests" > but many modules miss this level and define 'classpath tests' on this lev= el. > 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 mig= ht 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 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? =96 t= hen, > > > 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 resourc= e > > 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 > > > =96 for easy resource file search? > > > > > > Agree. > > > > c) Shouldn't we move content of "/support/" into > > corresponding > > > module's src/test/resources/ directories? =96 if yes, I can do it. > > > > > > No. IIRC we agreed to move 'things' used across different modules to > > "/support/". > > > > 2. Can we add a link to the > > > > > > > > http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_test= ing.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 conventio= ns > > :-) > > > > 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, f= or > > > > > 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 b= y > > > > 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 agr= eed > > > 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_test= ing.html > > > > > > > > ------------------------------------------------------ > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.or= g > > > > 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