maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Sellers <jim.sell...@gmail.com>
Subject Re: adding a listener for junit 4 tests
Date Sat, 20 Jun 2009 03:45:15 GMT
If anyone stumbles on this in the future, I ended up solving my issue by
just using aspectj to weave around HttpSession.setAttribute(..).  I
documented my full sets so that by building a small (2-3 files) jar, and
some changes to our corporate pom, I can now test clustering issues on all
our apps.

http://www.beernut.ca/jim/archives/005157.html

Jim


On Thu, Jun 11, 2009 at 10:12 PM, Jim Sellers <jim.sellers@gmail.com> wrote:

> Hi all.
>
> In the docs for surefire's testng, it talks about using different listeners
> when running surefire.
> http://maven.apache.org/plugins/maven-surefire-plugin/examples/testng.html
>
> Is there a similar function that could be used with junit 4.4?
>
> Background for the problem I'm trying to solve:
> I am trying to put in some AOP code that will intercept calls to
> HTTPSession.setAttribute(...).  Using this we will be able to verify that
> any code being put into session is serializable.  Also, for any object that
> implments HTTPSession, we'll trap the state of the object being set (using
> HashcodeBuilder to generate a hash), and then at the end of the test verify
> the the object in our mock session has not changed (has the same hashcode).
> In this way we are hoping to add a listener and be able to verify if an
> application is clusterable without a tedious class by class inspection.
>
> Thanks for your time!
> Jim
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message