Service Virtualization

Expand all | Collapse all

How to convert section of Delimited Text to Magic string?

Jump to Best Answer
  • 1.  How to convert section of Delimited Text to Magic string?

    Posted 07-28-2017 07:40 AM

    #

    Greetings Team,

     

     

     

    I am building a JMS based Virtual service for Performance testing and request response message is in Delimited text format with "/" as the delimiter.

     

     

     

    The VS is being built via Request-Response pairs method and have selected "Line Delimited" as the delimiter type.

     

     

     

    Sample Request

     

    AAAAAAAA
    .BBBBBB
    ***
    NEMDEF
    000-001122334455-000000000000
    YYY/UUU/Y6/M00.0/COOKS
    SSS/ABC1234/25JUL
    DLH/FIRSTNAME
    /ASHOK KARNATAMIL

     

     

     

    Sample Response

     

    .BBBBBB 2336355
    ***
    ABC1234/25JUL
    000-001122334455-000000000000
    ERR/ERROR DESCRIPTION

     

     

     

    Highlighted italic content needs to be set as magic string, when Line Delimited type is used "ABC1234/25JUL" is not converted into magic string. If List of Values with "/" as the delimiter is used "000-001122334455-000000000000" is not converted into magic string.

     

     

     

    Please let me know how to overcome this situation.

     

     

     

    Thanks in advance.



  • 2.  Re: How to convert section of Delimited Text to Magic string?
    Best Answer

    Posted 07-28-2017 02:36 PM

    Hi Mahesh,

     

    There is a property used to define how searches in VSE for magic string content relate to word boundaries.

    # none: Word boundaries don't matter.
    # start: Magic string candidates must start on a word boundary.
    # end: Magic string candidates must end on a word boundary.
    # both: Magic string candidates must be found as a whole word (i.e., a word boundary on both ends). This is the default value.

     

    Try to add the property below to your local.properties file and play with the options above. As mentioned the default value is "both":

          lisa.magic.string.word.boundary.type=both

     

    If you are you using the Workstation to create the service, you will need to edit the local.properties where this Workstation is installed. You will need to restart the Workstation every time you modify the properties file.

     

    Hope it helps.

    Heloisa



  • 3.  Re: How to convert section of Delimited Text to Magic string?

    Posted 07-31-2017 03:44 AM

    Thanks Heloisa :)

     

    Much appreciated.