16 plugins to extend TestCafe functionality

Natu K.
4 min readJul 25, 2017

--

https://devexpress.github.io/testcafe/

TestCafe manages end-to-end testing process out of the box. It starts browsers, runs tests and shows results. But there is also a bunch of plugins which extend its functionality. Here’s a list of the most popular ones.

Connect TestCafe with cloud browser providers

(2 plugins, both by belym.a.2105)

With testing clouds, you don’t have to set up your own testing environment. They let you run your tests in the cloud. And they provide mobile and desktop browsers on various platforms.

Use Sauce Labs provider to run your TestCafe tests in SauceLabs cloud.

Or use BrowserStack provider if you prefer it’s competitor, BrowserStack.

Run tests in headless browsers and mobile emulators

(2 plugins, by ents24 and ryx )

TestCafe supports latest versions of the most popular browsers out of the box. And you can run tests on your mobile device by scanning a QR code generated by TestCafe.

But sometimes you don’t have a mobile device at hand. In this case, you can use fbsimctl plugin to run tests in Mobile Safari on iOS emulator.

What Safari emulator looks like

If you need to test in headless browsers, get Nightmare plugin. You’ll need to have a fresh version of Nightmare too.

Test accessibility

(1 plugin, by devexpress)

Accessibility testing is meant to provide digital equality. And aXe is an engine for automating web UI accessibility tests. With aXe plugin, you can use aXe to perform accessibility tests in TestCafe.

Integrate tests into your task runner

(2 plugins, by inikulin and crudo)

If you use Gulp or Grunt, you can include your TestCafe tests into your tasks.

Use this plugin for Gulp or this one for Grunt.

Write tests with your favorite selectors

(3 plugins, by kirovboris and miherlosev)

If you feel that selector options provided by TestCafe are not enough, install one of these plugins to use different selectors:

Customize test reports

(2 plugins, by nirsky and jimthedev)

If you use TeamCity get a reporting plugin and see your test results in TeamCity UI. Your test reports will look like this:

Viewing TestCafe reports in TeamCity

By default, TestCafe shows the time spent for the entire run. To measure the time of each task run use TimeCafe plugin. This task timing is most important when looking for performance regressions.

TimeCafe shows the time of each task run

Run tests from IDE

(2 plugins, by Roman Resh and churkin)

There’s a couple of plugins which allow to launch tests directly from IDE.

The one for MS Visual Studio users called TestCafe Test Runner.

Launching tests from Visual Studio

And testcafe-sublimetext which does the same for SublimeText IDE.

Launching tests from SublimeText

Build your own plugins

(2 plugin generators, by belym.a.2105 and inikulin)

If you feel like building your own plugins, check out these plugin generators from TestCafe creators.

Build a browser provider to set up tests on your on-premises server farm, to use a cloud testing platform, or to start your local browsers in a special way. Use this Yeoman generator so that you will need to write only a few lines of code.

To build a custom reporter with your own formatting and style check out this generator.

And make sure to send me a quick note, so I can include your plugin into this list.

Some of these plugins are made by Github community members. Others are from TestCafe developers: they roll extended functionality out as plugins not to clutter the original app. Choose the ones which fit you best and power up your tests.

If you think that I’ve missed something, please tell me in the comments!

--

--

Natu K.

I share personal experience from IT fields I've worked in: programming, QA, marketing, project & people management.