Forum Discussion

jsreesoap's avatar
jsreesoap
Contributor
11 years ago

[Resolved] How to use properties across the projects?

Hi
I have 2 projects one creates accounts and the other one retrieves the accounts that have been created. I am capturing the account names in properties in my create accounts projects, I would like to use those properties in my Get accounts projects. Is there a way to do that?
Thanks
J
  • Hi,

    Please see the following link for getting and setting properties. You can use some Groovy to do this across projects.


    import com.eviware.soapui.SoapUI
    def projectProperty = SoapUI.getWorkspace().getProjectByName("My project").getPropertyValue("My project property")
    log.info projectProperty


    http://www.soapui.org/Scripting-Propert ... ricks.html


    Regards,
    Marcus
    SmartBear Support
  • Thanks Marcus.
    I tried to get testSuite property by using..
    import com.eviware.soapui.SoapUI
    def projectProperty = SoapUI.getWorkspace().getProjectByName("REST Project 1 End to End").getTestSuiteByname("https://testapi.foliofn.com End to End TestSuite").getPropertyValue("folioName")
    log.info projectProperty
    it threw me error. Not sure what I am doing wrong :-(