The evolution which came with the Arquillian, award-winning integration test framework, and Selenium, outstanding tool for UI automation, allows to write high-quality tests. But these technologies can’t save the world by themselves, since they are leaving too many questions open:
* Does Selenium cover everything? It covers page transitions, a simple JavaScript interaction and a portion of DOM. Is it really enough?
* Mocking requests for testing server-side code is pain. Is it necessary?
* Are you able to detect that your component’s visual representation changes?
* Does investigating these changes involve a disproportionate amount of effort?
* Isn’t manual test development too expensive?
What if you could fill all the above gaps?
8. “But testing of large
enterprise application can
hardly can be enjoyable.”
Enterprise Java Web Application
“You need to write all the
test harness at own and
study all the tools.”
38. “Even if we use favorite
programming language,
we can end up with many
tests which take days to
pass and may quickly
turn out into maintenance
burden!” Java
C#
Python
Ruby
PHP
Perl
42. “Selenium is able to test
transitions between
pages.”
State Transitions
43. “...and a portion of all the
page source code –
JavaScript handlers,
selected CSS and DOM
changes as reaction to
user interaction.”
A little bit of...
DOM / JavaScript / CSS
74. “When each
framework and library
providing UI
components will
design component
objects the same as it
share their code, it
will be testing much
more simpler.”
Call to Action:
Write & Share Component Objects
80. “We can automatically
snap screen-shots of the
whole pages and
compare them with
historical data – it's
proven that rendering on
one particular browser
and platform, images will
be binary same.”
Screen-shot Comparison
89. “For writing actual
tests, you can use
your favorite JS client
testing tool.
We are actually
working on
integration with
QUnit.”
Arquillian
Drone + QUnit | JSTD
Maven / Jenkins / IDE
90. “JavaScript testing does not
scale!”
~John Resig
http://ejohn.org/blog/javascript-testing-does-not-scale/
110. JSFUnit
HtmlUnit
Asserts end of the Request State
JSF only
JSFUnit .NG (next generation)
Selenium / any other HTTP client
Lifecycle
Any injectable resource
Any Servlet based framework
137. Some photographs and pictures used in this
presentation are authored by various authors
and released under the Creative Commons
license
http://www.flickr.com/photos/nickrussill/150410613/
http://www.flickr.com/photos/audreyjm529/1240909256/
http://www.flickr.com/photos/jo-h/6200225665/
http://www.flickr.com/photos/stevendepolo/3796415185/
http://watirmelon.com/2012/01/31/introducing-the-software-
testing-ice-cream-cone/