On 6/27/06, Geir Magnusson Jr wrote:
Stepan Mishura wrote: > On 6/27/06, Geir Magnusson Jr wrote: >> >> One minor thing - if you do an ant rebuild and then go into a module to >> test something specific, it won't work because the support stuff doesn't >> get build. >> >> I don't know the right solution. Maybe the module build.xml triggers >> building the support test, or just a note somewhere to remind people? > > > I think adding 'support.jar' to classpath will help. Not if it's not built. That's the issue. There's no problem if you do an ant test from /trunk, but if you are 'clean', and then just dive into modules/$foo and ant test from there, you're stuck.
OK, I see what you mean. But this doesn't relate to moving SerializationTest to support. For example, if you are do 'ant clean' in the classlib and then 'cd modules/security; ant test'. You will see: Buildfile: build.xml compile.java: [echo] Compiling SECURITY classes [javac] Compiling 262 source files to C:\Apache\Harmony\ClassLib\build\classes [javac] Fatal Error: Unable to find package java.lang in classpath or bootclasspath BUILD FAILED C:\Apache\Harmony\ClassLib\modules\security\build.xml:62: Compile failed; see the compiler error output for details. Thanks, Stepan.
Not a big deal, just figured someone might be inconvenienced, and if we either had a fix or a note, that would be cool. geir > > Thanks, > Stepan. > > geir >> >> >> Stepan Mishura wrote: >> > On 6/26/06, Tim Ellison wrote: >> >> >> >> Stepan Mishura wrote: >> >> > On 6/26/06, Tim Ellison wrote: >> >> >> >> >> >> Stepan Mishura 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? >> >> >> >> >> >> Looks good, just a couple of minor comments: >> >> >> >> >> >> - You might as well move them (or duplicate them) to an >> >> >> org.apache.harmony. package while you are moving things around, >> since >> >> we >> >> >> want to get rid of tests.util as a package name. >> >> > >> >> > 'Them' means tests, right? >> >> >> >> Sorry, I actually meant the testing framework itself. The doc says >> >> >> >> "The testing framework provides support class >> >> tests.util.SerializationTest for serialization testing." >> >> >> >> I figured it would be easier to put them in the right place. >> > >> > >> > Ops..., sorry. I thought about replacing SerializationTester and >> > accidentally put its package name. It should say: >> > " The testing framework provides support class >> > org.apache.harmony.testframework.serialization.SerializationTest for >> > serialization testing." >> > >> > I fixed the doc in r417196. Looks better now? :-) >> > >> >> - Please will you ensure that the Manifests are updated accordingly so >> >> >> that the world is not broken. >> >> > >> >> > >> >> > Sure, I will try. >> >> > >> >> > - Not sure about the word 'golden' to mean 'reference' data, when we >> >> >> could just use reference, but whatever. >> >> > >> >> > In the method names or resource file name? Or both? >> >> >> >> Ideally both, it just seems like jargon -- but I realize that such >> >> renaming doesn't really 'advance the cause', so whatever you think. >> > >> > >> > I'm OK with 'reference' and currently 'golden' can be easily replaced >> with >> > it. Otherwise after we rename everything it will be not so simple. >> > >> > Thanks, >> > Stepan. >> > >> > Regards, >> >> Tim >> >> >> >> >> > >> >> >> > [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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]