Forum Discussion

abhi1887's avatar
abhi1887
New Contributor
16 years ago

sql queries in DataSource TestStep

I'm using soap ui pro 2.5. I create a Datasource step for my test case, select JDBC datasource and provide connection setting. The database I use is oracle 10g.

I have 2 queries here -

1) I'm able to make call using sql query. However, it allows only one sql query at a time. Semicolon between the queries does not work. I know that creating 2 separate datasource steps is an option but can this be done in single step, with multiple sql queries?

2) I have a query like select * from table_name where field_name = <value>
Can <value> be mapped using properties? Any idea how can we transfer property in sql query?

3) Any articles on making stored procedure call. How do we handle out parameters of stored procedures?

Please help me if you have understanding on any/all of the above.

Thanks
Abhi

3 Replies

  • Hi,

    For 2), yes we can map a property. The value can be assigned as a test case property (or datasource prop or testsuite prop etc). And that can be used as:

    select * from table_name where field_name = '${#TestCase#value}'

    For 1) and 3), I have no idea, and will like to know how this can be accomplished.

    Regards,
  • vikash's avatar
    vikash
    New Contributor
    steps to call stored procedure from JDBC step:

    {call storedProcname( 'parameter' )}
    {call storedProcname( '${Properties#customerId}' )} => if u would like to pass in a property value as a parameter

    check the box which says select if this is a stored procedure