Forum Discussion
thanks for fast reply Anastasia
in both scripts, the aplication only can get MockService properties value, i need obtain mockResponse's name, 2 levels below on the project tree:
I created in the MockService a custom property called "resultName" for the following script, insert an "hard coded" value and, with your second script, to get the property value and log it.
def resultName = context.mockService.setPropertyValue("resultName","Response1")
It works fine, but I have many mock responses and does this for each is unviable.
thanks again
- ricardo_moura7 years agoOccasional Contributor
i able, but not is the best way, with this method i set/get custom property from MockService, not from MockResponse
i have a lot of MockResponses, do that to everyone costs a lot of time
- groovyguy7 years agoChampion Level 1
You could potentially use a groovy script to automate accessing the ReadyAPI api itself to set these for all of your tests. You'd have to study up on the API documentation though.