您可以向我提供哪些文档(、链接和建议)来创建测试库?
我正在考虑设计我自己的测试库(框架)->用 c++ 我想知道你们中的一些人是否已经设计了自己的(以及他们可以为我提供哪些好的建议和文档),决定不这样做(以及为什么),您对不同的现有测试框架有哪些批评(和争论)。
我不想再谈论测试框架设计了。 事实上,我有一些非常不同的东西要测试:
- 简单的单元测试
- MVC 和信号槽
- 数据,(特别是音频和 DSP)
- 性能
- 兼容性
“这么多东西......但时间这么少”
不,我真的需要测试很多不同的东西。 所以我查看了XUnit是如何设计的,以及Addison和W XUnit相关的书,还有关于代码项目的高级单元测试相关的文章...... 还有不同的文章,与同事讨论这个问题...... 最后,我想设计自己的。
为什么:
- 具体需求,
- 比如自己动手的方式(并了解为什么在现有框架中这样做,并且我不是一个天才......^^)
谢谢大家。
I'm thinking of designing my own Test library (framework) ->in c++
I am wondering if some of you have already designed there own (and what good advices, documentation they could offer me), decided to not do that (and why), What critics (and argue) you have against differents existing testing frameworks.
I want to no more about testing framework design.
In fact I have some pretty differents things to test :
- simple unit test
- MVC and signal slot
- data, (escpecially for audio and DSP)
- performance
- compatibility
"So much things ... and so few time "
No really I need to test a lot of different things.
So I checkout how is designed XUnit, and the Addison and W XUnit related book, also the Advanced Unit Testing related article on code project....
And different articles, discuss this with coworkers ...
And at the end, I want to design my own.
Why :
- specific needs,
- like the do it yourself way (and learn why it's done this way in existing frameworks and that I'm not a genious ... ^^)
Thank you all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我记得在 sourceforge 上读过一些关于 Cppunit 2 设计的讨论 维基。我会从这里开始。此外,Noel Llopis 探索了 C++ 单元测试框架丛林。
但是,你是说你想重新创建另一个框架,而你只剩下很少的时间了。我建议选择一个适合您单元测试需求的框架,看看它是否可以用于您的 MVC 和数据测试。此外,单元测试框架并不是为了运行性能测试而设计的。我建议遵循 Unix 哲学:做一件事并且做得很好的简单小工具。
I remember having read some discussions about Cppunit 2 design on the sourceforge wiki. I'd start from here. Also, Noel Llopis explored the C++ unit-testing framework jungle.
But, you're saying you want to re-create another framework and you only have few time left. I'd suggest picking one framework fitting your need for the unit tests, see if it can be used fore your MVC and data testing. Moreover unit testing framework are not designed to run performance tests. I'd recommend following the Unix philosophy here: simple little tools that do one thing and do it well.
在实施自己的框架之前,至少学习一种现有框架。我的经验是框架不是问题。学习如何编写好的单元测试是困难的部分。
多年来我使用过多个框架,包括 CxxTest、CppUnitLite 和 UnitTest++。但我的建议是 Google Test 与 Google Mock(Google Mock 附带了捆绑的 Google Test 副本)。
Learn at least one existing framwork before you implement your own. My experience is that the framework is not the problem. Learning how to write good unit tests is the hard part.
I have used several framworks through the years including CxxTest, CppUnitLite and UnitTest++. But my recommendation is Google Test together with Google Mock (Google Mock comes with a copy of Google Test bundled).