nespapu
nespapu

Reputation: 812

How to set dynamic properties whose values are statements

I have defined two dynamic properties at test suite level: "EffectiveDate" and "ExpirationDate" which are used in the request to be tested.

enter image description here

Then I am trying to test them with a Groovy script to check which values are generated but the values obtained is the expression unresolved not the dates.

enter image description here

What I am missing here? Can I set this type of statements as value for properties?

I have tried successfully to execute this expressions in a groovy script directly and the statements are working fine.

enter image description here

Soap UI version: 5.5.0

Thanks.

Upvotes: 0

Views: 314

Answers (1)

Steen
Steen

Reputation: 873

The way you are retrieving it now, you get the pure string value. If you want SoapUI to execute the code, and then return the result of that, you may use context.expand

log.info context.expand( '${#TestSuite#EffectiveDate}' )

Upvotes: 2

Related Questions