Forum Discussion

endorium's avatar
endorium
Frequent Contributor
7 months ago
Solved

Project property not getting retrieved in header

I have a project with a project property

This gets set in one test and I want to use it in other tests. I create another test and in the header I put the following:

It returns blank everytime though. In the second test if I put a groovy script to retrieve the project property, it does so correctly. So why can the header not seem to find/return the property?

  • Forget name mapping and use small scripts that search your entire app for the object you need, sending as parameters the properties they have, for example (this works for me because i'm testing a webapp, but I think it works for anything):



    function clickObject(propName, propValue,depthOfSearch)

    {

        Sys.Process("yourApp").FindChild(propName,propValue,depthOfSearch).click(0,0);

    }



    Now you can use this for any action your object supports, use object spy to see all the details about the object you're looking for.



    This solves your issue because it always finds your object, unless their properties change, wich they shoudn't.



    Name mapping is only usable if your app will never change, otherwise you need to take a crash course on how to be able to configure it to work with wildcards and stuff....

1 Reply

  • Humashankar's avatar
    Humashankar
    Icon for Champion Level 3 rankChampion Level 3

    Hi endorium 

    When referencing properties in SoapUI, it is essential to use the correct syntax, which does not include backticks.

    Besides, to ensure global accessibility, properties should be defined at the Project level.

    Defining properties at a lower level, such as TestSuite or TestCase, may result in limited accessibility, particularly from headers or other global contexts.

    Best Regards