Does DalekJS depend on Selenium?

Short answer: No. Dalek uses the WebDriver JSON-Wire protocol to communicate with the browsers it utilitizes, when applicable. The WebDriver specification evolved out of the Selenium project, after which it was submitted as a draft to the W3C. So, in some ways, Dalek's existence would not be possible without the work the Selenium project has done so far. However, as Dalek's only dependency is node.js, there is no need to install Java or download the Selenium.jar file.

How do I use DalekJS in my CI env?

Dalek was developed with Continous Integration systems in mind. Basically, there should be no problem with any CI system that is able to execute shell commands, but Dalek has been tested with the following CI platforms:

Travis CI

Running tests with Travis is as easy as stealing sweets from a baby.
A basic .travis.yml to enable Dalek in your Travis install looks like this:

Dalek's guineapig project runs tests with Travis. If you are lazy, you can use this as a boilerplate.


If you think Travis was an easy one, then drone.io is like CI for dummies. Just add these 3 lines to your run configuration and be happy.

To see dalek@drone.io in action, please check the guineapig project.

Be aware of, that within drone.io and TravisCI, Dalek is only capable of running PhantomJS, because no other browsers are available there!


To make all the enterprise lovers happy (No, I don't mean Star Trek fans here), Dalek can output its test results in JUnit format, using dalek-reporter-junit. A more detailed setup guide will follow soon.

Can I write my tests in Coffeescript?

Sure. As the lovely ghosts of PhantomJS & CasperJS showed us, people like to write Coffeescript for some reason. All you need to get your coffee brewing at the correct temperature is to indicate that you would like to run Coffeescript instead of JavaScript:

$ dalek test/my_first_test.coffee

Should I ditch CasperJS & switch to Dalek?

Not yet, and depending on your needs, maybe never. CasperJS is a beautiful and mature tool that does way more than just allow you to write tests. I personally see it more like a nice API/abstraction layer for PhantomJS with a testing API on top of it. By the way: Without Casper, Dalek wouldn't exist. The first draft of DalekJS used CasperJS as a base to driver PhantomJS (before Ghostdriver was implemented in Phantom).
Also, due to the fact that the WebDriver spec misses some (in my opinion) important methods (e.g., checking HTTP status codes and getting information out of the HTTP headers), Dalek can never be as powerful as Casper is. AND most important, the Casper guys do great work, appreciate that as well as I do (Dalek <3 Casper)

I love the thrill, can I get the latest & greatest?

Sure, Dalek modules automatically generate Canary builds if a push to the GitHub repository passes all the tests! Just append -canary to the module name when adding it to you package.json or install it via command line.

$ npm install dalekjs-canary
$ npm install dalek-reporter-html-canary

What do other people say about Dalek?