Hello
Sorry to be rude but a couple of those ways are absolutely wrong. First of all you should never Change the match style!
Next, when working with optional elements you have to differ if this is an optional element that is only nullable or like in soap not in the request. That distinction makes a big difference.
If we are talking about an element that is always present but sometimes only blank, you want to handle those with behavioral scenarios. Example:
- Create 2 specific transactions
- One transaction that will create a response
- Argument: first name
- Comparison Operator: =
- Value: jem
- Second transaction which shall result in an error response
- Argument: first name
- Comparison Operator: regex
- Value: ^$
What you don't want to do is:
2. Mark comparison operator as "anything" for optional fields.
3. remove the optional field from the arguments tab.
Since those suggestions would not result in the behavior you want as you need to match on that specific element.
If it is an element that can be present in the request or not (meaning it is either there or not there at all, like in soap), that would be a bit more complicated. If that is the case let me know and I will write you a solution to that too.