call Procedure having output parameters in JDBC Test Step not showing value of output variable
- 7 years ago
Googling around, it looks like the JDBC TestStep doesn't have a way to get the output variable so you have to use Groovy.
http://groovy-lang.org/databases.html for how to create a connection, then
http://groovy-lang.org/databases.html#_stored_procedures for how to get the output variable.
- 7 years ago
Thank You !!!
Yes. JDBC TestStep doesn't have a way to get the output variable, so I have to used Groovy Script here.
Once I called stored procedure with: {call getActors(@cgetActorsnt)} then I have added one more step to get value of output variable from the called store procedure as below:
// To get the value of output variable from the called store procedure
def valueOfOutputVariable = con.rows("select(@cnt)")valueOfOutputVariable displayed the count as 200 which is expected and matching as per the database query.