Service Virtualization

  • 1.  How to get next pattern value ?

    Posted Jul 25, 2018 08:55 AM

    Hi All,

    I have a response which contains many customers.

     

    Using patterns (like {{ =[:First Name:] }}) in my response, the same pattern value is used for each customer

     

    Is there a way to specify the pattern to get/use next value ?

     

    Benoit



  • 2.  Re: How to get next pattern value ?
    Best Answer

    Broadcom Employee
    Posted Jul 25, 2018 09:42 AM

    Using String patterns like {{=[:First Name:]}}, {{=[:LastName:]}}, {{=[:SSN:]}}, {{=[:Street Address:]}},.. will create the same values if the string pattern is used multiple times.

     

    One workaround is to use {{=%beanshell% com.ca.sv.devtest.util.GenerateString.forRegex("[A-Za-z0-9]{5,15}");}} in VSI response. This option will create dynamic values based on the Regular expression.



  • 3.  Re: How to get next pattern value ?

    Posted Jul 25, 2018 09:48 AM

    Okay thanks.

    Do you think that a new keyword/instruction to load a new value for pattern could be a good idea ?



  • 4.  Re: How to get next pattern value ?

    Posted Jul 26, 2018 02:37 AM

    Maybe not usefull idea... Dynamic values are enough.

     

    Benoit