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
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:
-
Select JavaScript Synthetic when creating an HTTP or HTTPS metric.
-
Under the Check Source tab, paste your JavaScript test code.
-
. See Configure incident alert and thresholds for more information.
-
Select Save.