Pricefx Classic UI is no longer supported. It has been replaced by Pricefx Unity UI.

 

Logic Test Drive

While developing a calculation logic, it is handy to test it using real data. You can do so with Logic Test Drive which is available for various objects from Quoting, Rebates, Agreements & Promotions and Optimization. It works with the currently opened logic and so you can finetune it before saving it.

Logic Test Drive can be accessed from each element but it always runs the whole calculation logic.

To set up Logic Test Drive:

  1. Click the Logic Test Drive 

     icon.

  2. The Logic Test Drive wizard opens.

    • Step 1 – Select the test items. Depending on the module and calculation logics, you can choose items from:

      • Quotes – Products; Live Price Grids; Price Lists

      • Agreements/Promotions – Condition Types

      • Rebate Agreements – Rebate Types; Rebate Records

      • Optimization Models – Models - Definition; Models - Calculation; Models - Calculation - Initial Result; Models - Calculation - Summary; Models - Analysis; Models - Evaluation; Models - Records

      The items to test can be changed using the Change Context button at the top right.
      The test items can also be left blank if this is in accordance with the calculation logic.

    • Step 2 – Get parameters. Here you specify parameters that are used during the run of the logic (such as dates or input parameters).
      If you enable the Allow object modifications option, the test run will be able to modify the database (through an api object). Note that this option does not affect the actionBuilder variable during the test run.

    • Step 3 – Calculate. After you click the Calculate button, the logic is executed and calculation results for each element are displayed. Details for each element are shown in the Element Trace pane (if it is the Groovy type of element, you need to define api.trace for that element).


      In case of a timeout, the name of the logic and the element which caused the problem is displayed in the Calculation Result (Raw) column. This is useful in configurations with many libraries and nested calls – you can quickly find out here or in the log file where the problem is. 



Within the user session, Logic Test Drive remembers the last entered inputs and parameters and so when you run the test, spot some issues and change the logic, you can open Logic Test Drive and go directly to Step 3 Calculate. It will keep the same setting as in the last run and you can test your logic quicker.



Found an issue in documentation? Write to us.