Service Virtualization

Expand all | Collapse all

Comparing filter value with value reading from excel sheet and update the sheet

  • 1.  Comparing filter value with value reading from excel sheet and update the sheet

    Posted Feb 01, 2018 02:55 PM

    Hi Team,

     

    I have a scenario where am filtering one element suppose say CustomerId from request xml. I have the customer details in excel sheet.

    so my scenario is i wanted to check whether the customerId coming in request exist in excel or not,if exists nothing needs to be changed, it will go to image selection step. If the Id doesnt exist then i have to update the excel sheet with the Id coming in request and route to image selection step.

     

    I used Parse text from XML filter for filtering the ID value from request XML and i used read rows from excel sheet dataset inorder to read data from excel sheet.

     

    I tried to compare using ensure the properties are equal assertion and write to delimited file utility.

    if the assertion boolean value is false then go to write to delimited file step.But it didnt work for me.

     

    Could you please help me in solving this scenario.

     

    Thanks in advance.

    Regards,

    Girija.



  • 2.  Re: Comparing filter value with value reading from excel sheet and update the sheet

    Posted Feb 02, 2018 10:17 AM

    Hello Girija,

     

    Do you know which part is not working? You can try to run your VSM in the ITR, for debugging purpose, and verify, in the properties and test event tabs, if the filters worked fine and if the assertion was fired.

     

    Heloisa



  • 3.  Re: Comparing filter value with value reading from excel sheet and update the sheet
    Best Answer

    Broadcom Employee
    Posted Feb 02, 2018 10:26 AM

    Datasets are loaded when testcase or VS is loaded. I don't think you can update the dataset during the execution of the test case or VS if you have the Read/Write steps in the test case or in VSM.

     

    You can add SubProcess step(s) in your testcase or VSM for Read/Write steps and that should help you with the issue. Also, make sure you select the "Local" check box option when you add datasets in the subprocess step.