Forum Discussion
nmrao
11 years agoChampion Level 3
Oh there is a catch here. It does not load the properties automatically, load script needs to be written in order to do that. This you can find when you double click the project or you may locate <con:afterLoadScript/> in soapui project, put the following code between <con:afterLoadScript>below script here</con:afterLoadScript>
And here is the script
And here is the script
def propertyFilePath = System.getProperty('soapui.properties')
log.info 'User property file :'+propertyFilePath
def propertiesFile = new File(propertyFilePath)
if (propertiesFile) {
log.info "PropertyFile "+propertyFilePath+ " exists"
def props = new Properties()
props.load(new FileInputStream(propertiesFile))
props.each { key, value ->
project.setPropertyValue(key, value)
log.info 'Key :'+key+' Value : '+value
}
}
else {
log.error 'Unable to find file : '+propertyFilePath
log.error 'Or check if -Dsoapui.properties jvm argument is passed to soapui/testrunner script'
}
Related Content
- 8 years ago
- 10 years ago
Recent Discussions
- 43 minutes ago
- 15 years ago