• Stars
    star
    9,821
  • Rank 3,595 (Top 0.08 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 9 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Node.js tool to automate end-to-end web testing.

Try TestCafe Studio IDE

testcafe

Tests Test Dependencies NPM Version

Automate end-to-end web testing with TestCafe, a Node.js-based testing framework.

TestCafe is free and as easy to use as 1-2-3:
1. Write your tests in JS or TypeScript.
2. Execute your tests.
3. View test results.

Homepage   •   Documentation   •   FAQ   •   Support

  • Works on all popular environments: TestCafe runs on Windows, MacOS, and Linux. It supports desktop, mobile, remote and cloud browsers (UI or headless).
  • 1 minute to set up: You do not need WebDriver or any other testing software. Install TestCafe with one command, and you are ready to test: npm install -g testcafe
  • Free and open source: TestCafe is free to use under the MIT license. Plugins provide custom reports, integration with other tools, launching tests from IDE, etc. You can use the plugins made by the GitHub community or create your own.

Install TestCafe and Run a Test

Running a sample test in Safari

Table of contents

Features

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
When you enable live mode, changes to test code immediately restart the test, and you instantly see the results.

Latest JS and TypeScript support
TestCafe supports the most recent JavaScript-related features, including ES2017 (async/await). You can also use TypeScript if you prefer a strongly typed language instead.

Detects JS errors in your code
TestCafe reports JS errors that it locates on a given webpage. Tests automatically fail if TestCafe encounters such errors.
You can, however, disable this option.

Concurrent test launch
TestCafe can open multiple instances of the same browser and run parallel tests (to help decrease test execution time).

PageObject pattern support
The TestCafe's Test API includes a high-level selector library, assertions, etc. You can combine them to implement readable tests with the PageObject pattern.

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 within CI systems (TeamCity, Jenkins, Travis & etc.)

Love TestCafe Open-source Edition? Want to Record Tests without Writing JavaScript or TypeScript Code?

TestCafe Studio: IDE for End-to-End Web Testing

TestCafe is the perfect choice for JavaScript developers and experienced Q&A teams. If you’d like to delegate testing to QA engineers and are looking for a code-free way to record and maintain tests compatible with your existing infrastructure, check out TestCafe Studio - a testing IDE built atop the open-source version of TestCafe.

Review the following article to learn how TestCafe Studio can fit into any workflow: What's Better than TestCafe? TestCafe Studio.

Get Started with TestCafe Studio

Record and Run a Test in TestCafe Studio

Getting Started

Installation

Ensure that you run Node.js version 16 or higher, and run the following command:

npm install -g testcafe

Creating the Test

For this simple example, we will test the following page: https://devexpress.github.io/testcafe/example

Create a .js or .ts file on your computer. Remember that a .js or .ts file must maintain a specific structure: tests must be organized into fixtures. You can paste the following code to see the test in action:

import { Selector } from 'testcafe'; // first import testcafe selectors

fixture `Getting Started`// declare the fixture
    .page `https://devexpress.github.io/testcafe/example`;  // specify the start page


//then create a test and place your code within it
test('My first test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button')

        // Use the assertion to check if actual header text equals expected text
        .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!');
});

Running the Test

Call the following command in a command shell. Specify the target browser and file path.

testcafe chrome test1.js

TestCafe opens the browser and begins test execution.

Important: Make certain the browser tab that runs tests stays active. Do not minimize the browser window. Inactive tabs and minimized browser windows switch to lower resource consumption mode. In low consumption mode, tests may not execute correctly.

Viewing the Results

TestCafe outputs results into a command shell by default. See Reporters for more information. You can also use plugins to customize reports.

Test Report

Read the Getting Started page for additional assistance.

Documentation

Visit the following webpage to review our online help system: Documentation.

Get Help

Join the TestCafe community on Stack Overflow. Ask and answer questions using the TestCafe tag.

Issue Tracker

Use our GitHub issues page to report bugs and suggest enhancements.

Stay in Touch

Follow us on Twitter. We post TestCafe news and updates.

Contributing

Read our Contributing Guide to learn how to contribute to the project.

To create your own plugin for TestCafe, you can use these plugin generators:

If you want your plugin to be listed below, send us a note in a Github issue.

Thanks to all of our contributors – We appreciate your commitment to the TestCafe community.

aha-oretama ai aleks-pro Aleksey28 AlexanderMoiseev AlexanderMoskovkin
aha-oretama ai aleks-pro Aleksey28 AlexanderMoiseev AlexanderMoskovkin
alexey-lin AlexKamaev alexphilin AlexSkorkin alexwybraniec AnastasiaIvanova8
alexey-lin AlexKamaev alexphilin AlexSkorkin alexwybraniec AnastasiaIvanova8
andrewbranch AndreyBelym AndyWendt AnnaKondratova anthophobiac Artem-Babich
andrewbranch AndreyBelym AndyWendt AnnaKondratova anthophobiac Artem-Babich
Arthy000 augustomezencio-hotmart bdwain benmonro beyondcompute bill-looby-i
Arthy000 augustomezencio-hotmart bdwain benmonro beyondcompute bill-looby-i
bsmithb2 caseyWebb cdrini cgfarmer4 Chris-Greaves churkin
bsmithb2 caseyWebb cdrini cgfarmer4 Chris-Greaves churkin
dej611 DIRECTcut Dmitry-Ostashev eignatyev ericyd Farfurix
dej611 DIRECTcut Dmitry-Ostashev eignatyev ericyd Farfurix
flora8984461 GeoffreyBooth helen-dikareva honsq90 infctr inikulin
flora8984461 GeoffreyBooth helen-dikareva honsq90 infctr inikulin
Ivan-Katovich jamesgeorge007 jaypea josephmalam kanhaiya15 karolnowinski
Ivan-Katovich jamesgeorge007 jaypea josephmalam kanhaiya15 karolnowinski
kirovboris kisrefod LavrovArtem link89 lzxb macdonaldr93
kirovboris kisrefod LavrovArtem link89 lzxb macdonaldr93
MargaritaLoseva Marketionist MatthewNielsen27 mattkubej mattmanske mcjim
MargaritaLoseva Marketionist MatthewNielsen27 mattkubej mattmanske mcjim
miherlosev morfey13 mostlyfabulous murajun1978 NickCis Nuarat
miherlosev morfey13 mostlyfabulous murajun1978 NickCis Nuarat
Ogurecher PayBas pgorny pietrovich radarhere raspo
Ogurecher PayBas pgorny pietrovich radarhere raspo
rbardini renancouto rob4629 rueyaa332266 sgrillon14 smockle
rbardini renancouto rob4629 rueyaa332266 sgrillon14 smockle
stefanschenk superroma sylbru taiki-fw testcafe-build-bot theghostbel
stefanschenk superroma sylbru taiki-fw testcafe-build-bot theghostbel
titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics Vla8islav
titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics Vla8islav
wentwrong b12031106 danielroe danieltroger DevSide intermike
wentwrong b12031106 danielroe danieltroger DevSide intermike
kirillsalikhov michaelficarra rr13k tomashanacek TrevorKarjanis
kirillsalikhov michaelficarra rr13k tomashanacek TrevorKarjanis

Plugins

TestCafe developers and community members made these plugins:

Different Versions of TestCafe

  TestCafe TestCafe Studio
No need for WebDriver, browser plugins or other tools ✓ ✓
Cross-platform and cross-browser out of the box ✓ ✓
Write tests in the latest JavaScript or TypeScript ✓ ✓
Clear and flexible API supports ES6 and PageModel pattern ✓ ✓
Stable tests due to the Smart Assertion Query Mechanism ✓ ✓
Tests run fast due to intelligent Automatic Waiting Mechanism and Concurrent Test Execution ✓ ✓
Custom reporter plugins ✓ ✓
Use third-party Node.js modules in test scripts ✓ ✓
Integration with popular CI systems ✓  ✓*
Free and open-source ✓  
Visual Test Recorder   ✓
Interactive Test Editor   ✓
Automatic Selector Generation   ✓
Run Configuration Manager   ✓
IDE-like GUI   ✓

* You can use open-source TestCafe to run TestCafe Studio tests in CI systems.

Badge

Show everyone you are using TestCafe: Tested with TestCafe

To display this badge, add the following code to your repository readme:

<a href="https://github.com/DevExpress/testcafe">
    <img alt="Tested with TestCafe" src="https://img.shields.io/badge/tested%20with-TestCafe-2fa4cf.svg">
</a>

Thanks to BrowserStack

We are grateful to BrowserStack for providing the infrastructure that we use to test code in this repository.

BrowserStack Logo

License

Code released under the MIT license.

Creators

Developer Express Inc. (https://devexpress.com)

More Repositories

1

devextreme-reactive

Business React components for Bootstrap and Material-UI
TypeScript
2,077
star
2

DevExtreme

HTML5 JavaScript Component Suite for Responsive Web Development
JavaScript
1,807
star
3

devextreme-angular

Angular UI and data visualization components
TypeScript
560
star
4

Blazor

DevExpress UI for Blazor
C#
386
star
5

AjaxControlToolkit

The ASP.NET AJAX Control Toolkit is a classic set of ASP.NET WebForms extensions.
JavaScript
287
star
6

devextreme-vue

Vue UI and data visualization components
TypeScript
267
star
7

DevExpress.Mvvm.Free

DevExpress MVVM Framework is a set of components helping to work in the Model-View-ViewModel pattern in WPF.
C#
221
star
8

testcafe-react-selectors

TestCafe selector extensions for React apps.
JavaScript
203
star
9

testcafe-hammerhead

A powerful web-proxy used as a core for the TestCafe testing framework. 🔨 😃
JavaScript
171
star
10

XPO

DevExpress eXpress Persistent Objects (XPO) ORM for .NET Framework / .NET Core / .NET Standard 2.0
JavaScript
162
star
11

devextreme-react

React UI and data visualization components
JavaScript
160
star
12

DevExtreme.AspNet.Data

DevExtreme data layer extension for ASP.NET
C#
137
star
13

devextreme-angular-template

Responsive Application Layout Templates​ based on DevExtreme Angular Components
CSS
119
star
14

testcafe-live

A tool for rapid test development with TestCafe
JavaScript
118
star
15

obsolete-devextreme-examples

A set of sample applications that will help you to get started.
TypeScript
109
star
16

testcafe-vue-selectors

TestCafe selector extensions for Vue.js apps.
JavaScript
103
star
17

testcafe-browser-provider-browserstack

This is the BrowserStack browser provider plugin for TestCafe.
JavaScript
86
star
18

devextreme-ui-template-gallery

DevExtreme UI Template Gallery
TypeScript
85
star
19

bootstrap-aspnetcore-starter

This repository is obsolete. See README for details.
HTML
81
star
20

web-dashboard-demo

The following application contains the DevExpress Dashboard Component for Angular. The client side is hosted on the GitHub Pages and gets data from the server side that hosts on DevExpress.com.
TypeScript
70
star
21

Logify.Alert.Clients

Logify Alert - crash reporting / exception handling service
C#
66
star
22

dashboard-extension-online-map-item

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
TypeScript
63
star
23

dashboard-extension-webpage-item

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
TypeScript
62
star
24

dashboard-extension-funnel-d3-item

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
JavaScript
61
star
25

bootstrap-themes

Themes for Bootstrap
HTML
59
star
26

blazor-training-samples

This repository is obsolete. See README for details.
HTML
55
star
27

dotnet-eud

DevExpress .NET Controls Documentation for End Users
JavaScript
54
star
28

testcafe-examples

Ready-to-run examples for TestCafe
JavaScript
50
star
29

devextreme-cli

A command-line interface for DevExtreme
TypeScript
50
star
30

DevExtreme-PHP-Data

DevExtreme data layer extension for PHP
PHP
49
star
31

testcafe-browser-provider-electron

This is the Electron browser provider plugin for TestCafe.
JavaScript
49
star
32

dashboard-extension-parameter-item

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
JavaScript
48
star
33

aspnet-security-bestpractices

A project illustrating security best practices for DevExpress ASP.NET controls. See the README for detailed information.
C#
47
star
34

devextreme-vue-template

Responsive Application Layout Templates​ based on DevExtreme Vue Components
CSS
46
star
35

devextreme-documentation

DevExtreme documentation
JavaScript
44
star
36

aspnet-office-solutions

A set of solutions for building scalable web applications containing DevExpress ASP.NET Spreadsheet and Rich Text Editor controls.
C#
44
star
37

dashboard-extension-dashboard-panel

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
TypeScript
43
star
38

devextreme-demos

DevExtreme technical demos
C#
42
star
39

DevExpress.Mvvm.CodeGenerators

DevExpress ViewModel generator
C#
41
star
40

bower-devextreme

This repo is for distribution of DevExtreme Complete product.
CSS
40
star
41

netcore-winforms-demos

This repository contains the Outlook Inspired and Stock Market Trader demo applications that support .Net Core 3.
C#
39
star
42

testcafe-action

TestCafe test runner for GitHub Actions
JavaScript
37
star
43

DevExtreme.AspNet.TagHelpers

[OBSOLETE] See https://js.devexpress.com/Overview/Mvc/
C#
37
star
44

dashboard-extension-simple-table

â›” DEPRECATED. This project was moved to a new repository. Visit https://github.com/DevExpress/dashboard-extensions to find an updated version.
JavaScript
37
star
45

devextreme-react-template

Responsive Application Layout Templates​ based on DevExtreme React Components
CSS
33
star
46

testcafe-angular-selectors

TestCafe selector extensions for Angular apps.
JavaScript
32
star
47

testcafe-browser-provider-saucelabs

This is the Sauce Labs browser provider plugin for TestCafe.
JavaScript
31
star
48

testcafe-browser-tools

Browser manipulation utils for TestCafe.
C++
30
star
49

wpf-themedesigner-app

This is a publish-only repository and all pull requests are ignored. Please follow the Support page for any of your improvements.
29
star
50

golfclub

GolfClub: Angular and DevExtreme sample application
TypeScript
24
star
51

Reporting.Import

An import tool designed to convert third party reports into an internal format supported by DevExpress Reports
C#
24
star
52

devextreme-schematics

Schematics for DevExtreme Angular applications.
TypeScript
20
star
53

ThemeBuilder

A tool for creating custom DevExtreme themes
TypeScript
20
star
54

dashboard-extensions

This repository is obsolete. See README for details.
TypeScript
18
star
55

dataprocessingapi-mvp-example

DevExpress Data Processing API is a prototype (MVP) of a new product and is therefore not yet a part of the DevExpress product line. The prototype supports only v21.2 and is not production-ready. Use it at your own risk.
C#
18
star
56

BigQueryProvider

The DevExpress BigQueryProvider driver is no longer maintained and supported. Use Google's official ODBC driver to obtain BigQuery data in your .NET apps.
C#
15
star
57

DevExtreme.AspNet.Mvc-Demos-NETCore

[OBSOLETE] See https://js.devexpress.com/Overview/Mvc/
C#
15
star
58

OBSOLETE_EF-Core-Security

Security system for Entity Framework Core with demos
CSS
15
star
59

winui-demos

DevExpress WinUI 3 demos that show how to use DevExpress WinUI components and tools, including the Data Grid, Reporting, Scheduler, Charting, and Data Editors.
C#
14
star
60

angular-testcafe

Angular builder to run testcafe tests
TypeScript
14
star
61

match-url-wildcard

Module to match url by pattern
JavaScript
13
star
62

device-specs

JavaScript
13
star
63

DevExtreme-Intl

Integrates ECMAScript Internationalization API with DevExtreme
JavaScript
13
star
64

dx-election

DX Election: Angular and DevExtreme sample application
TypeScript
13
star
65

XAF-Blazor-Kubernetes-example

This example shows how to deploy XAF Blazor application to the Kubernetes cluster and to enable horizontal autoscaling
C#
13
star
66

SalesViewer

TypeScript
12
star
67

netcore-wpf-demos

Please visit https://www.devexpress.com/dotnet-core-3 to download the most recent version of the DevExpress .NET Core installer (contains shipping versions of all DevExpress .NET Core demos).
12
star
68

gulp-testcafe

Run TestCafe tests using Gulp.
JavaScript
11
star
69

testcafe-studio-docs

[deprecated] Documentation for TestCafe Studio
11
star
70

bower-xtrareports-js

JavaScript
10
star
71

testcafe-reporter-json

This is the JSON reporter plugin for TestCafe.
JavaScript
9
star
72

testcafe-reporter-xunit

This is the xUnit reporter plugin for TestCafe.
JavaScript
9
star
73

gimp-dx-screenshot

GIMP Scripts for Screenshot Processing
Scheme
7
star
74

winforms-training-samples

C#
7
star
75

generator-testcafe-reporter

Scaffold out a TestCafe reporter.
JavaScript
7
star
76

testcafe-gh-page-assets

This repository contains assets used in the TestCafe GitHub page.
SCSS
6
star
77

testcafe-aurelia-selectors

TesCafe selector extensions for Aurelia apps.
JavaScript
6
star
78

testcafe-reporter-spec

This is the Spec reporter plugin for TestCafe.
JavaScript
6
star
79

DevExtreme.AspNet.Data.NgHttpClientSample

Refer to https://github.com/DevExpress/DevExtreme.AspNet.Data/issues/311
TypeScript
6
star
80

bower-devextreme-web

[OBSOLETE] See https://github.com/DevExpress/bower-devextreme
JavaScript
5
star
81

TestCafe-Scheduler

Schedule TestCafe testing tasks
JavaScript
5
star
82

testcafe-legacy-api

Legacy API support for TestCafe.
JavaScript
5
star
83

testcafe-reporter-list

This is the List reporter plugin for TestCafe.
JavaScript
5
star
84

xaf-blazor-app-load-testing-example

XAF Blazor Server application load testing example
C#
5
star
85

TestCafe-BrowserStack

Add remote workers from the BrowserStack web service to the TestCafe.
JavaScript
5
star
86

testcafe-browser-provider-phantomjs

This is the PhantomJS browser provider plugin for TestCafe.
JavaScript
5
star
87

devextreme-renovation

TypeScript
5
star
88

aspnet-documentmanagement-bestpractices

A project illustrating best practices of using DevExpress ASP.NET control to create the responsive document management application. See the README for detailed information.
C#
5
star
89

saucelabs-connector

JavaScript
4
star
90

wpf-training-samples

C#
4
star
91

TODO-App-via-DevExpress-MVVM

Simple TODO Application powered by DevExpress WinForms MVVM.
Visual Basic .NET
4
star
92

DevExtreme-Data-Parse

[OBSOLETE] See https://js.devexpress.com/Documentation/Guide/Data_Layer/Data_Layer/
JavaScript
4
star
93

create-testcafe

JavaScript
3
star
94

vscode-rushsnippets

Templates for TypeScript, React and Redux projects that help you write your code faster
3
star
95

TestCafe-RPC

RPC library for the TestCafé.
JavaScript
3
star
96

TestCafe-Wrappers

TestCafe wrappers are a set of JavaScript classes that help you work with the DevExpress ASP.NET controls in TestCafe
JavaScript
3
star
97

testcafe-reporter-minimal

This is the Minimal reporter plugin for TestCafe.
JavaScript
3
star
98

DevExtremeAddon

[OBSOLETE] This plugin setups the CordovaView in the Windows Phone application.
C#
2
star
99

TestCafe-RemoteWorkers

How to make the Continuous Integration system work with remote workers with a single TestCafe instance
JavaScript
2
star
100

DevExtreme-Data-JayData

[OBSOLETE] See https://js.devexpress.com/Documentation/Guide/Data_Layer/Data_Layer/
JavaScript
2
star