anagai
5 years agoOccasional Contributor
Using property expansion in header param does not work
I have set a custom property 'token' at the project level and would like to use that value in a header param.
I am putting this into a header param value field:
${#projectname#token}
It is not grabbing that custom property value I set at the project level. Doing something wrong?
- Hi anagai,
Search for "soapui property expansion" and pick the first link returned. This explains that youre adding an extra hash # character erroneously.
The syntax required is as follows:
If you use '${#Project#propertyname}' so the value that goes between the two # values is the 'scope' or level of where the property is stored. So 'scope' would be 'Project' or 'TestSuite' or 'TestCase' etc., NOT 'Projectname' nor 'TestSuitename' nor 'TestCasename'.
Whereas if you are specifying the name of project rather than just indicating the scope, you only use a single # character.
E.g. ${Projectname#propertyname}
Cheers,
Rich