DalekJS

Exterminate all bugs!

DalekJS?

The API

test.open('http://foo.baz')
  .click('.bar')
  .waitForElement('#baz')
  .assert.title().is('fooBar', 'Yeah')
  .done();

Actions

Assertions

  • .exists()
    Asserts that an element exists.

    .assert.exists('#Logout', 'Logout Button is there')
  • .text()
    Asserts that given text does exist.

    .assert.text('h1', 'Expected Headline', 'Headline is correct')
  • .val()
    Asserts that a given form field has the provided value.

    .assert.val('#mySelect', '', 'Default Value ist correct')

Login Status

module.exports = {
  'Check Login status': function (test) {
    test
   .open('https://github.com/')
   .waitForElement('.header')
   .assert.exists('.header-logged-out', 'User is logged out')
   .done();
  }
};

Reenact the tests

Cross-Browser-Tests

via DalekJS Plugins

# Install
npm install dalek-browser-chrome --save-dev
# Execute
dalek tests/firstTests.js -b chrome

IE Testing

Remote Test execution #FTW ❤

Alternative Reports

Via DalekJS Plugins

  • HTML, JSON, jUnit XML
  • See Docs

Bottom line

  1. Early version – yet enjoyable
  2. Super easy to write test
  3. Alternative: CasperJS

Exterminated!

Questions?