Testing scripts against an existing object
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.
Test your script as follows.
- Click Run.
- When prompted for an incident or email message ID, 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 shows with the results. It is slightly transparent so that underlying content can be visible.
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, as shown in the following example.
log.info("The value of x is {}".format(x))
Log messages are the last set of information that is 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 run concise scripts, “stepping-through” the code is not available.
If you make changes, you can rerun the script using the same incident and object by clicking Run Again. You do not need to save the script to run the script again.