Forum Discussion

sdudani's avatar
Occasional Contributor
6 years ago

How to import all custom properties values to SoapUI Pro from command prompt.

I want to import All custom properties at project level during runtime. Is there any way can I import the proprty file for environment and not just one property at a time.



2 Replies

  • aaronpliu's avatar
    Frequent Contributor

    Hi sdudani ,

    you may need take advantage of Groovy to load properties.

    // set file path
    // assume you run script on project level
    def projectPath = project.path + "/<YourFilePath>/"
    def properties = new Properties()
    de props = new File(ProjectPath)
    if (props.isFile()) {
        props.withInputStream {
    // if want to remove space
    for (def key in properties.propertyNames()) {
        properties.put(key, properties.getProperty(key).trim())
    // return