单元测试工具-具有100%的代码覆盖率. [英] Unit Testing Tool - with 100% code coverage..

查看:353
本文介绍了单元测试工具-具有100%的代码覆盖率.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



您能否请我参考UnitTestingTool,它也可以实现100%的代码覆盖率
它应该在最后给出报告:涵盖的代码百分比.测试用例没有成功失败..

问候
Narayan Reddy.L

解决方案

Boost单元测试 CPP UNIT-LITE 可以为您做到这一点. br/>
代码覆盖率%取决于编写单元测试用例的开发人员.
这两个框架都提供了详细统计信息,用于运行了多少测试,有多少失败等.


^ ]
我看过 winunit [ ^ ],也最喜欢它.:我认为它易于使用,并且在功能和测试前端之间实现了比其他任何方法更好的分离.尽管前端以二进制形式提供,但是您可以更改源代码以使其适应自己的喜好.

如果您愿意花一些钱(上述工具都是免费的),则可以使用许多测试工具,但其中大多数仅支持类似NUnit的接口.您仍然需要在代码中进行一些工作,以使它们可以被那些测试工具使用.


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

解决方案

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.


http://www.boost.org/doc/libs/1_35_0/libs/test/doc/index.html[^]


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.


这篇关于单元测试工具-具有100%的代码覆盖率.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆