Linux and Technology blog

October 7, 2006

In pursuit of code quality: Repeatable system tests

Filed under: Software, Technolgoy, Tutorials — rakeshvk @ 2:34 pm

Writing logically repeatable tests is especially tricky when testing Web applications that incorporate a servlet container. In his continued quest to improve code quality, Andrew Glover introduces Cargo, an open source framework that automates container management in a generic fashion, so you can write logically repeatable system tests every time.

By their very nature, test frameworks like JUnit and TestNG facilitate the creation of repeatable tests. Because these frameworks leverage the reliability of simple Boolean logic (in the form of assert methods), it’s possible to run tests without human intervention. In fact, automation is one of the primary benefits of test frameworks — I can write a fairly complex test asserting specific behaviors, and if those behaviors ever change, the framework reports an error that anyone can interpret.

Utilizing a mature test framework gives you the benefit of framework repeatability, right out of the box. But logical repeatability is up to you. For example, consider the challenge of creating repeatable tests that verify Web applications. A few JUnit extension frameworks (such as JWebUnit and HttpUnit) excel at facilitating automated Web testing. But it’s the developer’s job to make the plumbing of the test repeatable, and that’s hard to do when it comes to deploying Web application resources.

read on

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: