harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura" <stepan.mish...@gmail.com>
Subject Re: [classlib] Merging frameworks for testing serialization - first step
Date Mon, 26 Jun 2006 07:08:25 GMT
On 6/24/06, Andrew Zhang wrote:
>
> Welldone stepan!
>
> I have a small question about the sample from serialization page[1]:
>
>
> public void testSerializationCompatibility()
>        throws Exception {
>
>    SerializationTest.verifyGolden(new SomeSerializableClass());
> }
>
> Any argument for  ****.golden.ser?  Typing error?


Good catch! I missed 'TestCase' param in the example - fixed in r417133.

Thanks,
Stepan.

Thanks!
> On 6/23/06, Stepan Mishura <stepan.mishura@gmail.com> wrote:
> >
> > Hi,
> >
> > I've updated framework for testing serialization page[1] - I added
> > guidelines
> > for developing serialization tests. Also I've removed confusing
> 'TestCase'
> > parameter in SerializationTest.verifySelf() methods.
> >
> > If there are no objections I'm going in next two days to move
> > SerializationTest.java from 'security' module to support folder. So new
> > location will be:
> > support/src/test/java/org/apache/harmony/testframework/serialization
> > folder.
> > Class name won't change.
> >
> > Thoughts?
> >
> > Thanks,
> > Stepan.
> >
> > [1]
> >
> >
> http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_testing.html
> >
> > On 6/20/06, Stepan Mishura  wrote:
> > >
> > >  Hi,
> > >
> > > I'm going to start merging existing frameworks for testing
> > serialization.
> > >
> > > As first step I've updated 'security' framework. The updated framework
> > > searches and loads resource files according [1] and eliminates
> > requirement
> > > to extend SerializationTest. Also to provide smooth frameworks merging
> > I've
> > > put stub to let the framework search resources in the 'old' way ( i.e.
> > via
> > > "RESOURCE_DIR" system property). The stub will be removed after
> > completing
> > > the merge.
> > >
> > > The updated framework suggests the following way for testing
> > > serialization:
> > >
> > > a) Compatibility – 4 new static methods are introduced.
> > >     verifyGolden(TestCase, Object)
> > >     verifyGolden(TestCase, Object, SerializableAssert)
> > >     verifyGolden(TestCase, Object[])
> > >     verifyGolden(TestCase, Object[], SerializableAssert)
> > >
> > > A test should invoke one of above methods, for example,
> > > public void testCompatibility() throws Exception {
> > >     SerializationTest.verifyGolden(this, new SomeSerializableClass
> ());
> > > }
> > >
> > > b) Self-testing: the same as for compatibility – there are 4 new
> static
> > > methods that should be invoked from a test:
> > >     verifySelf(TestCase, Object)
> > >     verifySelf(Object, SerializableAssert)
> > >     verifySelf(TestCase, Object[])
> > >     verifySelf(Object[], SerializableAssert)
> > >
> > > For example,
> > > public void testSelf() throws Exception {
> > >     SerializationTest.verifySelf(new SomeSerializableClass(), new
> > > MyComparator());
> > > }
> > >
> > > To complete frameworks merging I'd like to suggest the next steps:
> > > 2) Reviewing the update and the suggested way for testing
> serialization
> > by
> > > the community. Please let me know if it is acceptable and what can be
> > > improved.
> > > 3) Replace SerializationTester class with SerializationTest. I'm going
> > to
> > > add more stubs to let existing tests work in the 'old' way.
> > > 4) Adjusting existing serialization tests (moving and renaming
> resource
> > > files, replacing stubs invocation with new methods)
> > > 5) Removing stubs.
> > >
> > > Thanks,
> > > Stepan Mishura
> > > Intel Middleware Products Division
> > >
> > > [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
> > >
> >
> >
> >
> > --
> > 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
> >
> >
>
>
> --
> Andrew Zhang
> China Software Development Lab, IBM
>
>


-- 
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

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