Home

Testing Scripts

You can evaluate a script on a test asset before you execute it on production assets. This step is optional; however, it is recommended to test a script to avoid any failure in the production environment.

Testing can be done before or after a script is reviewed and approved.

To know more about reviewing a script, refer to Review.

To execute a selected script on test assets:

1. In the Scripts tab, select a script and then click Quick Actions > Test Script.

The Test Script option is disabled if the script is deprecated or rejected.

Test Script

Note: The assets that were selected while creating the script are not displayed because you can perform the test only on the evaluation assets and not on production assets.

2. Click Select Assets to browse for the evaluation assets.

select assets

3. Select the required asset and click Apply.

Repeat step 2 and 3 if you want to select more assets.

Note: Maximum of 10 assets can be tested at a time. Select tags option is not provided, since one tag may have more than 10 assets linked to it.

4. Use the Bypass Powershell Execution Policy toggle switch to specify if you want to override the PowerShell execution policy on Windows agents. When you switch this option to Yes, both signed and unsigned scripts will be executed on the agent irrespective of the PowerShell execution policy set on the asset.

Note: This option is displayed only if you test a Windows PowerShell script.

5. Click Test Script.

A new job is created and listed under the Jobs tab. For the test scripts, a job is created as: Test-ScriptName-TimestampEpoch (do not include milliseconds).

The manifest is executed every 15 minutes and the status is updated as 'Success' or 'Failure'.

In case of failure, you can edit the script and check for possible issues for failure. To edit a script, refer to Editing Scripts.

Related Topics

Testing Scripts

Reviewing and Approving Scripts

Executing Scripts

Exporting and Importing Scripts