Tuesday, June 9, 2009

TestNG and EasyMock

Unit Testing is pretty cool once you get a hang of it and have the right tools to play with it. I started using TestNG and EasyMock recently. TestNG has this neat feature that allows us to partition the tests as unit, integration etc. EasyMock is not as easy but not bad.

Some problems I faced with unit testing were that sometimes a single unit test would run fine when they run from eclipse, but when the suite is run on CI they would fail. Most of the times the problem was that a easymock object was created and reused in its stale state

No comments:

Post a Comment