TestCafe v1.20.0 Released
Warning: Impending breaking change. TestCafe v1.20 is the final version of the framework to support TypeScript 3. The next update will abandon TypeScript 3 in favor of TypeScript 4.
TestCafe v1.20.0 includes two major capabilities: an API testing toolkit and the ability to set a global test page URL. Additionally, TestCafe 1.20.0 introduces experimental support for Chrome User Flow Replays, as well as a number of under-the-hood improvements.
TestCafe v1.20.0 includes a comprehensive set of server-side API testing tools. You can add dedicated API tests to your test suite or include API testing methods in existing functional tests.
The new request test action executes an HTTP request and returns the server’s response.
const responseBody = await t.request(`http://localhost:3000/helloworld`).body; t.expect(responseBody).contains('Hello World') // true
Read the API Testing Guide for a full overview of the framework’s API testing capabilities.
You can now define a single starting URL for all the tests in your test suite.
baseUrl in one of the following three ways:
Once you define a
baseUrl, you can omit fixture and test URLs entirely, or define them relative to your
fixture`Test structure` .page`./example`; // starts at https://devexpress.github.io/testcafe/example
TestCafe v1.20.0 introduces experimental, limited support for Google Chrome user flow recordings.
Record page actions in Google Chrome and export the recording as a JSON file. Pass the path to the test file as an argument:
testcafe all recording.json
TestCafe will play the recording back and generate a test report.
Read the User Flow Recordings guide to learn more.
The next version of TestCafe will adopt TypeScript 4 and lose compatibility with TypeScript 3.X.
To indicate the breaking change, we will increment the framework’s major version number - from 1 to 2.
TestCafe 2.0 will be released later this month.
Better Google Chrome video capture
TestCafe v1.20.0 uses the Screen Capture API to record videos of Google Chrome test runs. This results in a significantly better test recording framerate and image quality.
- When the
t.typeTextaction raises an error, TestCafe mistakenly awaits the target element for the second time (#6623).
- Concurrent test runs do not always generate concurrent test run reports (#7062).
- TestCafe doesn’t properly handle errors raised inside the
- The default terminal viewport width is too low for non-tty terminals (Issue #5919, PR #6930 by PayBas).
- TestCafe cannot switch to an invisible iframe (#4558).
- Some SVGs don’t meet the visibility criteria (#6998).
- The framework includes an incomplete TypeScript definition (PR #7069 by karolnowinsky).