Hi there,
I just start to learn about sqlunit 2 days ago, and try to see if we could use it for our storeprocedure testing.
I am using sqlunit 5.0, and created such test case in the xml file.
===========
<test name="First SP" failure-message="FAiled SP">
<call connection-id="wand">
<stmt>{ call CASE2_PROC.CASE2_PROC(?)}</stmt>
<param id="1" name="p_value" type="NUMERIC" inout="inout">100</param>
</call>
<result>
<outparam id="1" type="INTEGER" name="p_value"> -->
<resultset id="1">
<row id="1">
<col id="1" type="NUMERIC">101</col>
</row>
</resultset>
</outparam> -->
</result>
</test>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I just start to learn about sqlunit 2 days ago, and try to see if we could use it for our storeprocedure testing. We are using sqlunit 5.0 and oracle 10.2.g. I have a question about my first store procedure case.
Here is my store procedure:
create or replace PROCEDURE increaseValue (p1 IN OUT NUMBER) AS
n NUMBER;
BEGIN
n := p1;
p1 := n + 1;
END;
===========
Here is my test case that I created in the XML file.
<test name="Try my first sp in sqlutil" failure-message="Something not right.">
<call connection-id="wand">
<stmt>{ call DM_UTIL.increaseValue(?)}</stmt>
<param id="1" name="p_value" type="NUMERIC" inout="inout">100</param>
</call>
<result>
<outparam id="1" type="INTEGER" name="p_value"> -->
<resultset id="1">
<row id="1">
<col id="1" type="NUMERIC">101</col>
</row>
</resultset>
</outparam>
</result>
</test>
=========
And I get such messages when I was running it in verbose mode.
sqlunit-flat:
[sqlunit] *** Running SQLUnit file: test.xml
[sqlunit] Getting connection(wand)
[sqlunit] Setting up test...
[sqlunit] Running test[1]: First SP (0ms)
[sqlunit] org.jdom.Element.addContent(Lorg/jdom/Element;)Lorg/jdom/Element;
[sqlunit] Tearing down test...
[sqlunit] sqlunit-ant: SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
[sqlunit] SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
BUILD FAILED
/home/cji/sqlunit-5.0/build.xml:171: SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
at net.sourceforge.sqlunit.ant.SqlunitTask.execute(SqlunitTask.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Any ideas while it is failed ?
Thanks a lot
Charlie
Charlie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I just start to learn about sqlunit 2 days ago, and try to see if we could use it for our storeprocedure testing.
I am using sqlunit 5.0, and created such test case in the xml file.
===========
<test name="First SP" failure-message="FAiled SP">
<call connection-id="wand">
<stmt>{ call CASE2_PROC.CASE2_PROC(?)}</stmt>
<param id="1" name="p_value" type="NUMERIC" inout="inout">100</param>
</call>
<result>
<outparam id="1" type="INTEGER" name="p_value"> -->
<resultset id="1">
<row id="1">
<col id="1" type="NUMERIC">101</col>
</row>
</resultset>
</outparam> -->
</result>
</test>
Pleaes ignore my previous posting!
Hi there,
I just start to learn about sqlunit 2 days ago, and try to see if we could use it for our storeprocedure testing. We are using sqlunit 5.0 and oracle 10.2.g. I have a question about my first store procedure case.
Here is my store procedure:
create or replace PROCEDURE increaseValue (p1 IN OUT NUMBER) AS
n NUMBER;
BEGIN
n := p1;
p1 := n + 1;
END;
===========
Here is my test case that I created in the XML file.
<test name="Try my first sp in sqlutil" failure-message="Something not right.">
<call connection-id="wand">
<stmt>{ call DM_UTIL.increaseValue(?)}</stmt>
<param id="1" name="p_value" type="NUMERIC" inout="inout">100</param>
</call>
<result>
<outparam id="1" type="INTEGER" name="p_value"> -->
<resultset id="1">
<row id="1">
<col id="1" type="NUMERIC">101</col>
</row>
</resultset>
</outparam>
</result>
</test>
=========
And I get such messages when I was running it in verbose mode.
sqlunit-flat:
[sqlunit] *** Running SQLUnit file: test.xml
[sqlunit] Getting connection(wand)
[sqlunit] Setting up test...
[sqlunit] Running test[1]: First SP (0ms)
[sqlunit] org.jdom.Element.addContent(Lorg/jdom/Element;)Lorg/jdom/Element;
[sqlunit] Tearing down test...
[sqlunit] sqlunit-ant: SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
[sqlunit] SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
BUILD FAILED
/home/cji/sqlunit-5.0/build.xml:171: SQLUnit Tests Failed: In file: test.xml, tests: 1, failures: 1, errors = 0
at net.sourceforge.sqlunit.ant.SqlunitTask.execute(SqlunitTask.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Any ideas while it is failed ?
Thanks a lot
Charlie
Charlie