Forum Discussion

samuelMDS's avatar
samuelMDS
Occasional Contributor
12 years ago

Use global properties when using tesrunner

In SoapUI I have declared several properties in the global properties section. In the test cases I use these properties when I send requests. This works fine when I run the test suite in soapUI on my own laptop. The value in the global properties are used when sending the requests. I can also run the test suite without problem on my own computer with testrunner by right kicking on the test suite and choosing "Launch TestRunner".

The problem arises when I run the testrunner on another machine on which soapUI is installed and the xml project (that contains the testsuite) file is copied. When I run the tesrunner, the requests containing the reference to the global properties don't get any value and the testcase fails. The global properties seems not to be stored in the project file, so that might be the problem.

My question: How am I supposed to do to get hold of the global properties in my testcases so that the requests contains values from the global properties?

5 Replies

  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi, global properties are stored in the soapui-settings.xml file stored in your home directory
    if possible you can share it.

    You could also put global properties in a properties file and use it when running the test case runner.

    Make a search on the forum (expecially the pro support one), i remember that i've seen some discussion about this subject recently
  • samuelMDS's avatar
    samuelMDS
    Occasional Contributor
    Thanks for your answer! I did not find this type of information in the documentation for soapUI.
    My next question:
    If I don't want to handle two different files (one with the project and one with the settings), what are my options? Is one of the the solutions to put the properties on the test suite level instead? I figured out that the properties are written in the project xml file if the properties are on the test suite level. Would this be a solution to get all information in one single file?
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    yes this can work
    you can also add this properties at project level to make it available to all elements of your project.
    Global properties are interesting when you want to share configuration accross projects
  • samuelMDS's avatar
    samuelMDS
    Occasional Contributor
    OK, so now I have decided to place the properties on the project level. I have changed all the requests to reflect this change. The problem is that the values are not transferred into the requests. I'm not sure if it's the syntax iI use in the test cases or something else that is wrong.
    The syntax I use is: ${#Project Name#Property name}. As I understood this is the way to point out the property. Am I wright?