Why Automated Testing
for Web Apps?
Java Champion Kevin Nilson talks about his language-agnostic testing toolset.
KEVIN NILSON
JAVA IN ACTION
Kevin Nilson has been building complex Web applications for
most of his career. He has realized
that automated developer testing
is the key to building quality Web
applications. Over time, Nilson
has pulled together the best open
source tools and he has written
custom tools to decrease the time
needed to develop high-quality
applications by making testing
a part of the coding process. As
he puts it, “It is easier to fix code
while you are creating your applications.” Here, he talks with Java
Magazine about his toolset, which
is language agnostic and integrated with tools such as TestSwarm,
QUnit, jQuery, Hudson, GlassFish
Server Open Source Edition, and
Sun SPOT Java Development Kit.
framework, you often don’t know
exactly how the framework will
be used. Having strong automated tests allows me to use the
framework to test scenarios that
are not currently part of a product but might be someday.
ABOUT US
blog
PHOTOGRAPH BY
MARGOT HARTFORD
Why are testing, in general,
and automated testing run
by developers, in particular,
important?
Prioritizing testing in your devel-
oper environment is critical for
creating and maintaining qual-
ity software. The cost of fixing
bugs is directly proportional to
how early they are found. If you
find a bug five minutes after you
write a line of code, you can very
quickly fix the bug. On the other
hand, if you find a bug after it is
two weeks old, it will be much
harder for you to fix the bug. After
two weeks, you might even have
forgotten why you added the code
in the first place.
What unique challenges do
you face when testing Web
applications?
Over the last few years, HTML5
and Web 2.0 have led a trend in
Web applications moving logic
from the server to the browser.
The biggest challenge in writing Web applications is that your
application must run on many
platforms and many browsers.
Each browser behaves nearly
the same as the rest, but many
browsers have bugs that cause
incompatibilities.
When writing a Web application, it is very important to determine what browsers you want to
target. Then you must thoroughly
test your application on those
browsers. One of the biggest