Test Case In Expression Rule.CDT Input in test Case

Hi All,

I am having a requirement of having a test case in expression rule. The expression rule is used to have a CDT type input and the output is also the same CDT type but only with values which have the specified data.

When I am making test case and giving Expression value in Input of CDT to chck test case. It is howing error in input as (open bracket; coma error).

Can anyone help me out how can I put my cdt value in expression rule input.

Thanks in advance

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    It would be helpful to know what you are trying to do in your expression rule and also more specifics on what you are defining in your test case. Regardless, generally speaking, if I want to validate a CDT type output in a test case, I do the following:

    • Open Test Cases
    • Create New Test Case
    • Setup inputs
    • Setup the assertion
      • Change test will pass when to "Test output matches the asserted output"
      • Set type to "Any Type"
      • In the value, define a type constructor, setting applicable field values (e.g. type!myCDT(field1:value1,field2:value2) such that the resulting CDT will match the output CDT from your rule
Reply
  • 0
    Certified Lead Developer

    It would be helpful to know what you are trying to do in your expression rule and also more specifics on what you are defining in your test case. Regardless, generally speaking, if I want to validate a CDT type output in a test case, I do the following:

    • Open Test Cases
    • Create New Test Case
    • Setup inputs
    • Setup the assertion
      • Change test will pass when to "Test output matches the asserted output"
      • Set type to "Any Type"
      • In the value, define a type constructor, setting applicable field values (e.g. type!myCDT(field1:value1,field2:value2) such that the resulting CDT will match the output CDT from your rule
Children
No Data