It is recommended to run Synthetics tests using the official Heartbeat docker image which contains all the required dependencies and also the chomium browser which is required for running tests.
- Have Node.js installed on the system which comes along with Node Package Manager(NPM).
For running Synthetics outside of docker environment, we need the follow the below steps.
-
Install playwright chromium NPM library which will install the necessary playwright dependency and also download the
chromium
browser required for running the synthetics tests.npm install -g playwright-chromium
-
Install @elastic/synthetics NPM library globally which heartbeat requires for running all
inline
journeysnpm install -g @elastic/synthetics
-
Download and install Heartbeat based on the platform and run heartbeat with configured monitors via
heartbeat.yml
. To run synthetic monitors outside of the docker environment, we would need to set the environment variableELASTIC_SYNTHETICS_CAPABLE
totrue
.env ELASTIC_SYNTHETICS_CAPABLE=true ./heartbeat -e