Question

Hello, I have a lot of big scripts a lot of test criteria. Is there a way to import test criteria for a tester? I know the import function for the AttributeFilter but that doesn't fulfill my needs.

  • 10 December 2021
  • 1 reply
  • 0 views

Hello, I have a lot of big scripts a lot of test criteria. Is there a way to import test criteria for a tester? I know the import function for the AttributeFilter but that doesn't fulfill my needs.

1 reply

Userlevel 5
Badge +29

Something i've done in similar situations is format my test criteria in the format the FMW uses and manually insert it.

In the .fmw (basically a text file) this testerimageLooks like

#!     <XFORM_PARM PARM_NAME="ADVANCED_GROUP" PARM_VALUE=""/>
#!     <XFORM_PARM PARM_NAME="BOOL_OP" PARM_VALUE="COMPOSITE"/>
#!     <XFORM_PARM PARM_NAME="COMPOSITE_MSG" PARM_VALUE=""/>
#!     <XFORM_PARM PARM_NAME="COMPOSITE_TEST" PARM_VALUE="1 AND ( 2 OR 3 )"/>
#!     <XFORM_PARM PARM_NAME="PRESERVE_FEATURE_ORDER" PARM_VALUE="Per Output Port"/>
#!     <XFORM_PARM PARM_NAME="TEST_CLAUSE" PARM_VALUE="TEST a = 2&#10;TEST b &lt;= 63&#10;TEST c NOT_!= 21"/>
#!     <XFORM_PARM PARM_NAME="TEST_CLAUSE_GRP" PARM_VALUE=""/>
#!     <XFORM_PARM PARM_NAME="TEST_MODE" PARM_VALUE="TEST"/>
#!     <XFORM_PARM PARM_NAME="TEST_PREVIEW_GROUP" PARM_VALUE="FME_DISCLOSURE_OPEN"/>
#!     <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/>
#!     <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="Tester"/>

The two main parts your looking for are the "TEST_CLAUSE" and "COMPOSITE_TEST"

TEST_CLAUSE contains your clauses separated by a linefeed (&#10;) - note some of the conditions have html encoding

  1. TEST a = 2
  2. TEST b &lt;= 63
  3. TEST c NOT_!= 21

These test clauses are then assigned a numeric value based on their order. COMPOSITE_TEST then specifies how these are ordered

  • 1 AND ( 2 OR 3 )

 

Substituting the clauses in, you're left with 

(a = 2) AND ((b &lt;= 63) OR (c NOT_!= 21))

Note how the last clause is actually a double negative....

Reply