PatternTesting meets Google App Engine at (experimental)

With 1.0 the new home of PatternTesting is And the project pages are also available in German.

Vision of PatternTesting

To be the Minesweeper of Your Java Code!

What does this mean?

Do you known the computer game "minesweeper"? There you have to find the mines in a field. If you are not careful and hit a field with a mine the game is over.

PatternTesting is not a game but it gives you hints where there may be mines in your software. It is up to you to remove the mines before they explode at the users of your application or damage your database.

Find the mines in your code before your users will find them. Otherwise: GAME OVER!

What Says Sloganizer?

generated by


PatternTesting is a testing framework that allows to automatically verify that Architecture/Design/Best practices recommendations are implemented correctly in the code. It uses AOP and AspectJ to perform this feat. Read the What is Pattern Testing page for more details.

This project delivers several types of artifacts:

  • patterntesting-parent: Contains nothing to deliver, but is the parent of all subprojects.
  • patterntesting-rt: This is the runtime part which can be used standalone, without patterntesting-check or the other subprojects. It contains some checks which are activated by the use of some annotations.
  • patterntesting-check: Suites of reusable Pattern Tests (Aspects in AspectJ terminology); this is the core part where patterntesting started in the past.
    Since 0.9.5 it is splitted into
    • patterntesting-check-ct: compile time checks (static part)
    • patterntesting-check-rt: runtime checks (dynamic part). In contracdiction to patterntesting-rt (see above) these checks are on by default but can be disabled by annotations (e.g. @NullArgsAllowed).
  • patterntesting-concurrent: This library contains some support to simplify concurrency but provides also testing of threads.
  • patterntesting-exception: This is a wrapper for different JDK classes to provide better exceptions. It provides also an ExceptionFactory for testing.
  • patterntesting-tools: Infrastructure tools to easily execute Pattern Tests on your project (plugins for Ant and Maven, report generation, etc).
  • patterntesting-samples: samples how to use it

Why was it splitted into several subprojects? One reason was Maven. Maven recommends to use produce only one artifact per project. But the main reason are performance issues. If you use Eclipse 3.3 especially the old patterntesting-check library (which is now splitted) slows down the compile process. Now you can choose which part of PatternTesting you want to use in your project.


Errors in code can be annoying. Especially when they pop up in production and you realize that this kind of error could be have been prevented. There are antipatterns known in the internet which describes the cause of such errors and what you can to to prevent them. PatternTesting helps you to detect some common antipatterns and violation of common practices.

IDE and Compiler Version

If you use Eclipse as Java IDE you need the AJDT plugin. Use at least Eclipse 3.4 with AJDT 1.6.2 - it is much much faster than Eclipse 3.3 (see Performance Boost with Eclise 3.4 / AJDT 1.6.3).

If you use another IDE use the leatest stable version of the AspectJ compiler, but at least the version 1.6.9. This is the same version as the version of the Eclipse AspectJ plugin (AJDT). Older versions will also work but newer versions are faster.


18/10/2010 Delivery of 1.0.3 and upload to
08/09/2010 Delivery of 1.0.2
18/07/2010 Delivery of 1.0.1
20/06/2010 Delivery of 1.0.0
28/01/2010 talk "Pleiten, Pech und PatternTesting" at the OOP 2010 in Munich
22/01/2010 Christian Heise joins the Pattern Testing project. Welcome Chris!
02/01/2010 Begin with 1.0 and move to
20/12/2009 Delivery of version 0.9.8 (probably the last 0.9 version)
11/09/2009 Begin to deliver version 0.9.7 with improved patterntesing-samples.
20/06/2009 Hector Tenedero joins the Pattern Testing project. Welcome Hector!
02/05/2009 Delivery of version 0.9.6 for the Stuttgarter Test-Tage 2009.
30/03/2009 after the project split (patterntesting-exception, patterntesting-concurrent, patterntesting-check-ct, patterntesting-check-rt) all sub projects have now version 0.9.5
26/03/2009 PatternTesting Check is now splitted into a static part (PatternTesting Check.CT for checks during compile time) and a dynamic part (PatternTesting Check.RT for checks during runtime)
23/03/2009 Exception support is now moved into its own project - PatternTesting Exception
Thread and concurrency support is also moved into its own project - PatternTesting Concurrent
20/03/2009 release of 0.9 for patterntesting-rt, patterntesting-check, patterntesting-samples and patterntesting-tools.
12/12/2008 PatternTesting 0.8.0, redesign and split into several subprojects. Avalon is no longer support because this project is dead. If you need Avalon support use PatternTesting 0.6.x.
24/11/2008 Marko Umek joins the Pattern Testing project. Welcome Marko!
03/11/2008 PatternTesting 0.6.1 has been released.
05/10/2008 PatternTesting 0.6.0 has been released.
09/09/2008 begin with PatternTesting 0.6.0 with support of AspectJ 1.6 and Java 6
27/04/2008 PatternTesting 0.5.1 has been released.
23/04/2008 Got some new ideas for the AbstractNullPointerTrap on a BOF session about AOP on the JAX. You can now use annotations (@NullArgsAllowed and @MayReturnNull) to mark methods.
28/01/2008 PatternTesting 0.5.0 has been released.
06/01/2008 Switched to Maven 2. Documentation is now generated with it.
May 2007 Joined the project (Oliver Boehm). I will try to reactivate it.
20/02/2004 Shohara Shaikh joins the Pattern Testing project. Welcome Shohara!
10/11/2004 Xavier Warzee joins the Pattern Testing project. Welcome Xavier!
15/09/2004 PatternTesting 0.3 has been released.
11/08/2004 Work begins on the project again. Updated .3dev version to be compatible with maven 1.0 and aspectj 1.2. More enhancements to follow!
25/04/2004 Added support for AspectJ 1.1.1
19/04/2004 New StackTrace Pattern Test.
03/03/2004 Matt Smith takes the lead and gives a new life to the Pattern Testing project. Welcome Matt!
28/9/2002 New ThreadSafe Pattern Test (part of the Avalon Pattern Test Suite).
22/9/2002 New Database Pattern Test.
18/9/2002 Jitendra Joshi joins the Pattern Testing team!
15/9/2002 Version 0.2 has been released. It now contains a fully working Maven plugin. In addition, the AspectJ extension has been much improved and is now based on the AspectJ Ajc Ant task which it extends.
14/9/2002 Version 0.1 has been released. At the moment it only contains an AspectJ extension to generate AJC results in XML. It will be used for the MAven plugin later on in order to generate HTML reports.
12/9/2002 Reorganisation of the project structure and build (we are now using Maven).
12/9/2002 Jerome Bernard joins the Pattern Testing team!
11/9/2002 Steve Donagh joins the Pattern Testing team!
13/6/2002 Stephen Cheng joins the Pattern Testing team!
23/3/2002 Start of the Pattern Testing project.