The company I work for recently added Linux to our work environment and we need a good unit testing framework for c++. We tried Gmock from google but it's not so user-friendly. I have done a little research and found Parasoft's C++ test, and Typemock's Isolator++. Which one do you recommend?
-
Welcome to Software Recommendations. Can you please give more details what your requirements are? What are the "must have" requirements? – Florian May 23 '18 at 11:43
-
The most important thing for us is that the mocking framework will be user-friendly – Ilan Greenberg May 24 '18 at 7:25
-
1The user-friendly part really depends on your environment. Do you use CMake, Jenkins, etc.? What is your current unit testing framework? What exactly was the problem with Gmock? At the moment I understand your question like "which C++ unit testing frameworks are the most popular right now and why", because it looks like your not only searching for a mocking environment but also for a C++ testing framework. – Florian May 24 '18 at 8:44
-
We use Jenkins and we tried Google Test with Gmock. Google Test was great as a unit testing framework, but we had some problems with Gmock since it was not user-friendly. I learned that Isolator++ is integrated with Google Test. Have you tried it by any chance? Do you know if C++ Test is integrated with Google Test? – Ilan Greenberg May 24 '18 at 10:37
As a mocking framework I use hippomocks
. It can be combined with any unit testing framework.
The advantage is that it's a header only framework that does the mocking part during runtime (no pre-build steps required). The down-side is it works only in Intel based architectures.
What I really like is that it also allows to mock static functions.
References