Re: Using AspectJ for cross-db unit testing.

From: Andriy Shapochka (ashapochk..otmail.com)
Date: Thu Oct 30 2003 - 07:10:58 EST


> Thanks for the great example. This is something I was looking for. I
> guess we may stick the adapter-specific aspects into corresponding
> adapter testing delegates. I can identify the following things to be
> customized:
>
> 1. Tables to be skipped during schema generation
> 2. Additional SQL to be executed during schema generation (used for
> Stored Procedures testing)
> 3. Tests to be skipped.
>
> Will think about a good way to configure this.... Although putting it
> in one place in Java code is probably as good as creating an XML file
> :-).
>
> Andrus
>

You might also be interested to see the following article (and there is a
site www.mockobjects.org dealing with the subject too)
http://www.xprogramming.com/xpmag/virtualMockObjects.htm

It describes the technique complimentary to the one I tried to illustrate in
the previous message. Its distinctive feature is you do not just switch the
method in question (or object to that matter) off but also you "sham" its
invocation, your "scam" being logged at the same time, or something :).
Thus, if you have a good comprehensive test scenario you would like to run
Cayenne against, and a part of it is known not to function due to the
database/driver restrictions then you mock exactly this part letting the
rest be as is and everything works again.

Andriy.



This archive was generated by hypermail 2.0.0 : Thu Oct 30 2003 - 07:05:11 EST