I believe your problem may stem from the assertion attribute within your test tag.
Currently, you have assert="not-equal". Since you have specified an expected value of 323 for c1, and the query returns 22, the two values are not equal. Therefore the test returns passes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi this is the test in my test.xml
<test name="name" failure-message="fail" assert="not-equal">
<sql><stmt>SELECT c1 FROM table WHERE primary_column = 'abc'</stmt></sql>
<result>
<resultset id="1">
<row id="1">
<col id="1" name="c1" type="VARCHAR">323</col>
</row>
</resultset>
</result>
</test>
suppose the query is returning only one row, and the c1 has the value 22.
the test should fail, but the comparision is not happening at all.
can anyone help me in this.
i am using sqlunit 4.9 on oracle 9.2.0.1
Thankyou
P E Stephen
p.e.stephen@gmail.com
Hi Stephen,
I believe your problem may stem from the assertion attribute within your test tag.
Currently, you have assert="not-equal". Since you have specified an expected value of 323 for c1, and the query returns 22, the two values are not equal. Therefore the test returns passes.
What happens if you change:
<test name="name" failure-message="fail" assert="not-equal">
To:
<test name="name">
Using the defaults?
Dave
Hi james
I have tried with about 14 other assert variables also for the test.
they can be found in the online help file.
i'll cross check again.
but if u come accross any thing else, please let me know
meanwhile i'll check them again
Thankyou
P E Stephen
p.e.stephen@gmail.com
I'll check that right now fishburn
just a min
Hi Fishburn
i have deleted the attribute and its working fine.
thanks a lot
but a doubt
whats the default value
thankx
ok
resultsets-equal seems to be the default value
hi james and fishburn
sorry, it was my mistake that i typed resultset-equal.
it should have been resultsets-equal
i misses a s
i have used resultsets-equal and i am getting the output now
sorry for all the trouble
but thanx a lot