Forum Discussion

UserOne's avatar
UserOne
New Contributor
8 months ago
Solved

Dynamic Operation name in Mocking

 Hi Team, 

By default the operation name for mocked response is picked from UI as shown below:

I am trying to generate dynamic response based on the operation name at runtime but not able to get the correct Groovy code for that.

I tried checking this 'log.info mockOperation.name' but it returns the overall mock operation and not the one displayed in UI

Can you please let me know the corresponding Groovy script to achieve this?