Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20990

how to use properties wthin regular expressions for assertions?

$
0
0

I would like to parameterize a test-case because a date that has to be supplied as part of the reuest has to be within a valid range and thus can not be constant. So I defined it as project property (which hopefully one day will be assigned automatically once I am more familiar with soapUI's scripting...)

 

The response thus needs to be tested not against a constant string but against a regular expression (because I also want to ignore certain parts of the response) part of which should be the content of the same property that is used as argument of the request.

 

How can I have a property be inserted into a regular expression? If I just add the usual ${#Project#date} into the regular expression this obviosly does not work because $, #, etc. have special meanings inside a regexp. If I escape those characters, however, they are considered as literals. So, how can I have the property's value injected BEFORE the strin is used as regexp?

 

Hope I could make myself clear...

 


Viewing all articles
Browse latest Browse all 20990

Trending Articles