Service Virtualization

Expand all | Collapse all

What is the use of magic string in VSI response and how can we tackle it during playback.

Jump to Best Answer
  • 1.  What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 06-04-2016 08:36 AM

    What is the use of magic string in VSI response, and how can we tackle the dates, as we are getting xstream.mapper. exception while doing playback of our recordings.



  • 2.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.
    Best Answer

    Posted 06-06-2016 09:26 AM

    During recording, DevTest parsers scan requests and responses using a value matching algorithm.  The idea is that information on the incoming request can be marshaled from the requests into responses at run time to make responses more lifelike.  Similarly, DevTest examines responses for a range of date patterns and attempts to build magic dates that keep the responses from becoming stale over time.  Some discussion of magic dates can be found here: Magic Dates - DevTest Solutions - 9.1 - CA Technologies Documentation  and magic strings here: Magic Strings - DevTest Solutions - 9.1 - CA Technologies Documentation.

     

    In the lisa.properties file, the lisa.magic.string.min.length and lisa.magic.string.word.boundary help control magic string logic.  A little further down in the same file you should see the datechecker properties (regex and formatters) that provide support for different date formats.

     

    Can you provide more information about the actual exception to give some context? 

    Is the exception occurring inside the VSM or in the consumer application after the response is received?

    Do you want to add a date format that is not currently configured?

    Are the magic dates being replaced with a value that is not correct?

    etc....



  • 3.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 01-17-2017 04:51 PM

    Aamair,

     

    Did Joel's recommendation help you out with this issue?



  • 4.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 11-20-2018 09:58 AM

    J_NeSmith Rahul3183

     

    i was just trying to use Magic string for one of service developed . It is text format request for which we have custom data protocol . Method used is RRpair one . I was wandering does Magic string works for service devloped using recording method or it applies to all the methods . 

    Because when i am trying to set particular Argument as magic string using check box it is not working out . 

    Version used : 8.0



  • 5.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 11-20-2018 11:45 AM

    Any method available for creating virtual services (recording, RRpairs, ...) will apply magic stringing during the creation.

     

    After creation you can also add any magic stringing which is missing or remove existing magic stringing if not applicable.

     

    Process is:

    • In arguments pane, click the Magic String checkbox for the argument, take note of the name, e.g. “myExampleArgName”
    • In response pane replace text with {{request_myExampleArgName}}

     

    If you did the above but still have issues post some printscreens of your argument pane and response pane, maybe we can spot the issue.

     

    Cheers,

    Danny



  • 6.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 11-20-2018 01:50 PM

    Thanks Danny !

    Replacing with {{request_myExampleArgName}} works but during creation of service there is no option to select as magic string . I tried adding Request data Manager protocol to get more options but Magic string Option is not there 



  • 7.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 11-20-2018 11:44 PM

    It is like that, you will only find the magic string option when you are editing the virtual service image. It is not going to be in any DPH.



  • 8.  Re: What is the use of magic string in VSI response and how can we tackle it during playback.

    Posted 11-21-2018 10:24 AM

    Thanks Danny . That helps