Switch
The switch tag does what you would expect of a switch tag and that is give you the possibility to do a determined action based on the value of a single property without having to write multiple nested if/else conditions. So it will make the end result of having multiple possible conditions a lot easier to read as well as easier to maintain by the testwriter.
Children Tags
case . default
Optional Attributes
property
property to test the next case for equality. If none of the following case tags match then the default tag will be executed(if it is present).
Usage Examples
Example #1
<switch property="${test}">
   
<case value="1">
      
<log>Switch case #1</log>
   
</case>
   
<case value="2">
      
<log>Switch case #2</log>
   
</case>
   
<default>
      
<log>Default case called</log>
   
</default>
</switch>