用C ++进行测试 [英] Testing in C++

查看:95
本文介绍了用C ++进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我被要求讲授C ++测试的短期课程。到目前为止

我已经使用了自己的测试类(从我看过的看起来似乎与bb $ b类似于升压单元测试类)。考虑到我有一个

有限的时间,这个小组的读者会认为这个课程有用吗?是提升的方式吗?


对不起,如果这是在这个组中的偏离主题。


非常感谢。

解决方案

nw写道:





我被要求教一门关于用C ++进行测试的短期课程。到目前为止

我已经使用了自己的测试类(从我看过的看起来似乎与bb $ b类似于升压单元测试类)。考虑到我有一个

有限的时间,这个小组的读者会认为这个课程有用吗?是推进的方式吗?



使用CppUnit进行测试驱动开发!


-

Ian Collins。


3月8日上午9:38,nw < n ... @ soton.ac.ukwrote:





我被要求教一个关于C ++测试的简短课程。到目前为止

我已经使用了自己的测试类(从我看过的看起来似乎与bb $ b类似于升压单元测试类)。考虑到我有一个

有限的时间,这个小组的读者会认为这个课程有用吗?是提升的方式去?



这篇文章有点陈旧(2004),但它比较了几个C ++单元

测试框架(包括Boost):

http://www.gamesfromwithin.com/artic ... 12 / 000061.html


dave_mikesell写道:


nw写道:


>

我被要求讲授C ++测试的短期课程。到目前为止
我已经使用了自己的测试类(从我看到的类似于升压单元测试类)。考虑到我有一个有限的时间,这个小组的读者认为这个课程有用吗?是提升的方式去?



尝试获取抽象测试用例,这对于

重构非常重要。读/实用单元测试/和/或/单元测试框架/。


并强调程序员编写测试_while_他们编写测试代码。

节省了大量的时间调试。


这篇文章有点陈旧(2004),但它比较了几个C ++单元

测试框架(包括Boost) ):

http:// www。 gamesfromwithin.com/artic...12/000061.html



是的,它平移我的NanoCppUnit,我告诉他他只是一个草图而不是

产品化了。然后他抱怨它只是一个草图,而不是产品化。


那篇文章是在Noel自己的UnitTest ++之前发布的,它带有一个

与NanoCppUnit有惊人的相似之处,这是在实验室使用的,我用
与Noel合作。

http://unittest-cpp.sourceforge.net/


和朋友一样...


但是,严肃的人,UnitTest ++是我最喜欢的C ++单元测试平台。它的测试

本身就是典范。


-

Phlip
http://www.greencheese.us/ZeekLand < - 不是博客!!!


Hi,

I have been asked to teach a short course on testing in C++. Until now
I have used my own testing classes (which from what I''ve seen seem
similar to the boost unit testing classes). Considering I have a
limited amount of time what do readers of this group think would be
useful to cover in this course? Is boost the way to go?

Sorry if this is off-topic in this group.

Many Thanks.

解决方案

nw wrote:

Hi,

I have been asked to teach a short course on testing in C++. Until now
I have used my own testing classes (which from what I''ve seen seem
similar to the boost unit testing classes). Considering I have a
limited amount of time what do readers of this group think would be
useful to cover in this course? Is boost the way to go?

Test Driven Development with CppUnit!

--
Ian Collins.


On Mar 8, 9:38 am, "nw" <n...@soton.ac.ukwrote:

Hi,

I have been asked to teach a short course on testing in C++. Until now
I have used my own testing classes (which from what I''ve seen seem
similar to the boost unit testing classes). Considering I have a
limited amount of time what do readers of this group think would be
useful to cover in this course? Is boost the way to go?

This article is a bit dated (2004), but it compares several C++ unit
testing frameworks (including Boost):

http://www.gamesfromwithin.com/artic...12/000061.html


dave_mikesell wrote:

nw wrote:

>Hi,

I have been asked to teach a short course on testing in C++. Until now
I have used my own testing classes (which from what I''ve seen seem
similar to the boost unit testing classes). Considering I have a
limited amount of time what do readers of this group think would be
useful to cover in this course? Is boost the way to go?

Try to get as far as Abstract Test Cases, which are super-important for
refactoring. Read /Pragmatic Unit Testing/ and/or /Unit Test Frameworks/.

And emphasize programmers write tests _while_ they write the tested code.
That saves a lot of time debugging.

This article is a bit dated (2004), but it compares several C++ unit
testing frameworks (including Boost):

http://www.gamesfromwithin.com/artic...12/000061.html

Yeah, it pans my "NanoCppUnit", which I _told_ him was just a sketch and not
productized yet. Then he complains it''s just a sketch and not productized.

And that article came out before Noel''s own UnitTest++, which bears a
striking resemblance to NanoCppUnit, which was in use at the lab where I
worked with Noel.

http://unittest-cpp.sourceforge.net/

With friends like that...

But, seriously folks, UnitTest++ is my favorite C++ unit test rig. Its tests
for itself are exemplary.

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!


这篇关于用C ++进行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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