Nowadays, a vast number of projects, small and large, is developed using Node.js tools and hosted on GitHub. Authors of these projects often face the need to choose a tool for end-to-end testing. When we at DevExpress created TestCafe, we wanted it to perfectly fit in the modern Node.js development workflow.

The same language is used both in tests and projects you are developing — modern JavaScript with support for ES6 and ES7 features.

Easy installation and launch. No need to install and maintain additional products and browser plugins. Tests can be run right after npm install .

. Easy integration with CI systems.

TestCafe functionality can be extended with plugins.

Tests can use any third-party Node.js module.

In this article, I’ll show how easy it is to set up automated testing for your Node.js web project on GitHub. Using a real project (Bootstrap) as an example, I’ll describe how to set up testing in local browsers on a developer’s machine and how to configure Continuous Integration testing on Travis CI step by step. In the CI testing part, I’ll show how to run tests in the browsers provided by Travis CI (Chrome and Firefox), headless browsers (the NightmareJS browser automation library) and in cloud services that provide a wide range of operating systems and browsers for testing (SauceLabs).

I’ll show how end-to-end testing can be used at each stage of the project’s workflow:

On a local machine during the development. You can run tests in any browser without installing additional libraries and plugins.

In a pull request. This allows you to ensure that the project works well before the changes are pushed to the master branch.

When pushing commits to the master branch.

To run tests, we will use TestCafe testing framework.