ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: script runner with junit
Date Thu, 13 Jan 2005 17:16:43 GMT
Nathan,

I've never actually done it, so I can't help you directly.  :-(
However, dbunit does have built-in support for Oracle [bc]lob (see their 
FAQ), and so does ibatis as of 2.0.9 (see the release notes?).
The actual wiring is left as an exercise... ;-)

HTH,
Kris

> Kris,
>
> This looks right up my alley!  Now comes the hard part....  How would 
> you incorporate LOB into the picture?
>
> Nathan
>
> On Jan 13, 2005, at 9:21 AM, Kris Jenkins wrote:
>
>> Nathan Maves wrote:
>>
>>> Team,
>>>
>>> Kind of an OT question but here goes.
>>>
>>> Consider the example of a student.  I have a Dao that handles the 
>>> select/insert/update/delete ( and many others) of a Student.  I my 
>>> junit test case I want to use the ibatis script runner to test these 
>>> methods.  At first thought I figured that I would put the 
>>> initialization code in the setup() method and the cleanup in the 
>>> tearDown().  Problem here it that these method get called for every 
>>> test.  So I end up setting up and cleaning the database for every test.
>>>
>>> Is there a better way to do this?  Any examples?
>>>
>>> Nathan
>>
>>
>> Have you considered dbunit?  I've found it pretty easy to work with 
>> (providing you've got a test database you can happily trash!)
>>
>> Here are a couple of good links:
>>
>> http://dbunit.sourceforge.net/
>> http://www.onjava.com/pub/a/onjava/2004/01/21/dbunit.html
>>
>> Kris
>>
>>
>> -- 
>> Kris Jenkins
>> Email:  kris@jenkster.com
>> Blog:   http://cafe.jenkster.com/
>> Wiki:   http://wiki.jenkster.com/
>>
>>
>>
>> -- 
>> No virus found in this outgoing message.
>> Checked by AVG Anti-Virus.
>> Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 12/01/2005
>>
>
>
>


-- 
Kris Jenkins
Email:  kris@jenkster.com
Blog:   http://cafe.jenkster.com/
Wiki:   http://wiki.jenkster.com/



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.11 - Release Date: 12/01/2005


Mime
View raw message