Changelog
TestCafe v3.6.0 Released
The TestCafe v3.6.0 update includes two minor changes and a number of bug fixes.
Changelog
v3.5.0 (2023-12-26)
TestCafe v3.5.0 includes multiple enhancements and bug fixes. Pass Selector queries to the Visual Selector Debugger, explore new ways to specify screenshot path patterns, and use a new experimental flag to run multi-window tests with native automation!
meta-readmore
When you pass a Selector query to the t.debug() method, TestCafe uses the query to populate the input field of the Visual Selector Debugger. The debugger highlights page elements that match the query.
t.debug(Selector('#header'));
[!Video https://www.screencast.com/users/testcafe/folders/Default/media/4274d757-f7a4-4982-add4-43bb0ba35cff/embed]
The pathPatternOnFails
screenshot option allows TestCafe users to define a separate set of naming rules for screenshots taken on test failure. You can store these screenshots in a different folder, or add a common, recognizable element to their filenames. You can use this option on its own, or in conjunction with the pathPattern
property.
{
"screenshots": {
"pathPatternOnFails": "${DATE}_${TIME}/failedTests/test-${TEST_INDEX}/${USERAGENT}/${FILE_INDEX}.png"
}
}
Use the pathPattern
option of the t.takeScreenshot action to specify a custom naming pattern for an individual screenshot:
t.takeScreenshot({
pathPattern: "${DATE}_${TIME}/checkout-screenshot.png",
fullPage: true
})
TestCafe v2.5.0 was the first version of TestCafe to include native automation --- the capability to automate Chromium-based browsers with the native Chrome Debugging Protocol. This approach offers greater test stability and speed, but has a fair share of limitations. One of them is its incompatibility with multi-window tests.
TestCafe v3.5.0 offers an experimental solution for this issue --- the --experimental-multiple-windows CLI flag. If you enable this flag, you can run multi-window tests with the native automation engine.
The --experimental-multiple-windows
mode does not support tests that include the following:
Please do not use the --experimental-multiple-windows
flag in production or for business-critical tasks.
fixture.before
hook (#6999).Fixture.disableConcurrency
method does not disable concurrent test execution (8087).required
attribute (#8079).Changelog
v3.4.0 (2023-11-09)
TestCafe v3.4.0 introduces relative Role URLs, the ability to disable concurrency on a per-fixture basis, as well as other improvements and bug fixes.
meta-readmore
Earlier versions of TestCafe did not support relative URLs for Role log-in pages. In TestCafe v3.4.0 and higher, if you set the baseUrl configuration file parameter or the --base-url CLI option, you can set a relative URL for a Role log-in page:
import { Role } from 'testcafe';
const userOne = Role('./login', async t => {
/* log-in actions go here */
});
Concurrent test execution is not suitable for tests that can only run in a certain order. To ignore the global concurrency setting for a particular fixture, use the disableConcurrency fixture method.
fixture`Fixture.disableConcurrency`
.page`https://devexpress.github.io/testcafe/example/`
.disableConcurrency;
When you debug code inside a browser, the browser can appear unresponsive. Earlier versions of TestCafe automatically relaunched unresponsive browsers, including browsers that were used for debugging.
TestCafe v3.4.0 does not relaunch unresponsive browsers if you enter development mode.
The debug panel includes a new "Hide Picker" button. Click this button to disable the Selector Debugger and hide the Selector input field.
srcset
attribute declarations (testcafe-hammerhead#2958).ngx-formly
form (#7758).Changelog
v3.3.0 (2023-08-29)
TestCafe v3.3.0 includes important bug fixes and quality of life improvements.
--disable-multiple-windows
option when you interact with a link that points to "target=_blank", or open a new window with the window.open
method (#7916).userProfile
option (#7925).