Does Microsoft fakes framework support c++/unmanaged code - c++

We are developing unit tests for already existing code in c++. In the recent TechEd heard about Microsoft fakes framework for unit test isolation. But the TechEd video does not show that it is supported for c++ or not. No such this is said on msdn as well. But all examples on msdn is for c# and VB.
Does anyone know if it is supported or not. If not what framework would you recommend for already existing c++ code which is not developed with unit testing in mind.

So, finally microsoft responded to the question and the conclusion is, fakes does not support c++/unmanaged code.
https://connect.microsoft.com/VisualStudio/feedback/details/890349/does-microsoft-fakes-framework-support-c-unmanaged-code

Related

Concolic Testing of c programs

I have been given a project to create a concolic testing framework for testing c programs. i found that CUTE and DART implement concolic testing. But they are not available for download. I completely understand the way concolic testing works but I am not able to implement it at system level. Can someone help? I need help regarding on how to extract components/functions of a c program, test them concretely and symbolically and hit possible errors in the program.
CREST is an open-source implementation of concolic testing.
CATG and Jalangi are open-source implementations of concolic testing for Java and JavaScript programs, respectively.

Automated Unit Testing of C++

Is there any way to generate automated unit test cases for c++ code written using VS2005. I do some basic R&D and found that there is a support for automated testing in VS2005 but its only for Managed Code, so i am looking for something specific to:
"Automatic generation of Test cases of Native C++ Code"
It doesn't matter whether its a plug-in that works with VS2005 or any standalone application. But it is preferred to have some plug-in sort of solution.
I can't tell if you are asking about a unit testing framework (if yes, try cppUnit), or if you really want tests code-generated. If the latter, I imagine the answer is no. Usually a capability like that is linked to reflection and/or built-in design-by-contract capabilities (e.g Eiffel or C# with .net 4.0).

It is possible/productive enough to TDD in C++ projects?

I want to know if anyone of you guys use TDD in your c++ projects and how it performs compared to managed languages like C# and Java.
And what frameworks you guys are using to automate tests on c++ projects?
Two useful C++ test frameworks that don't seem to have been mentioned yet are Boost test and Google Test.
Test Driven Development is possible in any language. You need the right testing tools and methodologies for the language, and may possibly need a custom testing infrastructure for your project.
I have found CppUnit (at least 1.x) to be a very poor framework -- it seems to use Java/C# idioms in a C++ language and does not have support for STL constructs.
If you want a good example of Test Driven Development (in C), look at the Wine project -- http://test.winehq.org/data/ shows their test results across the different versions of Windows, Wine and the different commits into the Wine repository. They have their own custom test infrastructure.
I recently moved from a C# project that was developed using TDD to a project that is using C++. I was dreading it quite a bit, but I find that doing C++ with TDD is a lot more enjoyable and the code is more robust than I remember from past (non-TDD) experiences with C++.
We are using Google Test. It is not as easy to use as NUnit/MbUnit, but it seems to work pretty well. There is also a Google mocking framework http://code.google.com/p/googlemock , but I have not been using that yet.

C++ Unit-Testing Framework for z/OS (IBM Mainframe)

Does anyone know of a C++ unit-testing framework (e.g. CppUnit, Google Test, etc.) that can be used to write tests on z/OS?
I do most of my development on Windows using the Dignus C++ compiler, which you can use as a cross-compiler and generate object code to run on z/OS. I tried writing a sample test using Google Test, but the compiler could not compile/link the Google Test code. Google Test does not claim to support z/OS, so this was expected. But, it was worth a try!
Thanks so much for any responses this!
Try CPP Unit Lite (by CppUnit's author). It uses fairly straightforward C++ code, there's a good chance it'll work on z/OS's compiler.
I know I'm late to the party here but for anybody interested in C++ testing frameworks on z/OS I highly recommend the Catch framework which IMO easily surpasses all other C++ testing frameworks I've used. I've been using it on z/OS for about 6 months and it's a breath of fresh air. It's very easy and intuitive to use and has support for Behavior Driven Development (BDD) style tests which is a contemporary way of writing test cases.
It's header only and doesn't rely on any C++11 features which is common pitfall when trying to build modern libraries/frameworks on z/OS as the C++ compiler has limited C++11 support.
The only nit I can think of is compiles take a while because it's a header only library. But nowhere near as long as boost.
Perhaps you could open a bug report for Google Test and see if they fix it? There is probably an ASCII dependency in the code somewhere that caused the test code compile to fail. Could you dig into the error message that the IBM compiler produced?

Google Mock for iPhone development?

I have an interesting situation where I am refactoring a bunch of ObjC iPhone code to create a C++ API. I'm a novice to C++ and looking into C++ mocking frameworks to augment the work I'd done using OCUnit and poor man's mocks. I ran across googlemock and wanted to know if anyone has ever used it for iPhone development? Also, how can I share this (or mockpp) with other devs as it is an installable package and doesn't seem to lend itself to checking into a repository?
I've never used Googlemock for iPhone development, but have used it plenty on Windows and various UNIXes.
It uses standard modern C++ with TC1 (Technical Corrigenda 1) so can compile on any up to date, compliant compiler.
If your development environment doesn't implement TC1, then Google also include a subset of the Boost library that implements Tuples, which is the part of TC1 that Googlemock depends on.
Basically, if your compiler can handle templates, it should be able to handle Googlemock.
You can download the full source from Googlecode and this is what you might want to check into your repository.
For the Objective-C code you might consider Kiwi (http://www.kiwi-lib.info/mocks_and_stubs.html). It is a great bdd framework with nice mock/stub support.