Skip to content

Releases: elastic/synthetics

v1.5.0

12 Oct 00:22
f75c470
Compare
Choose a tag to compare

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 Assertions toHaveScreenshot and toMatchSnapshot #812
    import { 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 traceStep: '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 latest Chromium 117.0.5938.62

Bug Fixes

  • Dry run mode now logs the tests when using the default reporter #827
  • Headless Option from config file is now passed correctly #838
  • Throw better error message if Kibana version parsing fails when pushing project monitors #821

v1.4.0

22 Aug 18:51
Compare
Choose a tag to compare

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 and Auth flags has been made optional for locations 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

06 Jul 21:27
Compare
Choose a tag to compare

Potential Breaking Changes ❗

  • Tags and Match CLI flags have been removed when using the npx @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.

  1. Creating multiple synthetics projects or managing them under different folders where each project-a/synthetics.config.ts and project-b/synthetics.config.ts would have their own Kibana settings.
  2. 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 the monitor.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

15 Jun 17:41
Compare
Choose a tag to compare

Features

  • Playwright version has been updated to 1.35.0 which updates the Chromium browser to 115.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

18 May 22:39
Compare
Choose a tag to compare

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

Full Changelog: v1.0.0...v1.1.0

v1.0.0

10 May 00:19
Compare
Choose a tag to compare

Features

  • Lightweight monitors filtering will be applied based on the provdied --pattern, --tags, --match flags same as their browser journey counterparts #761
  • Synthetics codegen is updated with the latest playwright API enhancements from the recorder #757

Full Changelog: v1.0.0-beta.46...v1.0.0

v1.0.0-beta.46

05 May 22:51
Compare
Choose a tag to compare

Breaking Changes

  • Network throttling via Chrome devtools emulation is deprecated and no longer gets applied to all any synthetic tests, If users have explicitly configured throttling in their tests, the settings will not be applied and might see the page loads quicker than before.
    Throttling will be re-enabled at later point, See the throttling docs for more details.

Full Changelog: v1.0.0-beta.45...v1.0.0-beta.46

v1.0.0-beta.45

25 Apr 18:43
Compare
Choose a tag to compare

Features

  • Synthetics now waits for 50 seconds by default for all navigations and actions - Previously it was set to 30 seconds. This can be over-riden for all the tests by passing navigationTimeout and actionTimeout via PlaywrightOptions configuration #742
playwrightOptions: {
  navigationTimeout: 60000, // 60 seconds
  actionTimeout: 10000 // 10 seconds
}

Existing synthetics journeys that have a explicit timeout on the locator and other playwright API's will not be affected.

await page.goto("url", { timeout: 1000}) // not affected
await page.locator(".test", {timeout: 1000}) // not affected
  • Capture network information for all requests when at least the first byte data is received. This helps in scenarios where the response was streamed and the test itself was timed out waiting for the load or other events #747

Bug Fixes

  • Use headless value from playwrightOptions when creating the browser context #741

Full Changelog: v1.0.0-beta.44...v1.0.0-beta.45

v1.0.0-beta.44

19 Apr 05:56
Compare
Choose a tag to compare

Features

  • Consolidate monitor schedule for both Lighweight and Browser monitor when using push command #724

Bug Fixes

  • Round off to the nearest schedule for lighweight monitors when running push command #732
  • Capture trace metrics including web-vitals for failed steps #739

Note: Playwright version is upgraded to v1.32.3

Full Changelog: v1.0.0-beta.43...v1.0.0-beta.44

v1.0.0-beta.43

27 Mar 17:00
Compare
Choose a tag to compare

Bug Fixes

  • Avoid hanging on capturing network data #719
  • Drop network events once test runs to completion #720

Full Changelog: v1.0.0-beta.42...v1.0.0-beta.43