TestCafe excels where other end-to-end testing solutions fall short.
- The benefits of TestCafe
- An architecture like no other
- Try it yourself
No 3rd-Party Dependencies
TestCafe does not depend on Selenium or other testing software. TestCafe runs on the popular Node.js platform, and makes use of the browsers that you already have. For many users, the installation process consists of a single step:
npm install -g testcafe
A first-class citizen in the Node.js ecosystem
The advanced features of TestCafe help you test complex, security-sensitive web applications.
Emulate HTTP responses to feed sample data to your app, troubleshoot connectivity errors, and cheat downtime.
Execute custom client-side code to parse the web page, examine its state, or even add extra dependencies.
Frames and windows
Make use of multiple browser windows to test out complex user interactions. Switch to and from iframes with ease and stability.
Run your tests in multiple browsers at once to quickly uncover browser-specific errors.
TestCafe 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.
Made with automation in mind
Manual timeouts are a thing of the past. Asynchronous from the ground up, TestCafe knows when to wait and what to wait for before a test can continue.
Automated authentication scripts
Save and activate user roles to easily switch between different user accounts.
Keep your code clean with hooks — routines that are repeated before and after each test.
Superior User Experience
The GUI and the test recorder built into TestCafe Studio make our product accessible to people with zero programming experience.
Enable Live Mode to restart your test every time you make changes to the test file.
Enter debug mode to examine your app, troubleshoot Selector queries, and fix failing tests.
Free and Open Source
TestCafe is distributed for free under the MIT license.
The TestCafe team is quick to respond to GitHub issues and StackOverflow questions. Community suggestions shape the future of the product.
All TestCafe Studio Pro customers (subscribers and trial users alike) receive prompt, proactive support directly from the package maintainers.
TestCafe uses the native CDP protocol to automate local Chromium-based browsers. Native automation allows TestCafe to faithfully recreate user interactions with low-level, high-speed browser access.
A custom-made reverse proxy allows TestCafe to automate other browsers, including cloud browsers and browsers on remote devices.
TestCafe’s hybrid client-server architecture lets it execute both system-level and in-browser code.
- TestCafe uses high-level system APIs to launch and manage browsers. This is necessary to control the test execution process.
- TestCafe tests are Node.js scripts. They can launch services and applications, read and write system files, make use of your favorite libraries.
Early versions of TestCafe ran entirely in the browser. A hybrid architecture allowed us to improve test stability and extend the framework’s testing capabilities.
If you disable native automation, TestCafe automates browsers with the testcafe-hammerhead proxy. The proxy allows you to run tests in browsers that aren’t based on Chromium, remote browsers, and cloud browsers.
The testcafe-hammerhead proxy intercepts browser requests and injects automation scripts into the requested pages. When the proxy receives data, it changes all the URLs on the resource so that they point to the proxy. This means that neither the client-side code nor other resources in use can tell that the page has been modified. To conceal automation scripts from the rest of the page code, TestCafe also intercepts some of the requests to the browser API.
The proxying mechanism ensures that the page appears to be hosted at the original URL even to the test code.
At the end of each run, TestCafe deletes all browser cookies, empties the storage, and reloads the page, thereby preventing undesirable interference with later tests. You don’t need to write boilerplate code to reset the app state and reverse the changes your tests make.
Tests that run in parallel operate in independent sandboxed environments. This helps prevent server-side collisions.
Some testing scenarios require the execution of custom client-side code. There are three ways to do it with TestCafe:
The TestCafe documentation describes the limitations of user-defined client-side scripts.
Try TestCafe for yourself and see how the features it packs can make your life easier. Create your first test in under 5 minutes by following our Getting Started Guide.