Understanding the Script Test Tool
Civic Platform provides the Script Test tool to test EMSE scripts. The Script Text tool simulates script execution by running scripts and displaying the resulting output. However, scripts run in the Script Text tool do not change any values in Civic Platform, Citizen Access, or the Civic Platform database.
You can use the Script Test tool to:
Develop and test batch scripts.
Develop and test custom functions.
Troubleshoot and debug EMSE scripts.
To access the Script Test tool
From the Classic Admin portlet, click
.Civic Platform displays the Script Test interface.
Script Test Field Definitions provides information on the fields in the Script Test interface.
Script Transaction | A drop-down list that provides two options:
|
Script Initializer | Contains initialization requirements for testing the script. For example, when testing a batch script, you can set batch script parameter values, like specifying an email address, to set the scope of the batch script to a record type designation. You can also set script initialization values in Script Text. |
Script Text | Contains the contents of the script. In general, you should create scripts in a text editor, then copy and paste them into the Script Test section. |
Script Output | Contains the returned output upon the completion of the script execution. The script only displays text strings it sends to the aa.print method (“This should be sent to the Script Output window”). If your script contains the logMessage or logDebug function, make sure you send the variable that contains the debug or message output to the aa.print method (Using the aa.print Function). |
Note:
Scripts that run longer than the specified EMSE time-out do not exit as gracefully as they do from a batch job or a set script execution. Script errors display in the next encountered error pop-up window as well as the Script Output section. The first couple lines of an error message often indicate an undefined variable or a non-existent function. The error message typically the line in the script where the error occurred. |