Releases: elastic/synthetics
v1.7.0
1.7.0 (2024-01-31)
Features
- Added support for
.only
and.skip
in Journey and Step functions which would allow only the particular journey and step to run and get skipped when running them locally #880
journey.only('test journey', ({}) => {
step.skip('step 1', async () => {
console.log('step 1');
});
step.only('step 2', async () => {
console.log('step 2');
});
});
- Additional, there is a way to do soft assertion on the Step level by marking the step with
.soft
. Failure of soft step will not skip rest of the steps in the journey.
journey('test journey', ({}) => {
step.soft('step 1', async () => {
// errored step
expect('').toEqual('hello');
});
// step 2 will still run
step('step 2', async () => {
// errored step
expect('').toEqual('hello');
});
});
- Double monitor bundle size to 1500Kb when using
npx @elastic/synthetics push
command which is then used for bundling all project monitors, previously this was set to800Kb
#882 - Enable minification of whitespaces when bundling the project monitors. This provided huge savings compared to enabling other options and also simpler when reconstructing the source #886
v1.6.0
Features
- Add buildkite CLI reporter to pretty print the logs for buildkite pipelines #872. We can use the new reporter via the runner
npx @elastic/synthetics journeys --reporter=buildkite-cli
- Update playwright version to 1.40.1 and update formatter to support the new actions #871
- Add Kibana internal origin header to support serverless projects #873
Full Changelog: v1.5.3...v1.6.0
v1.5.3
1.5.3 (2023-11-10)
Bug Fixes
- Fix playwright package version mismatch with the other playwright dependencies #868
Full Changelog: v1.5.2...v1.5.3
v1.5.2
Bug Fixes
Full Changelog: v1.5.1...v1.5.2
v1.5.1
v1.5.0
Features
- Playwright Test
expect
assertions are supported natively in the Synthetics tests. Users can start using all of the official Playwright assertions except for the unsupported ones Snapshot AssertionstoHaveScreenshot
andtoMatchSnapshot
#812import { journey, step, expect } from '@elastic/synthetics'; journey('testing example.com', ({ page }) => { step('load homepage', async () => { await page.goto('https://example.com/'); await expect(page).toHaveTitle('Example Domain'); }); });
- Better error stack traces for failed tests with highlighted codeframes to the source location. This makes it easier to visualize the origin of the error on CLI and on the Synthetics Kibana UI #826
Journey: testing stack trace
✖ Step: 'load homepage' failed (183 ms)
Error: Asdas
15 | step("load homepage", async () => {
16 | await page.goto("https://example.com/");
> 17 | throw new Timeout("Asdas");
| ^
18 | });
19 | });
20 |
at (/synthetics-project/journeys/errors.journey.ts:17:11)
- Support remote fetching configurations inside the Synthetics config files, Helps for configuring synthetics monitors based of fetching configurations from other systems like Vault/S3 etc.
// synthetics.config.ts export default async env => { const params = await loadParams(); const config: SyntheticsConfig = { params, monitors: {schedule: 10} } return config; };
- Retesting will be enabled by default on the Synthetics monitors when used along with the stack 8.11. Users can disable the retests by manually passing monitor configuration option #845
monitor.use({ retestOnFailure: false });
- Agent now captures all unhandled rejections that happens across the whole browser context, this means if the exceptions occur on a different page than the first page, these errors would be captured and reported back #835
- Browser console log messages will be captured even for successful journeys, this makes the debugging part easier. For successful journeys, the limit is 100 with
console.error
messages being preferred over other types #817 - Playwright version has been upgraded to
1.38.1
, this means the Chrome version used for the tests would be the latestChromium 117.0.5938.62
Bug Fixes
v1.4.0
Features
- Users now import
devices
directly from the@elastic/synthetics
inside their journeys instead of importing from@playwright-core
which might not work as expected when running project monitors #810// synthetics.config.ts import { devices } from "@elastic/synthetics" export default { playwrightOptions: { ...devices['Galaxy S9+'], }, }
- Headless option has been brought back to the CLI flags, Users can now disable headless mode by passing
--no-headless
flag options #813 - Playwright version has been upgraded to 1.37 which includes Chrome version
116.0.5845.82
- #816
Bug Fixes
- Now bundling project monitors also tracks changes in the imported files along with the changes made on
journey
files which will update the monitors correctly #802 Url
andAuth
flags has been made optional forlocations
command, Its only required if users are interested in listing their privateLocations #814- Update typescript typings for Kibana version #818
Full Changelog: v1.3.0...v1.4.0
v1.3.0
Potential Breaking Changes ❗
Tags
andMatch
CLI flags have been removed when using thenpx @elastic/synthetics push
command since we never intended project monitors to have support for filtering when pushed to Synthetics Kibana app.
The main intention of Push command
at any synthetics project was to deploy the current state of the monitors to our globally managed infrastructure. Any time we detect a change, whether its an Create or update/delete, the monitor status will get updated based on those changes. Having the ability to allow filtering during the deploy works against the model and brings in more problems. With that said, there are other ways to manage the synthetics monitors.
- Creating multiple synthetics projects or managing them under different folders where each
project-a/synthetics.config.ts
andproject-b/synthetics.config.ts
would have their own Kibana settings. - Using multiple Kibana spaces for organizing the monitors.
npx @elastic/synthetics push --space <name>
NOTE: Tags and Match for filtering are still supported when running the tests locally as we want the Synthetics runner to have the ability to grep and run any journey/tests.
Features
-
Monitor tags can be configured for all project based lightweight and browser monitors either via the
synthetics.config.ts
file or using themonitor.use
API.{ monitor: { tags: ["global1", "global2"] }, };
For Individual browser monitors we can use
monitor.use(tags: ["local"])
or for lightweight monitors on the yml file.heartbeat.monitors: - type: http tags: - tag1 - tag2
-
Users can enable TLS and Status alerts for Project based lightweight and browser monitors. Alerts can be configured both globally via
synthetics.config.ts
file or on individual monitors #785 #795{ monitor: { alert: { status: { enabled: true, } }, }, };
For lightweight monitors, it can be configured via the yml syntax.
alert.status.enabled: true alert.tls.enabled: false
Full Changelog: v1.2.0...v1.3.0
v1.2.0
Features
- Playwright version has been updated to
1.35.0
which updates the Chromium browser to115.0.5790.13
- Browser console events including
warn and errors
are captured automatically for all iframes, popups etc which was missing previously. Console events in general are reported only reported when the synthetic tests fail #784
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Features
- Parameters defined in the Synthetics config file, CLI flags will be sent as part of the Lightweight monitors for the
kibana version >= 8.8.0
#725
Bug fixes
- Use correct schedule when scaffolding projects using
init
command #771 - Replace reference to the Kibana uptime app with Synthetics app #770
Docs
- Add the status of network throttling documentation #764
Full Changelog: v1.0.0...v1.1.0