Running a Script Test
Incorrect scripts can permanently alter or erase data on your system. Always test your scripts before you implement them.
Use the Civic Platform script test utility to run your script in a test situation and to view the effects of the scripts or any errors that it generates.
When you run a script in the script test utility, Civic Platform runs the script and changes your system accordingly. You configure runtime parameters for the script test tool that instructs Civic Platform whether to rollback all changes resulting from the script or commit the changes resulting from the script.
Topics
Using ScriptTester
Civic Platform provides the ScriptTester.js master script file for you to test script controls without triggering an event from the user interface. You can copy and past the content of the ScriptTester.js file into the Script Test tool.
ScriptTester is a file that allows you to copy and paste its contents into Script Test and test script controls without having to trigger an event from the user interface.
To use the Script Test tool
Copy and paste the ScriptTester.js contents into the Script Text area of the Script Test tool.
Edit the myCapId variable to the tested altId.
Edit the myUserId to the tested user.
Update controlString to the standard choice entry point.
Note:The control string can be a standard choice entry point for the event (eg. ApplicationSubmitAfter) to test an events standard choices or a specific standard choice to test specific functionality
The ScriptTester.js master script inherits the native functionality of the Script Test tool to Always Rollback or Commit if Successful. You can use Always Rollback to repeatedly test a script and not commit the results to the database. You can select Commit if Successful after you troubleshoot your script and want to update the database.
Note:
Always Rollback is the default. |