Last Updated: February 25, 2016
· olehkuchuk

Easy functional testing with DalekJS

When your app become large , testing UI functionality can be not so easy as you can imagine it. And in some period you will want to automate this process.

Of course, you can use such cool tools like CasperJS and PhantomJS, but they are really extensive and do much more than simply testing.

Another way is to use DalekJS. Its built on top of CasperJS and gives you a really clean interface for tests , using chains.

Look on this code

module.exports = {
  'Amazon does its thing': function (test) {
       .type('#twotabsearchtextbox', 'Blues Brothers VHS')
       .assert.text('#result_0 .newaps a span').is('The Blues Brothers')

How simple you can test your UI.
But this is not all cool stuff, DalekJS supports plugins of real browsers, so you can install chrome plugin.

$ npm install dalek-browser-chrome --save-dev

and than run your test

dalek test.js -b chrome

And you will see real user interaction.

More information on project website