Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 56189 invoked from network); 28 Apr 2006 10:19:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Apr 2006 10:19:01 -0000 Received: (qmail 58232 invoked by uid 500); 28 Apr 2006 10:18:56 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 57995 invoked by uid 500); 28 Apr 2006 10:18:55 -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 57977 invoked by uid 99); 28 Apr 2006 10:18:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2006 03:18:55 -0700 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=HTML_MESSAGE,SPF_PASS,SUBJECT_ENCODED_TWICE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of stepan.mishura@gmail.com designates 66.249.82.196 as permitted sender) Received: from [66.249.82.196] (HELO xproxy.gmail.com) (66.249.82.196) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2006 03:18:54 -0700 Received: by xproxy.gmail.com with SMTP id t16so1356199wxc for ; Fri, 28 Apr 2006 03:18:33 -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:references; b=i/uGin+hinaRhqcF1CShM46dVGubrNDA6WP0AZndajM5OHkwfW4G1YcCbmz5UctEDnQfMNclHdNStqQokIBz0TEF+eGyS8H5s88XnpLBaff/LX648DIgyYAWu3kawcuXOdJ33oFfhVMUVCXWupyXpTqHfSP8PwohUpvsa6DkhGU= Received: by 10.70.8.5 with SMTP id 5mr4196254wxh; Fri, 28 Apr 2006 03:18:33 -0700 (PDT) Received: by 10.70.32.3 with HTTP; Fri, 28 Apr 2006 03:18:33 -0700 (PDT) Message-ID: <6e47b64f0604280318u40a4e339hfb130b90ad90b8fd@mail.gmail.com> Date: Fri, 28 Apr 2006 17:18:33 +0700 From: "Stepan Mishura" To: harmony-dev@incubator.apache.org Subject: =?WINDOWS-1252?Q?Re:_[Fwd:_Re:_[classlib]_Tests_for_s?= =?WINDOWS-1252?Q?erialization_=96_which_package,_name=3F]?= In-Reply-To: <4451C564.3040403@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_44486_570830.1146219513428" References: <4451B5C1.5040901@gmail.com> <906dd82e0604272333t63fe5048ue205b6e7351c4c84@mail.gmail.com> <4451BED7.6040908@gmail.com> <4451C564.3040403@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_44486_570830.1146219513428 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 4/28/06, Paulex Yang wrote: > > Paulex Yang wrote: > > > I think two serialization test is necessary in general: > > > > 1. test for Harmony itself, which ensure that the object can be > > serialized/deserialized smoothly within Harmony VM/classlib > > 2. test for compatibility with RI, which ensure that the object > > serialized by RI can be deserialized by Harmony smoothly, and vice > versa. > > > > The sample I mentioned is only for case 1. And if I understand you > > clearly, your concern is about case 2, for which, there is a > > test_serializationCompatibility() method in [2]. > > > > And the SerializationTester[1] provide a helper method named as > > assertCompabilityEquals(Object obj, String fileName), which will > > deserialize object from give file (supposing it's the golden file > > generated by RI), compare with given Object and return result. > I missed one thing just now, because currently we only run testcases on > Harmony, currently these testcass only cover half of case 2 - > deserialized bytes generated by RI in Harmony. And if we start to run > testcase on RI someday, we can try some straight forward modification to > support the other part. > > Raulex, if you someday will want to add new option/capability to serialization testing it will be not trivial task to do if serialization tests are mixed with other tests. Thanks, Stepan. >> Thanks, > >> Mikhail > >> > >> > >> > >>> [1] > >>> > http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/tru= nk/support/src/test/java/tests/util/SerializationTester.java?rev=3D386058&v= iew=3Dlog > >>> > >>> [2] > >>> > http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/tru= nk/modules/luni/src/test/java/tests/api/java/util/IllegalFormatCodePointExc= eptionTest.java?rev=3D396023&view=3Dmarkup > >>> > >>> > >>> > >>>> I don't think that having ser tests separated is a bad idea, however > >>>> having an additinal test file with one-two methods only for each api > >>>> class looks like a bit 'expensive' approach. > >>>> > >>>> > >>>> > >>>>> Thanks, > >>>>> Mikhail > >>>>> > >>>>> 2006/4/27, Stepan Mishura : > >>>>> > >>>>> > >>>>>> Hi, > >>>>>> > >>>>>> I'd like to discuss naming conventions for serialization tests - > >>>>>> does it > >>>>>> make sense to separate serialization tests from unit tests? > >>>>>> > >>>>>> For example, in module security tests for serialization were > >>>>>> placed into > >>>>>> separate packages: > >>>>>> java.security.serialization > >>>>>> java.security.cert.serialization > >>>>>> java.security.spec.serialization > >>>>>> > >>>>>> Also it is possible to put tests in the same package but name > >>>>>> them in > >>>>>> different ways, for example, > >>>>>> SomeClassTest.java =96 unit test for SomeClass > >>>>>> SerSomeClassTest.java =96 serialization test for SomeClass > >>>>>> > >>>>>> Or we won't separate serialization tests from unit tests and will > >>>>>> test > >>>>>> serialization by adding corresponding methods to unit test, for > >>>>>> example, > >>>>>> public void testSerialization1() > >>>>>> public void testSerialization2() > >>>>>> public void testSerialization3() > >>>>>> public void testSerializationCorrupted() > >>>>>> public void testSerializationIllegalValues() > >>>>>> > >>>>>> Thoughts? > >>>>>> > >>>>>> Thanks, > >>>>>> Stepan Mishura > >>>>>> 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 > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>> > --------------------------------------------------------------------- > >>>>> 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 > >>>>> > >>>>> > >>>>> > >>>>> > >>>> -- > >>>> Anton Avtamonov, > >>>> 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 > >>>> > >>>> > >>>> > >>>> > >>> -- > >>> Paulex Yang > >>> China Software Development Lab > >>> IBM > >>> > >>> > >>> > >>> > >>> -- > >>> Paulex Yang > >>> China Software Development Lab > >>> IBM > >>> > >>> > >>> > >>> --------------------------------------------------------------------- > >>> 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.or= g > >>> > >>> > >>> > >> > >> --------------------------------------------------------------------- > >> 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 > >> > >> > >> > > > > > > > -- > Paulex Yang > China Software Development Lab > IBM > > > > --------------------------------------------------------------------- > 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 > > -- Thanks, Stepan Mishura 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 ------=_Part_44486_570830.1146219513428--