Fortinet black logo

User Guide

JavaScript synthetic

24.2.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:554427
Download PDF

JavaScript synthetic

JavaScript synthetic checks allow you to execute JavaScript scripts from our network of monitoring probes.Use JS synthetic checks for complex, multi-step actions that our Browser synthetics checks, which use Selenium, are unable to perform. For example:

  • Branching, looping, or more advanced control flow

  • Inspecting the response content in detail

  • Testing API endpoints

  • Creating sessions or generating tokens via API calls

  • Testing against non-HTTP/s endpoints

JavaScript synthetic checks can be performed using our public monitoring nodes. To perform checks against your private infrastructure, utilize the latest version of the OnSight vCollector.

JavaScript synthetic checks operate in a restricted JavaScript sandbox environment with support for a limited set of JS libraries. For more information, please contact our support team.

This article provides information on how to set up an environment for JavaScript synthetic checks. The article also includes a JavaScript test template, a sample test, and more information and resources to help you create your own JavaScript synthetic checks.

To create a JavaScript synthetic check:

  1. Select JavaScript Synthetic when creating an HTTP or HTTPS metric.

  2. Under the Check Source tab, paste your JavaScript test code.

  3. Optionally, configure the rest of the metric’s settings. See Configure incident alert and thresholds for more information.

  4. Select Save.

JavaScript checks will timeout if an individual step takes more than 30 seconds, or if the whole test exceeds 2 minutes.

JavaScript synthetic

JavaScript synthetic checks allow you to execute JavaScript scripts from our network of monitoring probes.Use JS synthetic checks for complex, multi-step actions that our Browser synthetics checks, which use Selenium, are unable to perform. For example:

  • Branching, looping, or more advanced control flow

  • Inspecting the response content in detail

  • Testing API endpoints

  • Creating sessions or generating tokens via API calls

  • Testing against non-HTTP/s endpoints

JavaScript synthetic checks can be performed using our public monitoring nodes. To perform checks against your private infrastructure, utilize the latest version of the OnSight vCollector.

JavaScript synthetic checks operate in a restricted JavaScript sandbox environment with support for a limited set of JS libraries. For more information, please contact our support team.

This article provides information on how to set up an environment for JavaScript synthetic checks. The article also includes a JavaScript test template, a sample test, and more information and resources to help you create your own JavaScript synthetic checks.

To create a JavaScript synthetic check:

  1. Select JavaScript Synthetic when creating an HTTP or HTTPS metric.

  2. Under the Check Source tab, paste your JavaScript test code.

  3. Optionally, configure the rest of the metric’s settings. See Configure incident alert and thresholds for more information.

  4. Select Save.

JavaScript checks will timeout if an individual step takes more than 30 seconds, or if the whole test exceeds 2 minutes.