How to verify the Data type in SOAtest

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
To verify whether or not a particular element's value is an integer or string, we can use an XML assertor with a *regular expression* assertion.
but in this option. If we know the length of the element's value, then we can use regular expressions. i.e. if the element contains 2 characters, i can use the regular expression as [0-9][0-9]. but if we are not sure of the length of the value, how can we do it. i.e. the element's value can be 2 or 3 or n character length.

Thanks in advance.
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    edited December 2016
    You can do this quite easily in SOAtest using a compound assertion:

    1. Create a regular assertion set to [0-9][0-9]
    2. Create another regular assertion set to [0-9][0-9][0-9]
    3. Create a compound assertion and pick "OR Assertion"
    4. Double click the OR Assertion editor and add the first two regular expressions you created

    Let me know if you have problems figuring this out.
Sign In or Register to comment.