About patterntesting-check

PatternTesting Check (patterntesting-check) is a quality framework that allows to automatically verify that Architecture/Design recommendations are implemented correctly in the code. It provides different checks of known anti patterns (like using System.out for logging) but provides also a test framework for better testing.

Introduction

PatternTesting Check was in 2002 the starting point for PatternTesting. It was one of the first AspectJ library and provides some check for common anti pattern with Java. Some of these checks like damning the use of System.out or System.our are done during compile time, other checks like watching for null arguments are done during runtime.

Now PatternTesting Check was splitted into:

  • PatternTesting Check.CT for the checks during compile time,
  • PatternTesting Check.RT for the check during runtime.

PatternTesting Check was splitted because of performance problem with Eclipse 3.3. It is more than 30 times slower than Eclipse 3.4 for the incremental build so the static part (Check.CT) was extracted. The more interesting thing is the runtime part and now you can choose to use only the runtime part or both.

Recommendation

Use at least Eclipse 3.4 - it is much much faster than Eclipse 3.3 (see Performance Boost with Eclise 3.4 / AJDT 1.6.3).

Some of the static checks in PatternTesting Check.CT can be done also by other tools like FindBugs or PMD. The advantage of PatternTesting Check.CT is that it is part of the compile process - the user sees the warning immediately. Disadvantage: the compile process is a little bit slower.

Hello World

An actual hello-world example how to use PatternTesting

A simple hello-world example how to use PatternTesting 0.6 you can find on Oli's blog.

An actual hello-world example how to use PatternTesting you can find in the PatternTesting Wiki.

More Samples

For more examples look at PatternTesting-Samples.