Click here to Skip to main content
15,888,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Could you please refer me UnitTestingTool which does 100% code coverage, also
it should give the report at the end : % of code covered.. No of Test cases failed and successfull..

Regards
Narayan Reddy.L
Posted
Comments
Keith Barrow 13-Feb-12 7:52am    
I think you should rephrase your question: Getting 100% coverage is a matter for the developer. I think what you are looking for are test frameworks, with something to provide metrics such as code coverage.
If you were using c# I'd be able to help, but I haven't used anything like this in c++, though I'm pretty certain such things do exist.

Boost unit test and CPP UNIT-LITE could do this for you.

Code coverage % is depend on developer who wrote the unit test cases.
Both of these framework provides details statistics for how many test were run, how many failed etc.
 
Share this answer
 
Unfortunately unmanaged C++ does not natively support Unit-tests. If you put some effort into your project structure and class definitions you can use testing frameworks such as boost::test (see link in solution 1), cppunit, or cppunitlite (links to the relevant pages should be easy to find)

I've looked at winunit[^] as well, and liked it best.:I think it's easy to use, and makes a better separation between functionality and testing frontend than any of the others. While the frontend is available as a binary, you can change the source code to adapt it to your own preferences.

If you're willing to shell out some cash (the above tools are all free), there are lots of testing tools to be had, but most of them only support NUnit-like interfaces. You'll still have to put some work into your code to make them usable by those testing tools.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900