Forum Discussion

Koopman_Interna's avatar
Koopman_Interna
Contributor
13 years ago

Testing for JDBC fault

Hi,

For a soap request I can assert that the request is failing by asserting a Soap Fault.

I do a lot of DB testing and would like to do the same for a JDBC Fault.
But a JDBC request that is in error immediately fails the step, without an assertion.
I would want to make that implicit by asserting 'JDBC Fault' or 'Not JDBC fault'
To not break old tests the 'Not JDBC Fault' should be included by default?

Example: insert into table xxx values (null, null, null) fails for missing required fields.
I would like to test that this statement fails.(And thus pass my test).
Same for testing ref.integrity constraints.
Or delete constraints, where a delete from headertable where id = yyy should fail if there are details referring to it. The test passes if the delete fails.