BML Unit Tests (BMLT)

Overview

To support modular testing and development, CPQ Developer Toolkit introduces BML Unit Tests (BMLT) for Util and Commerce Libraries. Unit tests are similar to test scripts in the debugger and are written to ensure that BML code functions as intended.

Administration

BMLT functions return a Boolean result:

ClosedUnit Test Directories

ClosedBMLT Files

ClosedRun BML Unit Tests

ClosedBMLT Functions

Notes

  • If a test fails, it will not run any further operations, such as save and deploy.
  • If the result of a BML unit test is a null value, the BMLT will return a "false" value even though the unit test passed.

  • Unit Tests cannot be deleted from the server. Administrators can deprecate the unit test by deleting contents of the file.
  • The structure of a test function versus a standard util function is similar, with a few key exceptions:
    • All test functions have a return type of Boolean.
    • Test functions do not have parameters and do not allow importing attributes.
  • Limit the number of developers that can perform pull, save, or deploy commands directly to CPQ.
  • Use your source control system to manage a master version of the site contents.
  • Push specs should only include BML Library functions that the developer is currently working on.
  • At a given time, only one developer should be working on a specific BML function or test.

Related Topics

Related Topics Link IconSee Also