Easy Install

All you need is to have Node.js with npm installed and call a single command.

npm install --save-dev testcafe

No browsers plugins to install, no binary compilation post-install steps.

Complete Test Harness

TestCafe covers all testing phases: starting browsers, running tests and gathering results. You configure test run and start execution either via the API or from a command shell simply by running a single command

testcafe safari,ie tests/

TestCafe aggregates test results from different browsers and outputs them into one comprehensive report.

Write Test Code Using ES2016

You can write TestCafe tests in ES2016 using all latest JavaScript features like 'async/await'.

TestCafe introduces simple, but powerful test API. It offers a couple of dozen methods covering all user actions. Chained syntax produces code that is easy to write and read. Furthermore, you are free to use any assertion library to perform verifications of different kinds.

import { expect } from 'chai';

fixture `My Fixture`
    .page('http://devexpress.github.io/testcafe/example');

test('My Test', async t => {
    await t
        .click('#send-button')
        .handleAlert()
        .typeText('#input', 'Peter Parker')
        .wait(1000);

    expect(await t.eval(() => getSomethingOnTheClient())).to.be.true;
});

TestCafe will compile your test code on-flight and run it immediately. It also ships with built-in support for source maps to leverage debugging experience. Source maps are automatically enabled, so all you need to do is start a debugging session in an IDE that supports them.

Write Regular Client JavaScript to Observe Page State

TestCafe is capable of executing code on the client side thus giving you direct access to DOM elements on the page and empowering you to obtain required data from the client. Simply write JavaScript code within the `ClientFunction` or `Selector` function. These functions are called from a test as regular async functions. So, you can pass parameters to them and return values.

import { Selector } from 'testcafe';

const getElementById = Selector(id => document.querySelector(`#${id}`));

test('My Test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button');

    const articleHeader = await getElementById('article-header');
    const headerText = articleHeader.innerText;
});
Descriptive Reports

TestCafe automatically generates full-detailed reports providing a test run summary and comprehensive information about errors. Fancy call sites, clean stacks and screenshots help you easily detect an error cause.

Choose from five built-in reporters to output test results or create custom reporter plugins to produce your own reports.

Continuous Integration

Take advantage of automatic test execution through integration of TestCafe with popular Continuous Integration platforms. TestCafe's browser provider mechanism makes it simple to set up testing in various browsers: local, remote, Sauce Labs or PhantomJS. You can also create your own browser provider plugin that will suit your platform and needs.

More to Come…

We plan to introduce other outstanding features to make your testing experience even more effective. Moreover, you can help us improve TestCafe by voting for features on our road map or sharing your own ideas and code in our GitHub repository.