I have a requirement where we need to create the virtual services using rr pairs and these need to be compatible during merging with the virtual services created using recording.The challenge I have is ,the rrpairs usually contain fixed length ASCII strings which are mainframe transactions and when creating the virtual service, I use copybooks to slice and dice the msg and usually keep the msg length as the operation name which is unique for each transaction.
However, when creating the vs using recording , I get the transaction name in the meta which I can set as an operation name. This makes the vs created using rrpairs not compatible for merging with the vs created using recording.
What I'm thinking is , if there is a possibility to read the rrpair file name which creating the virtual service, I can keep the transaction Name as the file name for the rrpairs and can keep that as an operation name while creating the virtual service which makes the Virtual service compatible for merging with Virtual service created using recording.
Having said, could you please suggest if there is any way I can get the file name while creating the virtual service using rrpairs? or if there is any other way, please do suggest .
Thanks in advance!!
I would say that using a message length as the operation name is not a best practice.
How are you setting the operation in the original service? Are you unable to use that same pattern?
I suppose you could add a Scriptable DPH during RR Pair recording. The DPH takes the length of the lisa_vse_request body and sets it in the lisa_vse_request operation.
int len = lisa_vse_request.getBodyAsString().length();
lisa_vse_request.setOperation( Integer.toString( len ) );
Would this create the operation match you want?
Have a look at the section "Sidecar Files" in the documentation Request/Response Pairs - DevTest Solutions - 10.3 - CA Technologies Documentation
You maintain a third file with each request response file and in that third file you add the meta properties you expect for your request. In your case the transaction name. Using a sidecar file you can (if needed) get a request object from a req-rsp pair that is completely similar to a request object obtained from a recording. That means that you can use exactly the same sequence of DPHs, configured in exactly the same way, and your 2 VSIs will merge without problems (I hope :-) ).
Thanks a lot Danny. This is exactly what I'm looking for.
Let me try that option.