Forum Discussion
Can you please give me an example Groovy script for Setting the evironment properties or point me to the location in the soapuiapi.org?
- Lucian7 years agoCommunity HeroHey, I am kinda on the run and I don't have my work laptop with me. I will try to help you with some info though later today or tomorrow.
- Lucian7 years agoCommunity HeroHere is a late response... So I quickly looked at this and it is much harder than I initially thought. The endpoint and the name of the service are not saved as project properties so it is more difficult to change them.
So far I have only managed to change the service name in an environment.
Another solution would be to not change the endpoint itself but to assign to the endpoint a project property. Then you would change that project property depending on the environment. The only drawback of this is that you won't be able to xhange the service name...- stewmoon7 years agoOccasional Contributor
Lucian
Thank you for responding to the question. I must admit, I was dissapointed initially thinking I would never get a response. You are correct with the thought that the endpoints and the name of the services are not saved as project properties, so I am unable to find a solution to set them.
In case anyone else sees this and wonders what the solution was. My work around for this problem is to within the Endpoint reference multiple soapui project properties, (whose values will be set by a Project.Run Groovy script). That way if a change is required it will only need to be changed in one place (The Groovy Script).
It will look something like this:
Endpoint:
https://${Project#ServiceName}-${Project#branchName}.com
Related Content
Recent Discussions
- 3 hours ago
- 17 days ago