Script

A Script assertion allows to write a JavaScript script to check an assertion. The script itself is a function named test which takes an assertion object and an object with variables (in a key-value format) as arguments. If the function returns true, the assertion was successful. If it returns false or raises an exception, the Script assertion failed.

New API

Script assertions support the same API as Script nodes do.

Script

If while running a script an exception of any kind was raised, this Script assertion run is considered to be unsuccessful and successful otherwise.

User Interface

This Assertion interface is similar to the one of a Script node:

The Name field allows to set a description for test of this kind.

Error Fixing

This Assertion doesn't have any error fixing algorithm.

File Representation

The assertion is of the script type in the file. The type description can be found in the Assertion file representation documentation in the #/definitions/CompareAssertion definition.

Last updated

Was this helpful?