Service Virtualization

 View Only

How do I properly use Match Scripts

  • 1.  How do I properly use Match Scripts

    Posted Sep 01, 2014 10:54 PM

    Hi All


    I have been playing around with match scripts trying to accomplish the following:

    Alter matching to allow some requests to always hit the Live system instead of the playback VS.


    I have added something super simple just to get a feel for it but the results are not what I expect.

    Below is the script that I've added to one of my calls:

    VSE.debug(testExec, "GRAEME DEBUG: ", "16 Match Script - 1");


    if (!incomingRequest.getOperation.equals("getMbrInsurance")) {

      VSE.debug(testExec, "GRAEME DEBUG: ", "16 Match Script - 2");


    else {

      VSE.debug(testExec, "GRAEME DEBUG: ", "16 Match Script - 2.1");



    VSE.debug(testExec, "GRAEME DEBUG: ", "16 Match Script - 3");


    All I see is:

    GRAEME DEBUG: ", "16 Match Script - 1"



    I've also added the following to my Meta call:

    import com.itko.lisa.VSE;, "JIM DEBUG: ", "META Match Script - 1");, "JIM DEBUG: ", "META Match Script - 1.1");



    if (!incomingRequest.getOperation.equals("SampleRequest")) {, "JIM DEBUG: ", "META Match Script - 2");

      return defaultMatcher.matches();



 , "JIM DEBUG: ", "META Match Script - 3");


    All I see is:

    JIM DEBUG: ", "META Match Script - 1

    JIM DEBUG: ", "META Match Script - 1.1



    Lastly, I've noticed that the logs are just getting bogged down with repeat lines the more I make a change, redeploy and run my test.

    I.E. One the first run, all logs (including my debug statement) only appear once. On the next run (after redeploy), all entries have duplicates. Subsequant runs have that many repeats of itself.


    Does anybody have any thoughts, experiences or guidance using Match Scripts?





    P.S. I have already played around with every combination of Match Style for Operation, Signature and Exact.