Knowledge Base Article

Using the Equation Editor Test Tab

The Equation Editor has a Test Tab to assist in testing an equation without leaving the Equation Editor.  This is a very useful tool and mandatory for equations that are made public.  

The Test Tab lets you add test cases by entering values for your input parameters (`h` and `b` in the example) and an Expected Value. Once you enter these, 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.
EquationTest.png                              Test Cases in the Equation Editor Test Tab 
NOTE: Before an equation can be made "PUBLIC" (see Info Tab), all of the test cases must return positive results.