Search code examples
automated-testsparasoft

Add DB update task after a test case execution in Parasoft


I have been using Parasoft SOA Testing Tool(9.10) for testing a WCF service. I have two test cases in a test suite. I want to do an update of a database table row after executing the first test case. How can I implement that in parasoft soa tool.

eg:

> Step 1: Test Case 1: Add an Account 
> Step 2: UPDATE database and set a field of Account table to verified 
> Step 3: Test Case 2: View Account

Solution

  • I'm assuming that you are using MS SQL DB in your test scenario. If yes, please use DB Tool to execute update SQL query.

    DB Tool

    Now, depending on how do you want to get update, configure connection with DB Connections details

    and use appropriate SQL query

    select/update query

    Depending on how do you want to View Account in step 3, you may want to use XML DataBank which store output from SQL query to use it as input for validation/assertion.

    Don't forget to add proper driver to connect with SQL DB in Parasoft>Preferences>JDBC Drivers, then restart tool.