An Old Evaluation of Java Mock Frameworks

I was recently researching various mock frameworks for Java. We settled on mockito. I will post more on mockito at another time.

As I was reading about JMock and EasyMock, I had a sense of deja vu. I came across the following report my team developed over 3 years ago. It appears that the report still appears correct:

Feature JMock EasyMock
Special Test Case Class MockObjectTestCase Not Required
Documentation Decent Very good
Test Method Identification String Actual Method
Arguments matcher – i.e. the way we specify how arguments passed should be matched Hard to use but extremely flexible. Easy to use. Less flexible. But it is possible to create our own argument matchers if the need arises. Since in most cases, we don’t need to use complicated argument matchers this should not be a limitation.
Code completions, Refactorings etc Hard since the actual interface is not used in specifying the mock criteria Works well with most IDEs since the actual interface is used
Ease of use and understanding The expectation setting phase in JMock resembles a specification very closely. But it is cumbersome to have to remember so many method calls and write this explicitly. EasyMock is very easy to use since the actual method is called with the correct parameters during the expectation setting phase of preparing the mock. Since 2.2, EasyMock has become much more literate also with effective use of generics and static imports. – Is there a good tester certification?

The following is my response to a question on the now-defunct The question was "Is there a good tester certification?" and my answer:

Good for whom?

This tends to be a loaded question with almost religious fervor. Several industry notables have come out strongly against certifications. James Bach posted his objections in a compelling argument. It is a good place to start for the anti-certification argument.

Good for Employers?

As a hiring manager, I have only seen people with certifications listed on their resumes a couple of times. It was an indication that perhaps these individuals are taking an interest in their careers more than just a job. Did the certification sway my opinion of the applicants? No. Just a minor data point.

Good for the Tester?

I do think there can be good from getting a certification for the tester. However, that good does not come from getting the paper that says they are certified. The good comes from reviewing the requirements for the certification, identifying gaps in one’s knowledge, deciding whether it would be good to fill in that gap – it might not, and learning something new so it can be applied to the day to day job.

Good for the Certification Body?

Almost definitely. The certification body gains strength with the number of people who get certified. There have been examples of certifications which are really a mechanism to sell training. It is important to look at the certification body and what their motives are. What is good for the certification body is not necessarily good for the tester nor for an employer.

What is one to do?

First – look at what the certification covers:

Second – Where are you strong? Where are you weak? Are the weaknesses areas where improvement will help you personally and professionally?

Third – Identify for learning and how to fill in the gaps you care about.

Fourth – Decide whether the certification has meaning to you. For some people, working towards the certification is the motivation they need to fill in the gaps.

In any case, if you can speak to the various points covered in a certification and can provide real world example where you have applied the areas of knowledge, you will be able to convince an employer you know your stuff.


January 2012 mensming Twitter Posts

Follow mensming on Twitter

What is the value of SAS70 data center audits? – AICPA Fumbles Audit Standards at the 5-Yard Line –
27 Jan

Posted to – Twist #79 – Interviewing Testers, Part II –
26 Jan

How ‘State of the Union’ Speeches Changed Over Time
26 Jan

Use This Infographic to Pick a Good, Strong Password
25 Jan

Finished reading _Lord of the Files: Essays on the Social Aspects of Software Engineering_ by Russell Ovans –
24 Jan

Drive to remove unused code in LibreOffice –
23 Jan

Brush up on your command line skills – Windows Server 8: Server Applications and the Minimal Server Interface –
20 Jan

Do You Really Need a Password You Can Barely Remember? –
19 Jan

7 Essential CSS3 Tutorials For Web Developers
18 Jan

The Cowboys’ ‘Unsweet 16’ –
17 Jan

Just finished reading _We Are All Weird_ by Seth Godin:
16 Jan

Posted to – TWiST #78 – Interviewing Testers, Part I –
13 Jan

Why didn’t Harry Potter just use Google? – /
13 Jan

If William Shakespeare wrote an Apple rumor blog
12 Jan

There was a time when I would have been looking forward to this – FreeDOS 1.1 released after 17 years –
11 Jan

Interesting view of "Facebook Production Bugs" –
10 Jan

Posted to – The Sherpas of Testing Success: Studies of Successful Independent Test Groups
9 Jan

Google Recruiter Reveals The Biggest Mistake Job Candidates Make
9 Jan

Posted to – TWiST #77 – Test is Dead, Part II
7 Jan

10 great Evernote tips for business | TabTimes
6 Jan

Finished reading _Effective Java (2nd Edition)_ by Joshua Bloch –
5 Jan

Attack Tool Released for WPS PIN Vulnerability | threatpost
4 Jan

RT @petershankman – Important: How can the world end in 2012 when Marty McFly traveled to 2015?? Something doesn’t add up.
3 Jan

QR Code Malware Picks Up Steam – Dark Reading
3 Jan

Posted to – TWiST #76 – Test is Dead, Part I –
2 Jan

Quality Coding Takes A Break For The Holidays. But Why? | threatpost
2 Jan

Posted to – TestCast – Show #10 Testing is Dead
1 Jan


December 2011 mensming Twitter Posts

Follow mensming on Twitter

@Delta currently on my way to New Orleans via Memphis for my 20 th wedding anniversary
27 Dec

Plastic SCM blog: The version control timeline
23 Dec

Cisco says 70% of young workers ignore IT rules – Puget Sound Business Journal
22 Dec

Facebook Is Making Us Miserable
21 Dec

GPL, copyleft use declining faster than ever | ITworld
20 Dec

Java To Be Removed from Ubuntu, Uninstalled from User Machines
19 Dec

Posted to – Software Testing: Five Trends Affecting Testing – Five Years Later –
18 Dec

Posted to – TWiST #75 – A Five-Part Testing Meal, Part II –
18 Dec

Visualizing a Year of Extreme Weather | Surprising Science
16 Dec

Teens and the cruel world of social networking |
15 Dec

The Done Manifesto Lays Out 13 Ground Rules for Getting to Done
14 Dec

Even Calvin and Hobbes Joined the #OccupyFrontLawn Movement
13 Dec

My son matches this – Elderly driving longer than ever, young starting to drive later than ever?
12 Dec

Posted to – TWiST #74 – A Five-Part Testing Meal, Part I –
10 Dec

Matches my experience: Truth about test plan document & test case document
9 Dec

10 Proven Strategies of High-Performance Teams [INFOGRAPHIC] –
8 Dec

What should I change?-If You’re Busy, You’re Doing Something Wrong: The Surprisingly Relaxed Lives of Elite Achievers –
7 Dec

DARPA’s Almost-Impossible Challenge to Reconstruct Shredded Documents: Solved
6 Dec

Posted to – TWiST #73 – Live from STPCon –
5 Dec

Chrome Usage Surpasses Firefox for the First Time
5 Dec

‘Brick’ breaker: Lego bible too racy for Sam’s Club –
4 Dec

Separating Fact from Hype on Mobile Malware –
2 Dec

Is anyone surprised? – Lying is more common when we email –
1 Dec