要求批评C单元测试环境 [英] Requesting critique of a C unit test environment
问题描述
[首先,我为交叉发布道歉。我认为更广泛的受众可以从不同的有利位置进行批评。
单元测试是正式的一个组成部分。和敏捷
发展模式。唉,它涉及大量繁琐的b / b
劳动力。
有测试自动化工具,但有限的曝光率
我有,他们是昂贵的,合理的马车,并且需要编译器/目标
改编。
出于对两个中的两个的挫败感他们来自我自己。它的b $ b仪器方法完全基于对B
预处理器的严重滥用(在这方面它同样适用于C ++)。
我想问一下评估方法
- 它是否在意识形态或实施方面存在巨大漏洞
- 您认为它是否有优点>
初步描述草稿是
http://www.macroexpressions.com/dl/C...shoestring.pdf
参考具有可运行示例的实现(具有C99重音)在
http ://www.macroexpressions.com/dl/maestra.zip
如果您觉得方便,请回复新闻组或发送电子邮件。
感谢您的预期反馈,
- Ark
[First, I apologize for cross-posting. I just think a wider audience can
critique from different vantage points.]
Unit testing is an integral component of both "formal" and "agile"
models of development. Alas, it involves a significant amount of tedious
labor.
There are test automation tools out there but from what limited exposure
I''ve had, they are pricey, reasonably buggy, and require compiler/target
adaptation.
Out of my frustration with two out of two of them came my own. Its
instrumentation approach is based solely on profound abuse of the C
preprocessor (and in this respect it is equally applicable to C++).
I would like to ask to evaluate the approach
- whether it has gaping holes in ideology or implementation
- whether in your opinion it has merits
A preliminary draft description is at
http://www.macroexpressions.com/dl/C...shoestring.pdf
A reference implementation (with a C99 accent) with a runnable example is at
http://www.macroexpressions.com/dl/maestra.zip
Please reply to a newsgroup or via email as you find convenient.
Thank you for your anticipated feedback,
-- Ark
推荐答案
Ark Khasin写道:
Ark Khasin wrote:
[首先,我为交叉发帖道歉。我认为更广泛的受众可以从不同的有利位置进行批评。
单元测试是正式的一个组成部分。和敏捷
发展模式。唉,它涉及大量繁琐的b / b
劳动力。
有测试自动化工具,但有限的曝光率
我有,他们是昂贵的,合理的马车,并且需要编译器/目标
改编。
出于对两个中的两个的挫败感他们来自我自己。它的b $ b仪器方法完全基于对B
预处理器的严重滥用(在这方面它同样适用于C ++)。
我想问一下评估方法
- 它是否在意识形态或实施方面存在巨大漏洞
- 您认为它是否有优点>
为什么不使用CppUnit之类的免费框架呢?
它适用于两个C(有点像小摆件一样你在你的
论文中为静态和C ++做了什么。我确定这同样适用于其他
框架。
-
Ian Collins。
Why not just use one of the free frameworks such as CppUnit?
It works well with both C (with a little fiddling like you do in your
paper for "static") and C++. I''m sure the same applies for other
frameworks.
--
Ian Collins.
Ian Collins写道:
< snip>
Ian Collins wrote:
<snip>
为什么不直接使用CppUnit之类的免费框架?
它适用于两个C(带有就像你在
论文中为静态和C ++所做的那样小小的摆弄。我确定这同样适用于其他
框架。
Why not just use one of the free frameworks such as CppUnit?
It works well with both C (with a little fiddling like you do in your
paper for "static") and C++. I''m sure the same applies for other
frameworks.
Ian,
谢谢你的支持回复。
如果我错了请纠正我,但是AFAIK CppUnit没有提供
代码执行跟踪,所以它非常棒难以证明代码覆盖率。
[测试工具供应商必须有足够的理由来获取大笔资金。]
此外,如果我在非C ++中使用C兼容的方式(例如暂定的定义),
我的来源甚至不会为CppUnit编译。
最后还有一个端口问题(它'''是嵌入式的说话:))。我建议只需要编译器的东西。
问候,
方舟
Ian,
Thank you for your response.
Please correct me if I am wrong, but AFAIK CppUnit doesn''t provide a
code execution trace, so it''s pretty darn hard to prove code coverage.
[There must be reasons why testing tools vendors command big money.]
Also, if I use C in non-C++ compatible way (e.g. tentative definitions),
my source won''t even compile for CppUnit.
And finally there is a port issue (it''s an embedded type talking :)). I
am proposing something that requires only the compiler.
Regards,
Ark
Ark Khasin写道:
Ark Khasin wrote:
Ian Collins写道:
< snip>
Ian Collins wrote:
<snip>
>为什么不使用CppUnit之类的免费框架?
它适用于两个C(有点小摆弄)就像你在
论文中所做的那样静态和C ++。我肯定这同样适用于其他
框架。
>Why not just use one of the free frameworks such as CppUnit?
It works well with both C (with a little fiddling like you do in your
paper for "static") and C++. I''m sure the same applies for other
frameworks.
Ian,
感谢您的回复。 />
如果我错了请纠正我,但是AFAIK CppUnit没有提供
代码执行跟踪,因此证明代码非常难覆盖。
[必须有理由为什么测试工具供应商需要大笔资金。]
Ian,
Thank you for your response.
Please correct me if I am wrong, but AFAIK CppUnit doesn''t provide a
code execution trace, so it''s pretty darn hard to prove code coverage.
[There must be reasons why testing tools vendors command big money.]
如果你先开发软件测试,你会得到所有代码覆盖率
你需要。
If you develop your software test first, you get all the code coverage
you need.
另外,如果我以非C ++兼容的方式使用C(例如暂定的定义),
我的来源甚至不会为CppUnit编译。
Also, if I use C in non-C++ compatible way (e.g. tentative definitions),
my source won''t even compile for CppUnit.
如果你的意思是K& R风格的原型,不要使用它们。编写和编译
您在C ++中的测试和您在C中的代码。不要尝试使用C ++编译器编译您的C
。
If you mean K&R style prototypes, don''t use them. Write and compile
your tests in C++ and your code in C. Don''t attempt to compile your C
with a C++ compiler.
最后还有一个端口问题(它是一个嵌入式的说话:))。我建议只需要编译器的东西。
And finally there is a port issue (it''s an embedded type talking :)). I
am proposing something that requires only the compiler.
单元测试,开发和测试托管系统无关紧要。
如果您需要目标环境的一些部分,请模拟(模拟)它们。
-
Ian Collins。
Shouldn''t matter for unit testing, develop and test on a hosted system.
If you require bits of the target environment, mock (simulate) them.
--
Ian Collins.
这篇关于要求批评C单元测试环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!