Forum Discussion

stewmoon's avatar
stewmoon
Occasional Contributor
7 years ago

Setting Environment Rest Services properties from a Groovy script.

hello,

I was curious if I could SET Rest Service, properties(name,endpoint) in the Environments section in SoapuiPro with a Groovy Script.  I was only able to find information regarding retrieving information in the Environment with a Groovy Script.  (see photo)

  • Lucian's avatar
    Lucian
    Community Hero
    Yes you can. Environment variables are just normal SoapUi properties.
    • stewmoon's avatar
      stewmoon
      Occasional Contributor

      Can you please give me an example Groovy script for Setting the evironment properties or point me to the location in the soapuiapi.org?

      • Lucian's avatar
        Lucian
        Community Hero
        Hey, 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.