Context Objects¶
Context Objects can be used in test cases' steps. For example, the code for setting a Call Forward Unconditional could be defined as the string setCFU
. This can be used in place of the 21
code.
Syntax
1 2 3 4 | ContextObjects { <objectName Identifier> = <objectProperty String> ... } |
Parameters
-
objectName - The Context Object's name
-
objectProperty - The Context's Object's value
Example
1 2 3 4 5 6 | ContextObjects { setCFU = "**21*" removeCFU = "*##21#" nationalFormat = "CC.NDC.NUMBER" tariffUnderTest = "YourChosenTariff" } |
Lists and maps can be added to Context Objects. For an overview of maps see Common Statement Language.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ContextObjects { color = "green" soap { carAmount = 50 } keys { enter = "\uE007" } ussdAccEnq = "*101#" } ContextObjects { color = "green" soap { carAmount = 50 } } ContextObjects { keys { enter = "\uE007" } } ContextObjects { ussdAccEnq = "*101#" } |
Example
1 2 3 4 | ContextObjects { testList = ["a", { b = [3, 8] }] testMap = {abc = [1, 3, true, "bunny"]} } |