 |
 |
 |
 |
 |
 |
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: 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 |
|
| |
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: 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: 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: 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: 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 |
|
| |
JiBX 1.2, Part 1: Java code to XML schema
XML schema definitions are the basis for many types of data exchanges, including most forms of Web services. But XML Schema is a complex standard, and most tools for creating and modifying schema definitions are not as powerful or easy to use as those for working with Java code. The new features of JiBX 1.2 let you start from Java code and easily generate quality schema definitions to match your data structures. You can then use the schemas directly, whether you use JiBX data binding or not.
|
 |
Tutorial |
 |
03 Mar 2009 |
|
| |
Jump into JUnit 4
JUnit 4 has dropped the strict naming conventions and inheritance hierarchies of old, in favor of the streamlined flexibility of Java 5 annotations. In this tutorial, a supplement to his popular series on code quality, testing fanatic Andrew Glover shows you how to leverage the new features enabled by annotations, including parametric tests, exception tests, and timed tests. He also introduces JUnit 4's flexible fixtures and shows you how to use annotations, rather than suites, to logically group tests before running them. The tutorial includes several sample tests run in Eclipse and instructions for running JUnit 4 tests in older, incompatible versions of Ant.
|
 |
Tutorials |
 |
20 Feb 2007 |
|
| |
Fuzz testing
Fuzz testing is a simple technique that can have a
profound effect on your code quality. In this article, Elliotte Rusty
Harold shows what happens when he deliberately injects random bad data
into an application to see what breaks. He also explains how to use
defensive coding techniques such as checksums, XML data storage, and
code verification to harden your programs against random data. He
concludes with an exercise in thinking like a code cracker -- a crucial
technique for defending your code.
|
 |
Articles |
 |
26 Sep 2006 |
|
| |
Java theory and practice: Testing with leverage, Part 1
Back in June 2004, veteran exterminator Brian Goetz introduced the FindBugs static code analysis tool, which
can detect bugs even in well-tested software. This month, he revisits that topic and looks at how static analysis tools can change the way you manage software quality by aiming development resources at entire classes of bugs rather than specific instances.
|
 |
Articles |
 |
20 Jun 2006 |
|
| |
Classworking toolkit: Cover your code with Hansel and Gretel
Unit tests provide a great technique for making sure that code performs to specifications. But the quality of unit tests is up to the test writer, and the results from unit tests are only as good as the quality of the tests. How can you make sure your unit tests deliver the quality you need? In the first article of this new series dedicated to classworking tools, regular developerWorks contributor Dennis Sosnoski discusses how code coverage tools provide one important quality check for your tests.
|
 |
Articles |
 |
08 Feb 2005 |
|
| |
JiBX 1.2, Part 1: Java code to XML schema
XML schema definitions are the basis for many types of data exchanges, including most forms of Web services. But XML Schema is a complex standard, and most tools for creating and modifying schema definitions are not as powerful or easy to use as those for working with Java code. The new features of JiBX 1.2 let you start from Java code and easily generate quality schema definitions to match your data structures. You can then use the schemas directly, whether you use JiBX data binding or not.
|
 |
Tutorial |
 |
03 Mar 2009 |
|
| |
Spot defects early with Continuous Integration
Continuous Integration (or CI) is a process that consists
of continuously compiling, testing, inspecting, and deploying source code. In
many Continuous Integration environments, this means running a new build
anytime code within a source code management repository changes. The benefit
of CI is simple: assembling software often greatly increases the
likelihood that you will spot defects early, when they still are
relatively manageable. In this tutorial, a companion to his series In pursuit of code
quality, Andrew Glover introduces the fundamental aspects of Continuous Integration and steps you through how to set up a CI process using best-of-breed open source technologies.
|
 |
Tutorials |
 |
21 Nov 2007 |
|
| |
Developing with real-time Java, Part 3: Write, validate, and analyze a real-time Java application
Building on the previous two articles in this three-part series and on the Real-time Java series, this article shows how to design, code, validate, and analyze a basic real-time application. The emphasis is on the practical aspects of validating the achievement of an application's deterministic quality of service.
|
 |
Articles |
 |
14 Oct 2009 |
|
| |
FindBugs, Part 1: Improve the quality of your code
Static analysis tools promise to find existing bugs in your code without requiring much effort on the part of the developer. Of course, if you've been programming for long, you know those promises don't always pan out. Even so, good static analysis tools are a valuable addition to your toolbox. In this first of a two-part series, Senior Software Engineer Chris Grindstaff looks at how FindBugs can help improve the quality of your code and eliminate bugs lying in wait. Don't miss Part 2 of this series to get the final part of the story.
|
 |
Articles |
 |
25 May 2004 |
|
| |
Multithreaded unit testing with ConTest
Concurrent programming is notoriously bug-prone. Worse, concurrent bugs tend to be detected late in the development process when they cause considerable damage and are hard to debug. Even when they are done thoroughly, conventional unit-testing practices are likely to miss concurrent bugs. In this article, concurrency experts Shmuel Ur and Yarden Nir-Buchbinder explain why concurrent bugs are so hard to catch and present a new solution from IBM Research.
|
 |
Articles |
 |
04 Apr 2006 |
|
| |
Stop writing so much code!
Write less code by leveraging a battle-hardened collection of open source utilities from the Apache Commons project's Lang library. Reusing other people's reliable code helps you get your software to market more quickly, with fewer defects.
|
 |
Tutorials |
 |
16 Dec 2008 |
|
| |