I few reasons.

1. sqlUnit has a declarative syntax similar to WebTest
2. The reporting is integrated into a WebTest report
3. I would rather use one db tool for creating, selecting, and deleting data

Tim

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Michael Habbert
> Sent: Monday, March 19, 2007 1:25 AM
> To: [email protected]
> Subject: Re: [Webtest] SqlUnit steps in WebTest
> 
> Hi Tim,
> 
> why don't you use the sql-task from ant?
> 
> --------
> <target name="changePasswordDirector">
>   <sql driver="${jdbc.driver.class}"
>      classpath="${jdbc.driver.classpath}"
>      url="${db.url}"
>      userid="${db.user}"
>      password="${db.password}"
>      src="./db_scripts/change_password_director.sql" />
> </target>
> -----------
> 
> Inside our test we do call the sql-task:
> 
> <antcall target="changePasswordDirector" />
> 
> and it works ;-)
> Is their a need for sqlunit?
> 
> 
> Tim Miller wrote:
> > I'm not sure this is the best place for this question but maybe someone
> > can answer. I am incorporating a SqlUnit test inside a WebTest. I get an
> > exception when using "truncate" or "delete" in the test. I know my db
> > connection is successful as I have some tests with "select" and these
> > work. I have tried to come up with the minimal test to invoke the sql
> > using SqlUnit.
> 
> [...]
> 
> > <?xml version="1.0"?>
> >
> > <!DOCTYPE sqlunit SYSTEM "file:sqlunit/lib/sqlunit.dtd" [
> >
> > ]>
> >
> > <sqlunit>
> >
> >   <connection extern="ApplicationModule/sqlunit-connection.properties"
> />
> >
> >   <setup></setup>
> >
> >   <test name="Delete data from ROLAP tables">
> >
> >     <sql>
> >
> >       <stmt>truncate table rf_chargeback;</stmt>
> >
> >     </sql>
> >
> >     <result></result>
> >
> >   </test>
> >
> >   <teardown></teardown>
> >
> > </sqlunit>
> 
> --
> Mit freundlichen Grüßen
> ------------------------------------------------------------------------
> Michael Habbert
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to