 |
 |
 |
 |
 |
 |
In pursuit of code quality: Don't be fooled by the coverage report
Test coverage tools bring valuable depth to unit testing, but they're often misused. This month, Andrew Glover brings his considerable expertise in this area to his new series, In pursuit of code quality. This first installment takes a closer look at what the numbers on the coverage report really mean, as well as what they don't. He then suggests three ways you can use your coverage to ensure code quality early and often.
|
 |
Articles |
 |
31 Jan 2006 |
|
| |
In pursuit of code quality: Code quality for software architects
Most well-designed software architectures are intended to support a system's extensibility, maintainability, and reliability. Unfortunately, inattention to quality issues can easily undermine a software architect's best effort. In this installment of in pursuit of code quality, quality expert Andrew Glover explains how to continuously monitor and correct quality aspects of code that can affect the long-term viability of your software architecture.
|
 |
Articles |
 |
25 Apr 2006 |
|
| |
In pursuit of code quality: Monitoring cyclomatic complexity
If complexity has been shown to correlate to
defects, doesn't it make sense to monitor your code base's complexity
values? Andrew Glover shows you how to use simple code metrics and
Java-based tools to monitor cyclomatic complexity.
|
 |
Articles |
 |
28 Mar 2006 |
|
| |
In pursuit of code quality: Adventures in behavior-driven development
Test-driven development (TDD) is a great idea in practice, but some developers just
can't get over the conceptual leap associated with that word test. In this
article, learn about a more natural way to integrate the momentum of TDD
into your programming practice. Get started with behavior-driven development (BDD) (via
JBehave) and see for yourself what happens when you focus on program behaviors, rather
than outcomes.
|
 |
Articles |
 |
18 Sep 2007 |
|
| |
In pursuit of code quality: Unit testing Ajax applications
You might get a thrill
out of writing Ajax applications, but unit testing them is surely painful. In this
article, Andrew Glover takes on the downside of Ajax (one of them, anyway), which is the
inherent challenge of unit testing asynchronous Web applications. Fortunately, he finds
it easier than expected to tame this particular code quality dragon, with the help of the Google Web Toolkit.
|
 |
Articles |
 |
24 Jul 2007 |
|
| |
In pursuit of code quality: Beware the tight couple!
You know tight coupling is bad news and you really want
to avoid it in your designs -- but the question is how. This month, learn
how to recognize a tightly coupled system and then disentangle it using the
Dependency Inversion Principle.
|
 |
Articles |
 |
22 May 2007 |
|
| |
In pursuit of code quality: Programmatic testing with Selenium and TestNG
Selenium is a testing framework that makes it easy to run user acceptance tests on your Web applications. This month, Andrew Glover shows you how to run Selenium tests programmatically, using TestNG as the test driver. Once you've added TestNG's flexible testing features (including parametric fixtures) to Selenium's native toolkit, all you need is a little help from DbUnit and Cargo to write fully automated, logically repeatable acceptance tests.
|
 |
Articles |
 |
03 Apr 2007 |
|
| |
In pursuit of code quality: Automate GUI testing with TestNG-Abbot
TestNG-Abbot is a testing framework that breathes new life into testing GUI components. This month, Andrew Glover walks you through the hardest part of GUI testing with TestNG-Abbot, which is understanding how a user scenario will play out. Once you've got that down, you'll find it surprisingly easy to isolate GUI components and then verify them using the framework's handy fixture objects.
|
 |
Articles |
 |
27 Feb 2007 |
|
| |
In pursuit of code quality: Defensive programming with AOP
While defensive programming effectively guarantees the condition of a method's input, it becomes repetitive if it is pervasive across a series of methods. This month, Andrew Glover shows you an easier way to add reusable validation constraints to your code using the power of AOP, design by contract, and a handy library called OVal.
|
 |
Articles |
 |
30 Jan 2007 |
|
| |
In pursuit of code quality: Discover XMLUnit
Java developers are natural problem solvers, so it makes sense that someone has come up with an easier way to validate XML documents. This month, Andrew introduces XMLUnit, a JUnit extension framework that meets all your XML validation needs.
|
 |
Articles |
 |
19 Dec 2006 |
|
| |
In pursuit of code quality: Performance testing with JUnitPerf
Performance testing is usually left for last in the application development cycle -- not because it's unimportant, but because it's hard to test effectively with so many unknown variables. In this month's In pursuit of code quality, Andrew Glover makes the case for performance testing as part of the development cycle and shows you two easy ways to do it.
|
 |
Articles |
 |
29 Nov 2006 |
|
| |
In pursuit of code quality: Use test categorization for agile builds
Everyone agrees that developer testing is important,
but why is it so darn time consuming to run tests? This month, Andrew
Glover reveals the three categories of testing needed to ensure
end-to-end system soundness and then shows you how to automatically sort and
run tests by category. The result is a dramatically reduced
built time, even with today's massive test suites.
|
 |
Articles |
 |
31 Oct 2006 |
|
| |
In pursuit of code quality: Repeatable system tests
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.
|
 |
Articles |
 |
26 Sep 2006 |
|
| |
In pursuit of code quality: JUnit 4 vs. TestNG
With its new, annotations-based framework, JUnit 4 has embraced some of the best features of TestNG, but does that mean it's rendered TestNG obsolete? Andrew Glover considers what's unique about each framework and reveals three high-level testing features you'll still find only in TestNG.
|
 |
Articles |
 |
29 Aug 2006 |
|
| |
In pursuit of code quality: Testing Struts legacy apps
Even as Struts does a slow fade into the Web Framework Hall of Fame, its legacy lives on, mostly in the form of applications that need to be tested and maintained. This month, Andrew Glover shows you how to put the quality-centered approach to the test (so to speak) on Struts, using JUnit's StrutsTestCase, DbUnit, and some of what you've learned so far in this series.
|
 |
Articles |
 |
28 Jul 2006 |
|
| |
In pursuit of code quality: Tame the chatterbox
Just seeing a sprawling code block from a distance
gives some developers the willies -- and it should! Loquacious code is
often the hallmark of complexity, which results in code that is hard to
test and maintain. This month, learn three important ways to measure
code complexity, based on method length, class length, and intra-class
coupling. In this installment of In pursuit of code quality, quality expert Andrew Glover starts out with tips for eyeballing code excess, then
shows you how to use tools like PMD and JavaNCSS for more precision when
you need it.
|
 |
Articles |
 |
30 Jun 2006 |
|
| |
In pursuit of code quality: Refactoring with code metrics
In earlier installments of In pursuit of code quality, you learned how to use code metrics to objectively measure code quality. This month, Andrew Glover shows you how to use those same metrics and the Extract Method pattern for targeted refactoring.
|
 |
Articles |
 |
30 May 2006 |
|
| |
In pursuit of code quality: Resolve to get FIT
Find out how the Framework for Integrated Tests facilitates
communication between the business clients who write requirements and
the developers who implement them.
|
 |
Articles |
 |
28 Feb 2006 |
|
| |
In pursuit of code quality: Don't be fooled by the coverage report
Test coverage tools bring valuable depth to unit testing, but they're often misused. This month, Andrew Glover brings his considerable expertise in this area to his new series, In pursuit of code quality. This first installment takes a closer look at what the numbers on the coverage report really mean, as well as what they don't. He then suggests three ways you can use your coverage to ensure code quality early and often.
|
 |
Articles |
 |
31 Jan 2006 |
|
| |