ISO Rules

Transformer module's Rules feature offers a powerful way to dynamically modify responses to meet specific conditions, improving the precision and flexibility of API testing scenarios.

Here, User can see two tabs. First one is Request Rules & the second is Response Rules.

Request Rules : Request rules scripts are used to update the L3 request body based on the L1 request body. Response Rules : Response rules scripts are used to update the L1 response body based on the L3 response body.

let's see how these two rules tabs are used to dynamically modify the responses.

Example : We will use the example of Payment_Processing from previous section to apply rules and validate response.

//  Request Rules
     l3.set('Transaction.CountryCode','356');

//  Response Rules
    l1.set('68','356');

Now test this request in API module and get dynamically modified response.

//Expected Response after Rules apply
<isomsg>
  <header/>
  <field id="0" value="0210"/>
  <field id="2" value="1234567890123456789"/>
  <field id="3" value="000000"/>
  <field id="4" value="000000001000"/>
  <field id="7" value="0612081234"/>
  <field id="11" value="123456"/>
  <field id="12" value="121234"/>
  <field id="13" value="0608"/>
  <field id="37" value="654321"/>
  <field id="39" value="00"/>
  <field id="41" value="12345678"/>
  <field id="49" value="840"/>
  <field id="68" value="356"/>
</isomsg>

To know how data flow of these requests checkout Transformer's Analytics submenu.