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.
Thanks,
Tim
Test:
<?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>
Log:
[java] [sqlunit] The number of ireporters is 1
[java] [sqlunit] sqlunit-ant: SQLUnit Tests Failed: In file:
ApplicationM
odule/Analytics/AnalyticsChargebacks/dbDeleteRolap.xml, tests: 1,
failures: 1, e
rrors = 0
[java] [sqlunit] SQLUnit Tests Failed: In file:
ApplicationModule/Analyti
cs/AnalyticsChargebacks/dbDeleteRolap.xml, tests: 1, failures: 1, errors
= 0
[java] INFO - Running with: Canoo Webtest: R_1351.
[java] INFO - Exception thrown from this class:
org.apache.tools.ant.BuildE
xception
[java] INFO - Message was: SQLUnit Tests Failed: In file:
ApplicationModule
/Analytics/AnalyticsChargebacks/dbDeleteRolap.xml, tests: 1, failures:
1, errors
= 0
[java] ERROR - Cannot handle unexpected exception in step
AntWrapper at wi
th ()
[java]
C:\home\qauser01\toolsv35r2Build3\PortalTests\tests\ApplicationModul
e\Analytics\AnalyticsChargebacks\AnalyticsChargebacks.xml:61: SQLUnit
Tests Fail
ed: In file:
ApplicationModule/Analytics/AnalyticsChargebacks/dbDeleteRolap.xml,
tests: 1, failures: 1, errors = 0
[java] at
net.sourceforge.sqlunit.ant.SqlunitTask.execute(SqlunitTask.j
ava:142)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
com.canoo.webtest.extension.AntWrapper.doExecute(AntWrapper.j
ava:85)
[java] at com.canoo.webtest.steps.Step.execute(Step.java:130)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepS
equence.java:58)
[java] at
com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequ
ence.java:39)
[java] at com.canoo.webtest.steps.Step.execute(Step.java:130)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at
com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:15
2)
[java] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[java] at org.apache.tools.ant.Task.perform(Task.java:364)
[java] at org.apache.tools.ant.Target.execute(Target.java:341)
[java] at
org.apache.tools.ant.Target.performTasks(Target.java:369)
[java] at
org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[java] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[java] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[java] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[java] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[java] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[java] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[java] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[java] INFO - Test report successfully created.
[java] BUILD SUCCESSFUL
[java] Total time: 14 seconds
(This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies of the original message.)