|
What is Pattern Testing?
[
vmassol
]
Pattern Testing is the concept of automatically verifying the good application of architectural/design patterns in code. It uses AOP to perform this feat. Pattern Testing is a concept I started researching in 2002 on a big project at work. At that time, I was already using Checkstyle and PMD to perform verification of rules. However, I was finding them limited in several ways:
The result was the Pattern Testing project on SourceForge. It's implemented using AspectJ. It contains some pre-made Pattern Tests but more importantly it lets you write your own. There is Maven plugin that makes it easy to run any Pattern Test on any mavenized project. The possibilities of Pattern Testing are endless. Here's an example of a rule that says that we do not want to instantiate business classes (i.e. a class that extends BasicBC). That's because they are instantiated by factories/service managers:
I used Pattern Tests for some time on that project at work and then I changed job. I was still interested in the concept but with my other open source involvements I didn't take the time to work on it as much as I wanted. Thus it became a bit abandoned. However, these past weeks, I have found renewed interest in the concept for several reasons:
Are any of you using Pattern Testing too? I love this idea. And I think it's a great project. Problems like this are a lot . I am interested in the patterntest project. And I am going to do some research on it. --xufengbing, December 7, 2004 11:38 AM
Hai,
--siva, November 20, 2007 03:21 PM
Post a comment
|