Error number 4001 in 4: Error while evaluating velocity template htmlheader.vm
Knowledge Base Article

Using the Constant Editor Test Tab

The Constant Editor has a Test Tab to assist in testing a constant without leaving the Editor. This is a very useful tool and mandatory for constants that are made public.  

The Test Tab lets you add test cases by entering an Expected Value for your constant.  Once you enter this, you can click the plus sign circle and the test case is added.  Note: there are two choices for the evaluation criteria: Pass/Fail and Compare Result.  Pass/Fail only requires that inputs create any result without coding errors. This is useful for scenarios without predictable results like those that include changing or random data.  The second evaluation criteria is Compare Result.  This requires that an Expected Value is entered and that a perfect string comparison between the Expected Value and the algorithm's result is achieved for a passing test.  Since it is a perfect string comparison, blank spaces in Expected Value can cause a negative string comparison even when the results look identical.

You can enter as many tests as you wish.  You can execute one test case at a time by clicking on the play button on the line with the test case, or you can execute all of the test cases by clicking on the Run All button at the top.

NOTE: All test cases must return positive results before a constant can be made "PUBLIC".

ConstantTestTab.png Constant Test Tab