Forum Discussion

ruby_dee's avatar
ruby_dee
Occasional Visitor
9 years ago

How can I trap Oracle errors in script assertion

How can I trap Oracle errors in a script assertion for a JDBC test step?

My query sometimes returns "ORA-00942: table or view does not exist" due to permission issues, even though the connection is ok. However the JDBC status assertion is not evaluated - the test step never turns red or green.

I want to force the test step to fail if this error occurs. How can this be achieved?

1 Reply

  • zorglups's avatar
    zorglups
    Occasional Contributor

    Hello,

    I run into the same problem.

    My JDBC Test Step does query a table that obviously does not exist in the database.

    I have a "JDBC Status" assertion but it is not evaluated and the Test Case does not turn RED.

    The only place I can see things went wrong is when I open the log pane at the bottom of ReadyAPI.

     

    How can I add an assertion that checks that the query could be run ?

    What is the aim of the "JDBC Status" if this does not cover such case ?

     

    Thanks in advance for your help.

     

    Pierre