Yes - we use Canoo via Ant, and use DBUnit to seed our database with test data.

in the build.xml in which everything is set up, we define our driver:
<property name="dbunit.driver" value="oracle.jdbc.driver.OracleDriver"/>

declare the classpath for DBUnit
<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" 
classpathref="classpath"/>

and then later, in an initialization target that gets called before a run 
target, we do a couple things - directly purge the bin via <sql>, set up the 
necessary parameters for dbunit, and then populate tables based on what we 
need.  You can also see where I've commented out a few lines that export a 
table to xml.  I populate my tables by hand, export the data, and then it's 
ready to be used as needed.
    <target name="init-db" depends="clean" >
        <sql classpathref="classpath" driver="${dbunit.driver}" 
userid="${dbunit.userid}" password="${dbunit.password}" url="${dbunit.url}">
            PURGE RECYCLEBIN;
        </sql>
        <dbunit driver="${dbunit.driver}"          
                url="${dbunit.url}"
                userid="${dbunit.userid}"
                password="${dbunit.password}"
                schema="${dbunit.schema}" >
            <!--<export dest="tests/resources/testdata.xml" format="flat" >
                <table name="PERSONNEL" />            
            </export>   -->
            <operation type="CLEAN_INSERT" src="tests/resources/testData.xml" 
format="flat"/>    
            <operation type="REFRESH" src="tests/resources/personnelData.xml" 
format="flat"/>
            
        </dbunit>
    </target>

I'm still learning all this, but so far so good - hope this helps.

From: [EMAIL PROTECTED]
To: [email protected]
Subject: [Webtest] Canoo Webtest and DBUnit Integration
Date: Mon, 17 Dec 2007 13:44:47 -0500








Hello,
 
Has anyone done 
Canoo and DBUnit integration? Can you provide some examples.
 
Thank 
You.
 
Urvi.
 

_________________________________________________________________
i’m is proud to present Cause Effect, a series about real people making a 
difference.
http://im.live.com/Messenger/IM/MTV/?source=text_Cause_Effect

Reply via email to