Avatar of shuklasunil
shuklasunil
 asked on

Tool to do code coverage testing for MFC application.

I am looking for a tool to do code coverage testing for my MFC application. I am new to this and I am exploring cppunit, I feel cppunit is not right for MFC because I need to do coding in main to execute the each functionality test case.
System Programming

Avatar of undefined
Last Comment
evilrix

8/22/2022 - Mon
evilrix

>>  am looking for a tool to do code coverage testing for my MFC application
Do you mean unit testing? Coverage testing is something different, although related, whereas you test what coverage your unit tests are giving you. Ideally you want as much coverage as possible. A tool to test coverage would be something like bullseye.
http://www.bullseye.com/

>> I feel cppunit is not right for MFC because I need to do coding in main to execute the each functionality test case.
Why not have a special build of your code just for doing testing, where you include the code required to set up cppunit if a special precompile macro is defined in the project. Normal build wouldn't include this. Most test frameworks will require you to set up before testing. Ordinarily, I code solutions so all the business login is in a DLL and the EXE is just a thin wrapper for the DLL. This way I don't need to test anything in the exe and I can then have a separate test harness that is used to execute the unit tests.

shuklasunil

ASKER
>>Do you mean unit testing?
No I meant functionality test, I want to know code coverage when we do finctionality test. Does Microsoft has it own code coverage tool?
ASKER CERTIFIED SOLUTION
evilrix

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
shuklasunil

ASKER
What about "Visual Studio Team System 2005 Code Coverage Tool"
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
evilrix

>> What about "Visual Studio Team System 2005 Code Coverage Tool"
This is not a tool I have used.