Freddy
12 years agoOccasional Contributor
[Resolved] Using regular expressions in assertions
Hi guys,
I am new to SoapUI and using the free version. So far things have been going quite well and I made a few (contains and not contains) assertions to validate xml responses and they work fine.
Next step is to add an assertion where I first read a (dynamic) value between 2 xml-tags and then check that value against expected values.
For example, let's take the following tags and value:
<CategoryA> 15 </CategorieA>
How would I create an assertion that first reads the value between <CategorieA> and </CategorieA> and then checks if the value is higher than 10 but lower than 20?
Can this be done with only an assertion and a regular expression? I cannot find anything similar in manuals or on the web.
Any help would be highly appreciated.
Kind regards,
Freddy
I am new to SoapUI and using the free version. So far things have been going quite well and I made a few (contains and not contains) assertions to validate xml responses and they work fine.
Next step is to add an assertion where I first read a (dynamic) value between 2 xml-tags and then check that value against expected values.
For example, let's take the following tags and value:
<CategoryA> 15 </CategorieA>
How would I create an assertion that first reads the value between <CategorieA> and </CategorieA> and then checks if the value is higher than 10 but lower than 20?
Can this be done with only an assertion and a regular expression? I cannot find anything similar in manuals or on the web.
Any help would be highly appreciated.
Kind regards,
Freddy