Testing scripts
When you have written a script, you can test your script against an existing object. For example, if the script’s object type is Milestone, you run the script against a milestone within an incident.
When you test a script, you are prompted to enter a valid ID. For the email message object type, you are prompted for an email message ID. You can find the ID on the Mail Inbox page, which you can access by clicking Inbox in the menu. For any other object type, you must enter a valid incident ID. You can find the ID by opening an individual incident or scenario. The ID is in the Summary section of the page.
To test your script:
- Click the Run button.
- When prompted for an incident, enter a valid ID.
- Select an object within the incident. Only those objects of the type assigned to the script are shown.
- Click Finish.
The script runs and a console window displays with the results. It is slightly transparent so that underlying content can be visible.
If you want to view information at specific points in the script, make sure to include in the script the log info method described in the previous table. For example:
log.info("The value of x is {}".format(x))
Log messages are the last set of information reported after each run. You can filter the log messages by changing the Log Level choice in the Console Window header area.
Because the system is designed to execute concise scripts, “stepping-through” the code is not available.
If you make changes and wish to rerun the script using the same incident and object, click Run Again. You do not need to save the script to run the script again.