Debugging with the Extension Script Tester

The Extension Script Tester page in Maintenance > System Administration > Scriptable Customizations > Extension Script Tester allows you to test the basic logic of a custom script.

This page does not have the full context of application data (such as employees) to run a fully functional script as the Maintenance > System Administration > Extension Script page does. You only have access to the Groovy language and the Java language. Please keep this in mind when testing your code.

These are some of the common uses of this page:

  • How to turn a long value into a string.
  • Test the logic of a for loop and determine if you are getting the value you expect before put the for loop in your main script.

Once you successfully test your code in the Extension Script Tester, you can move the code to your main custom script.

To test your custom code in the Extension Script Tester:

  1. Select the script type from the Script Type box.
  2. Paste or write your custom code in the Script field.
  3. Click Run.
  4. The output of your script along with any errors is displayed in the Output area.

If you cannot debug your script on this page, you can also take advantage of the debugprint() statements that can be inserted permanently in your custom script and only enabled when you choose to debug the code. For more information, see Debugging with the debugprint() statement.