TestCafe v2.5.0 Released

TestCafe v2.5.0 introduces three major enhancements:

  • The new t.report method passes custom data to the test reporter.
  • The new --native-automation flag enables TestCafe to automate all Chromium-based browsers with the native CDP protocol.
  • The new --esm flag allows users to import ESM modules in test files.

t.report

Include the t.report() method in your test to pass custom data to the reporter.

Specify arguments of any type (string, array, Object, etc). Separate arguments with a comma:

await
    t.report( 
        'text', 
        {'key': 'value'},
        ['arrayItem1', 'arrayItem2']
    );

The default spec reporter displays custom data after test completion, once for each browser that runs the test.

Report with custom data

CDP Automation: Now Stable

TestCafe v2.2.0 introduced an experimental proxyless mode that automated Google Chrome with the native CDP protocol.

For the v2.5.0 release, the TestCafe team addressed most issues that our users discovered when the capability was “experimental”, and gave it a new name — Native Automation mode.

Unlike its predecessor, the Native Automation mode supports all Chromium-based browsers, including Microsoft Edge. Enable the nativeAutomation option in the command line interface, the configuration file, or the runner.run() function to try this capability.

Important

TestCafe v2.5.0 removed the experimentalProxyless option from the createTestCafe function. Use the runner.run() function to enable Native Automation mode from the TestCafe Test Runner API.

ESM Module Support: Now Stable

TestCafe v2.5.0 drops the experimental prefix from the --esm CLI flag. Enable the --esm flag to import modules that do not support CommonJS.

testcafe chrome test.js --esm