Service Virtualization

Expand all | Collapse all

how can i save the result of database query(mysql) result to an excel file using apptest?

  • 1.  how can i save the result of database query(mysql) result to an excel file using apptest?

    Broadcom Employee
    Posted Dec 01, 2016 12:46 PM

    I am creating a worktiem in CAAC using apptest with excel as the dataset and with some logic the same details of the work item is being stored in a database.

    Now i want to validate the workitem field values  in the database with the ones i have in the excel.

     

    I am able to connect to the required database using apptest and am able to execute the query and am able to see the response. now i want to write the response to the excel and then compare these values to the ones i have my dataset.

     

    Is there any possibility? if yes how?



  • 2.  Re: how can i save the result of database query(mysql) result to an excel file using apptest?
    Best Answer

    Posted Dec 03, 2016 08:40 PM

    In your test, within the jdbc resultset window, highlight each row item and create a filter from it.  Do this for all column row data items you wish to report on.

     

    Then in a test execute a create delimited file step and pass into it the filter params from your data set as expected values.. and pass in the filter values from the jdbc result as actual values.  The delimited file can be a .csv file extension, which can be used in excel