TestCafe and why you should try it!

Every test automation engineer is known with the popular automation frameworks like protractor, webdriver.io or nightwatch.js. They all have in common that they are based on the selenium/webdriver framework. To communicate with the browsers the frameworks are depending on plugins. ChromeDriver is needed to communicate with Chrome, IEDriverServer to communicate with Internet Explorer etc. If you are testing in a multi browser environment it is very hard to write stable tests that are non flaky for all the browsers and driver plugins.

Unlike the majority of other end-to-end (e2e) testing tools, TestCafe is not dependent on Selenium or WebDriver. Instead, it injects scripts into the browser to communicate directly with the DOM and handle events. It works on any modern browser that supports HTML5 without any plugins. Further, it supports all major operating systems and can run simultaneously on multiple browsers and machines. TestCafe started as a paid product but became open-source late 2016. The popularity is increasing rapidly, in the last couple of months the GitHub project is starred from hundreds to over 4000!

I used the basic example (Node.js based). After installing the dependencies I ran npm test. Without any additional configuration it started my installed browsers ( Chrome/Safari/Firefox ) and the example tests were executed WOW.. no installation of drivers needed run out of the box :-).

Syntax is really awesome you can use es6 async await to handle promise chain. Also other cool es6 features like imports and classes. I am going to explore this tool a little bit more for sure during the next couple of weeks.