Question

About the 'Condition' property of Reusable TestStepBlocks

  • 21 July 2023
  • 3 replies
  • 170 views

Userlevel 5
Badge +2
  • Head of Community
  • 47 replies

Like in this picture, we can use the Condition property to control the behavior of some steps or folders in a RTB.

But I am confused about the syntax, for example, why must I use double quotation marks here?

If I use single quotation marks like'xyz' == 'abc', in this case it seems the condition will always be True (Although obviously string 'xyz' does not equal to string 'abc')

Is there any document about this Condition property?

My biggest problem is, take this picture as an example, if I try to pass a Configuration Parameter as {PL[Operation]}, the condition property will not work as I expected, it seems that it only accepts hard-coded strings. Is there a way to translate the value dynamically?

 

Thank you very much.

 

----update---

I've read https://academy.tricentis.com/applying-conditions-on-reusable-teststep-blocks-in-tricentis-tosca

Sadly it does not help to answer the question about the {CP[]} >< 

and also, why do we need to change to 'Action' == "Login" from Action != NULL ?


3 replies

Userlevel 4
Badge +2

 

Try creating a buffer value inside the Reusable library and pass the PL Value.

Userlevel 4
Badge +2

Input from another user:

My understanding on the subject matter are listed.

'xyz' == 'abc'  means NULL == NULL as you dont have parameters named xyz and abc.

'Operation' == 'Add' is not equal to 'Operation' == "Add" it means the parameter value of "Operation" is equal to Add (as parameter name) as the value of parameter "Add" is NULL that why is false, same apply to Operation == 'Add'

but following is different

Operation == "Add" or 'Operation' == "Add" both mean the parameter value of "Operation" is equal to "Add"

Userlevel 4
Badge +2

Another point of view on this:

So far my understanding with condition property (either from RTB or a normal step/step folder) can only work with TCD Test sheet & attributes and link to a TestCase template. We apply the condition syntax in a step from the TestCase template then these step/s are enabled or not in the test case instance base on values from test sheet and conditions set. 

Would love to know as well if there's a way to use that condition property with values coming from a buffer/business/configuration parameter. 

Reply