Hyper10n

How do I properly use Match Scripts

Discussion created by Hyper10n on Sep 2, 2014
Latest reply on Mar 24, 2015 by Vikram-Ulaganathan

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;

VSE.info(testExec, "JIM DEBUG: ", "META Match Script - 1");

VSE.info(testExec, "JIM DEBUG: ", "META Match Script - 1.1");

 

 

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

  VSE.info(testExec, "JIM DEBUG: ", "META Match Script - 2");

  return defaultMatcher.matches();

}

 

 

VSE.info(testExec, "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?

 

Thanks.

Graeme

 

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

Outcomes