IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Synthetics command reference
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Synthetics command reference
editelastic-synthetics
edit
[beta]
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
Heartbeat uses the npx @elastic/synthetics command to run and report synthetic tests.
It can also be used locally to help develop your tests.
SYNOPSIS
npx @elastic/synthetics [options] [files] [dir]
FLAGS
You will not need to use most command line flags — they have been implemented purely to interact with Heartbeat. However, there are some you may find useful. They are documented below.
-
--debug - Prints debug info.
-
--environment - Sets the environment. For example, dev, staging, prod, etc..
-
--journey-name <name> - Filters by journey name.
-
--reporter -
One of
junit,default, orjson. Use the JUnit reporter to provide easily parsed output to CI servers like Jenkins. -
--no-headless - Runs with the browser in headful mode.
-
--inline -
Instead of reading from a file,
catinline scripted journeys and pipe them throughstdin. For example,cat path/to/file.js | npx @elastic/synthetics --inline -
--screenshots - Captures screenshots for every step in the journey.
-
--network - Captures network requests for every step in the journey.
-
-h, --help -
Shows help for the
npx @elastic/syntheticscommand.