Sunday, February 01, 2009

JUnit mock frameworks

The main reason for using mock objects to write unit tests is so that they are unit tests. Without mock implementations, unit tests quickly become integration tests, which are much more costly and time-consuming.

Here is my ranking list for Java mock frameworks (supporting JUnit, TestNG) :

1/ PowerMock

2/ EasyMock

3/ Mockito

4/ FEST-mocks

5/ jMock

Which is the best mock framework to you ?

No comments: