Forum Discussion
If you want project specific properties, still soapui allows to do so using setup script of Project where you can write logic to load the properties from a file with dynamic path using system property (like soapui does, say -DmyProject.properties=<filepath> at run time) and then read the file to load properties and set the properties at project level.
Hope this helps.
Thanks! I haven't implemented that, yet, but the idea to pass just a single property as file-namne and the use a script to load the corresponding proeprty-file using a script should get me going.
- nmrao10 years agoChampion Level 3
Not sure if you got what it was already mentioned in the previous reply.
Keep all your properties in a file called myProject.properties(in this example, assuming that properties are to be set at project level).
Anyway, here is the code(can be used in load script for the project, so that automatically loads properties) that can do the same provided myProject.property is passed as system argument(-DmyProject.properties=<property file path>) while invoking soapui or testrunner.
def props = new Properties() new File(System.getProperty("myProject.properties")).withInputStream { stream -> props.load(stream) } props.each { project.setPropertyValue(it.key,it.value) }
- rajnegi8 years agoNew Member
Where to write this script. I want whenever my soapui project run, first it should load properties from external file.
Related Content
- 12 years ago
- 6 years ago
- 6 years ago
- 7 years ago
Recent Discussions
- 15 years ago