KEMBAR78
20150128 angular js_headless_testing | PDF
Automated
Headless
End2End
AngularJS Testing
by Benjamin Neu – 28.01.2015
• Ensures Quality
• Helps with refactoring
• Tests instead of specification / documentation
• Integration of new developers easier
Why Testing ?
Plan 30%Dev Time for writing tests
28.01.2015 2
Unit Tests
End2End Tests
vs
28.01.2015 3
Toolchain for Testing
Angular Test Stack
Protractor
test runner /
test framework
Selenium
web browser
automation
Browsers
28.01.2015 4
Jasmine
test description
Protractor Example
28.01.2015 5
Protractor Example (1)
28.01.2015 6
Protractor Example (2)
28.01.2015 7
Demo with UI
28.01.2015 8
Testing Automated
• Headless Setup, to save resources (no X-Server needed)
• Virtual framebuffer xvfb
28.01.2015 9
New Code
Event
Selenium
Standalone on
Ubuntu
BrowsersBamboo Build Server
Run and parse Protractor Test
Demo Headless
28.01.2015 10
• You can only control the webbrowser
and not the OS windows and events
• It is very hard to test if elements are visible at the
right position
• Toolchain sometimes does not keep up with browser
updates
Testing Limits
28.01.2015 11
POINT-OF-MEDIA.COM
benjamin.neu@point-of-media.com
STEFAN-GEORGE-RING 2 • 81929 MUNICH • GERMANY
PHONE + 49 89 – 21 54 74 61 - 0
LET‘S TEST IT
Looking for a job ? - WE ARE HIRING
28.01.2015 12

20150128 angular js_headless_testing