opmock Icon


Mocking and unit testing tool for C and C++

4.4 Stars (9)
18 Downloads (This Week)
Last Update:
Download opmock-src-2.2.tgz
Browse All Files


Opmock is a mocking and testing tool for C and C++. It is useful if one wants to implement micro testing and TDD in a similar way of what exists in Java or C#. It is designed with legacy code in mind, and should work with all C++ and C compilers.

NEW : version 2.1 is out. Currently there are no binaries to download, please checkout the code from svn and compile from the sources.
You can checkout version 2.1 with the command:

svn checkout svn://svn.code.sf.net/p/opmock/code/tags/opmock2.1 opmock-code

Then read the updated docs in /documentation. Or just download the docs, read them and compile.

The current version is 2.1. This is a full rewrite of the 0.9x series. The 0.9x is still maintained for bug fixes, but new functionalities will go only in the 2.0 branch.

Have a look to the blog, the wiki and the download page for more information.

opmock Web Site


User Ratings

ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 3 / 5
Write a Review

User Reviews

  • 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    I used this tool to generate stub/mock files and it was very easy to use. I surfed around and tried some other tools but it was always some problem with them. But opmock2 actually worked out of the box.

    Posted 08/20/2013
  • 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    Opmock lacks a lot of functionality which is really needed when writing maintainable unit tests. I really miss the notion of a fixture and the ability to register a setup and teardown method that is supposed to run before and after each unit test. Assert statements with the ability to provide a custom error message is also missing, the user running the unit tests easily sees what is wrong. A small gui with filtering is also appropriate, the output is spawn to the console and when running many tests one might have to scroll several screens before the actual error is readable. All in all what is provided is pretty basic, with a little effort the caveats I mention here can be solved. But I am wondering if it is really worth your while to invest your time in it to: - keep maintaining it, clearly a one man job - use it, compared to other frameworks it looks a bit too minimal to me. answer Pascal reply of 2011 ;-) My comments were based on my experience with unit testing in other frameworks and based on some reading : the art of unit testing. My comments are correct, I still stand by them and are meant as positive criticism. I also used the wiki. Did you read it ? Fixtures are present in nearly all frameworks and are usefull. If it is a design choice not to support it, it is a poor design choice. I find myself doing workarounds this missing feature. Clear error messages are key for anyone having to look at the output of unit tests. The more to the point the better. If you look into this point alone. It is extremely easy to implement. Actually the small this framework might be, I found that this framework was indeed easy to learn and use. So, I'd like to see it improved furhter. But I was really wondering if this is worth it, being a one man job. Apparently the same is true for some other frameworks. not nunit anyway ;-) The value of a project like this, and it's success will be a matter of how much effort is continuously spent in it.

    Posted 03/07/2013
  • 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    merci beaucoup

    Posted 02/18/2013
  • 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    great app, works nicely

    Posted 01/23/2013
  • 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5

    opmock is fast and easy to use

    Posted 12/21/2012
Read more reviews

Additional Project Details

Intended Audience




Thanks for helping keep SourceForge clean.

Screenshot instructions:
Red Hat Linux   Ubuntu

Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Briefly describe the problem (required):

Upload screenshot of ad (required):
Select a file, or drag & drop file here.

Please provide the ad click URL, if possible:

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks