Hi,
I'm evaluating a DB Testing app for our group and was recommended to try out SQLUnit.
We've managed to get to a certain point and are stuck getting set up. Could someone please help? It'd be much appreciated!
The build.xml file appears to be working and we can connect but we're getting an error in our test file and are stumped.
Thank you,
Jenny
at the command line (DOS)
C:\SQLUnit\sqlunit-5.0>ant run-test
Buildfile: build.xml
def:
run-test:
[sqlunit] One or more SQLUnit Tests failed, see blah2.txt for details
Here is a copy of our test file:
<sqlunit>
-
<connection>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>xxxx</url> (this works, just commenting it out
<user>xxxxx</user>
<password>xxxxx</password>
</connection>
-
<test name="Checking returned value from customer" failure-message="Returned value check for customer failed">
-
<sql>
<stmt>select prsn_id from prsn_table where prsn_id=11992</stmt>
</sql>
-
<result echo="true">
<resultset id="1" rowcount="1"/>
</result>
</test>
</sqlunit>
Here's a snippet of the output file:
Class java.text.MessageFormat loaded from parent loader (parentFirst)
[sqlunit] net.sourceforge.sqlunit.SQLUnitException: One or more SQLUnit Tests failed, see blah2.txt for details
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am assuming that you copied from the sqlunit-flat or sqlunit-nested targets when building your "run-tests" target?
In that case, what does your ant "run-tests" target look like? Also, what does blah2.txt contain? Also, does the select statement run against the database on its own? What happens when you comment out the body of the result tag, so it becomes like this:
<result echo="true" />
The query itself appears to be pretty simple, and there is no reason SQLUnit should not be able to run it afaik. However, you may want to cover as many possibilities as possible, and report them, that way most of the time you will hit the solution yourself, or at least make it easy for someone to help.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm evaluating a DB Testing app for our group and was recommended to try out SQLUnit.
We've managed to get to a certain point and are stuck getting set up. Could someone please help? It'd be much appreciated!
The build.xml file appears to be working and we can connect but we're getting an error in our test file and are stumped.
Thank you,
Jenny
at the command line (DOS)
C:\SQLUnit\sqlunit-5.0>ant run-test
Buildfile: build.xml
def:
run-test:
[sqlunit] One or more SQLUnit Tests failed, see blah2.txt for details
Here is a copy of our test file:
<sqlunit>
-
<connection>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>xxxx</url> (this works, just commenting it out
<user>xxxxx</user>
<password>xxxxx</password>
</connection>
-
<test name="Checking returned value from customer" failure-message="Returned value check for customer failed">
-
<sql>
<stmt>select prsn_id from prsn_table where prsn_id=11992</stmt>
</sql>
-
<result echo="true">
<resultset id="1" rowcount="1"/>
</result>
</test>
</sqlunit>
Here's a snippet of the output file:
Class java.text.MessageFormat loaded from parent loader (parentFirst)
[sqlunit] net.sourceforge.sqlunit.SQLUnitException: One or more SQLUnit Tests failed, see blah2.txt for details
Hi dbuni,
I am assuming that you copied from the sqlunit-flat or sqlunit-nested targets when building your "run-tests" target?
In that case, what does your ant "run-tests" target look like? Also, what does blah2.txt contain? Also, does the select statement run against the database on its own? What happens when you comment out the body of the result tag, so it becomes like this:
<result echo="true" />
The query itself appears to be pretty simple, and there is no reason SQLUnit should not be able to run it afaik. However, you may want to cover as many possibilities as possible, and report them, that way most of the time you will hit the solution yourself, or at least make it easy for someone to help.
-sujit