A Node.js tool to automate end-to-end web testing. Write tests in JS or TypeScript, run them and view results
It is responsible for all phases: start the browser, run the test, collect test results and generate reports. TestCafe does not require a browser plugin, it is out of the box in all popular modern browsers.
Stable tests and no manual timeouts
TestCafe automatically waits for page loads and XHRs before the test starts and after each action. It also features smart test actions and assertions that wait for page elements to appear. You can change the maximum wait time. If elements load faster, tests skip the timeout and continue.
Rapid test development tool
Changes in test code immediately restart the test, and you see the results instantly.
See how it works in the TestCafe Live repository.
Latest JS and TypeScript support
Detects JS errors in your code
TestCafe reports JS errors that it finds on the webpage. Tests automatically fail because of that. However, you can disable this.
Concurrent tests launch
TestCafe can open multiple instances of the same browser to run parallel tests which decreases test execution time.
const macOSInput = Selector('.column').find('label').withText('MacOS').child('input');
Easy to include in a continuous integration system
You can run TestCafe from a console, and its reports can be viewed in a CI system’s interface (TeamCity, Jenkins, Travis & etc.)
- TestCafe no longer hangs when CLI argument validation failed in live mode (#3402)
- TestCafe no longer fails with the
ERR_STREAM_WRITE_AFTER_ENDerror after restarting tests in live mode (#3322)
- Now TestCafe doesn’t ignore video and encoding options specified in a configuration file (#3415)
- Now you can specify only tests in TestCafe CLI if browsers are specified in a configuration file (#3421)
- Live mode: TestCafe no longer stops test execution in multiple browsers if tests do not contain actions (#3410)
- Now TestCafe correctly handles the
- Now TestCafe allows passing the
headersoption of the
fetchfunction as an Array (testcafe-hammerhead/#1898)
- No error occurs when page scripts pass a number as an argument to the
- Now TestCafe correctly processes rewritten stylesheets (testcafe-hammerhead/#1919)
- TestCafe correctly processes sourcemaps in stylesheets now (testcafe-hammerhead/#1907)