5. Agenda Part 1
Introduction
Vagrant Box / Trello Accounts
Install NodeJS - Caveats / Best Practises
Install DalekJS
Run firsts test
Documentation
Trello Board Issues
BREAK ~10 min
6. Agenda Part 2
Work on the issues
Code Reviews
Integrate tests on CI Server
The fun stuff
Grunt plugin
Remote Testing / Run tests in the cloud
Debugging
CI/CD
7. DalekJS
Why?
Relies on Standards - WebDriver/JSON-Wire
Only dependency in Node.js
Abstraction layer for PhantomJS
with a testing API on top
Writing tests feels natural
8. DalekJS
Caveats
Webfonts (Phantom JS Issue)
Mouse Events - TBA
*.js only on *nix systems
Error handling - TBA
setUp/tearDown - TBA
No HTTP Status Codes
35. Debugging Node.js
REPL- examining the current state
Watchers
watch("my_expression")!
!
watchers // prints active watchers!
!
unwatch("my_expression")!
!
!
36. Debugging Node.js
Stepping
cont, c - Continue execution
next, n - Step next
step, s - Step in
out, o - Step out
pause - Pause running code (like pause button in
Developer Tools)
!
37. Debugging Node.js
Breakpoints
setBreakpoint(), sb() - Set breakpoint on current
line
setBreakpoint(line), sb(line) - Set breakpoint on
specific line
setBreakpoint('fn()'), sb(...) - Set breakpoint on a
first statement in functions body
setBreakpoint('script.js', 1), sb(...) - Set breakpoint
on first line of script.js
38. Node Inspector
Installation
$ npm install -g node-inspector
Run app in debug mode
$ node --debug-brk myApp.js
Start Node Inspector
$ node-inspector
Open a WebKit Browser
http://127.0.0.1:8080/debug?port=5858
!
!