Service Virtualization

  • 1.  How to concatenate columns in excel while reading

    Posted Jan 24, 2018 12:09 PM

    Hi,

     

    I have an excel with multiple columns where i need to compare it with DB result of 1000+ records. 

    The DB result has only one column - Address

    The excel has Address splitted into Addr1, Addr2, City and State. (4 columns). So while comparison can someone help what kind of steps could be used to combine all these data into a single address.

    There is one way to concatenate the excel columns into single column and then do the comparison. Is there any other way to do it in the devtest steps or Assertions to concatenate and compare.



  • 2.  Re: How to concatenate columns in excel while reading
    Best Answer

    Posted Jan 24, 2018 05:14 PM

    Hi,

        Use Execute script step and  use the following

    String address=addr1+addr2+city+state;
    testExec.setStateValue("Address",address);
    return Address;

                                                    Thanks,

    Regards,

    Vish



  • 3.  Re: How to concatenate columns in excel while reading

    Posted Jan 31, 2018 03:38 PM

    It works fine now. Thanks!