Uriel Coria
Uriel Coria

Reputation: 92

Validation rules/Expected inner text in Load Test Project VS 2012

Is there an option like "contains" or "like" in sql for validating just a fragment of text. I need to validate just a part of the code that's static, the rest is dynamic.

image 1

Upvotes: 0

Views: 502

Answers (1)

AdrianHHH
AdrianHHH

Reputation: 14047

You could use an extraction rule of type "Extract regular expression" instead of a validation rule, just ensure that the Required property is set to true. Whilst an extraction rule must name a context parameter for saving the text found, there is no need to use that context parameter elsewhere.

Validation rules and extraction rules are very similar in what they do, it is just that extraction rules save the text that is found and, optionally via the Required property, fail or not-fail the test if the text is not-found or found respectively.

Upvotes: 1

Related Questions