creising / soapui-gradle-plugin

MIT License
0 stars 0 forks source link

How can I use projectProperties? #4

Closed daggerok closed 7 years ago

daggerok commented 7 years ago

Hello

please help me override specific project properties configured in soapui-test-project.xml via gradle plugin config. From sources I found that projectProperties is a list, so as I might guess, it consumes sting of key-value props, like: myProp1=value1,myProp2=value1, which inside soapui project will be accessible as ${#Project#myProp1} and ${#Project#myProp2}

so I added one property inside my soapui-test-project.xml: authorizationEndpoint with value http://some.fqdn.host:80 and than configured my build.gradle like so:

    soapui {
        test {
            projectFile = "$soapUiRoot/$project.name/soapui-test-project.xml"
            outputFolder = buildDir
            printReport = true
            junitReport = true
            projectProperties = "authorizationEndpoint=http://localhost:8080"
        }
    }

but on gradle soaptest property was not overrided and requests was sent to http://some.fqdn.host:80 which is not I'm expecting when i'm running it on jenkins

Thanks for any help with it

daggerok commented 7 years ago

Sorry, looked at sources little bit more and found useful debug. Now i see from debug console output that I'm doing wrong:

02:50:06.485 [DEBUG] [org.gradle.api.Task] Runner projectProperties: [a, u, t, h, o, r, i, z, a, t, i, o, n, E, n, d, p, o, i, n, t, =, h, t, t, p, :, /, /, l, o, c, a, l, h, o, s, t, :, 8, 0, 8, 0]

finally, right answer for usage is:

projectProperties = [
  "authorizationEndpoint=http://localhost:8080",
  "otherProp=someValue",
  ...
]