Daniel A. White
Daniel A. White

Reputation: 190942

Unit testing CLI/MFC Application

I have CLI/MFC application and I would like to begin to learn how to unit test with it. I have VS2008 Pro. If possible, I would like to use the built in unit testing. Thanks for your input!

Upvotes: 2

Views: 1677

Answers (3)

Aidan Ryan
Aidan Ryan

Reputation: 11599

If you have Team Test edition, you can use it to test C++/CLI applications and libraries. See here.

Upvotes: 0

Colin Desmond
Colin Desmond

Reputation: 4854

We use Gallio & MbUnit to test our MFC & C++/CLI application. Simply write the tests in C++/CLI then you can test both managed and unmanged code in a single framework. We also use NMock2 for mocking the managed code.

Upvotes: 0

ctacke
ctacke

Reputation: 67178

I've had success with both CPPUnit and Google Test. For either you have to do a bit of work to get the test results to integrate back into Studio. The granularity of the results you want directly affects how much work. Do you want a pass/fail for the whole test set, or individual results? The former is a simple msbuild task, the latter requires outputting the result set to XML, massaging that with a transform, then pulling it back in.

Upvotes: 3

Related Questions