Unable to match transactions where a part of REST URI is variable

Document ID : KB000045694
Last Modified Date : 14/02/2018
Show Technical Document Details


- Unable to make the operation field dynamic. 

For example, Operation field 'POST /abcd/client_data/webapp/rest/xyz/pqr/UUID’ url has dynamic value UUID. The UUID is supplied by another application during run time which could be c04c94b1-5e2e-300a-9f75-e2a228e80429 or c04c94b1-5e2e-300a-9f75-e3a339e91530

Unable to supply UUID part of the URI dynamically. When tried to supply this value as a LISA property i.e. {}, the playback failed with the error below:

DEBUG - Operation match failure source: 'POST /abcd/client_data/webapp/rest/xyz/pqr/{URLPARAM0}', incoming: 'POST /abcd/client_data/webapp/rest/xyz/pqr/c04c94b1-5e2e-300a-9f75-e2a228e80429'


- DevTest 9.1


- A param for the dynamic value was added and provided a value for it in the arguments tab of the request on VSI. However, the URI Rules were not defined in the VSM's listen step. Hence, the response was not found. 


- Use, REST Data Protocol handler with your Virtual Service.

- From Lisa 7.5.x and above we have a REST Data Protocol handler which when used will take care of dynamic variables in URIs automatically. It identifies the variable parts of the REST URI and converts them into PARAMS in the arguments. It also auto generates the URI Rules.  

Additional Information:


- https://docops.ca.com/devtest-solutions/9-1/en/using/using-ca-service-virtualization/using-the-devtest-portal-with-ca-service-virtualization/rest-data-protocol-handler