A short introduction to one of the most easy-to-use cross browser testing tool. DalekJS helps you write simple instructions to drive either headless browser or real browsers, to see if your application works as expected
3. DalekJS :: What is DalekJS?
An easy to use JavaScript based
cross platform automated cross
browser black-box testing tool
DalekJS website Nir Elbaz
4. DalekJS :: Main Features
❖ Launch & automate your browser
❖ Fill & submit forms
❖ Click & follow links
❖ Capture screenshots
❖ Run your functional tests
Nir Elbaz
10. DalekJS :: Installation
1. Install node.js
2. Create a new directory for your tests
3. Open terminal (command prompt)
a. Install dalekjs command line interface globally:
npm install dalek-cli -g
b. Change path (cd) to tests directory
c. Install dalekjs package locally:
npm install dalekjs
Nir Elbaz
13. DalekJS :: Hands On
Test file sample (*.js)
module.exports = {
'Page title is correct': function (test) {
test
.open('http://google.com')
.assert.title().is('Google', 'It has title')
.done();
}
};
Nir Elbaz
14. DalekJS :: Hands On
Running a test file using PhantomJS:
dalek filename
Running a test file using a real browser:
dalek filename -b chrome
Running a test file & create a report:
dalek filename -r myreport.html
Nir Elbaz
15. DalekJS :: Hands On
Actions - a way to control your browsers,
e.g. simulate user interactions like clicking
elements, open urls, filling out input
fields, etc.
reload, forward, open, submit, click, wait,
type, setValue, maximize, toParent...
DalekJS Cheat Sheet Nir Elbaz
16. DalekJS :: Hands On
Assertions - check if the assumptions
you made about a website are correct.
For example they might check if the title
of a page or the content text of an element
is as expected
height, css, attr, exists, text, cookie...
DalekJS Cheat Sheet Nir Elbaz
19. DalekJS :: Prolog
❖ An easy to use UI testing automation tool
❖ Can increase QA & Dev teams productivity
Create scripts repository, use task scheduler to auto-run test files...
❖ Great for regression & routine testing
❖ Learn more on DalekJS.com & cheat sheet
However...
❖ It is still beta
❖ This is NOT the only tool out there