We help IT Professionals succeed at work.

Tool to do code coverage testing for MFC application.

shuklasunil
shuklasunil asked
on
1,035 Views
Last Modified: 2013-11-20
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.
Comment
Watch Question

evilrixSenior Software Engineer (Avast)
CERTIFIED EXPERT

Commented:
>>  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.

Author

Commented:
>>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?
Senior Software Engineer (Avast)
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
What about "Visual Studio Team System 2005 Code Coverage Tool"
evilrixSenior Software Engineer (Avast)
CERTIFIED EXPERT

Commented:
>> What about "Visual Studio Team System 2005 Code Coverage Tool"
This is not a tool I have used.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.