C++平台哪个单元测试工具最好用?

liujinxing 2008-10-29 10:14:11
C++平台哪个单元测试工具最好用?
cppunit?
purify?
其他?
各有什么好处?缺点?请指点一二
如果哪位再能共享点教材那就更好了 嘿嘿
...全文
894 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
minsplmm 2010-08-06
  • 打赏
  • 举报
回复
jieao111 2008-10-29
  • 打赏
  • 举报
回复
测试开发..我喜欢
beingstudio 2008-10-29
  • 打赏
  • 举报
回复
做了一年测试开发了

自我感觉写可测试化的代码最重要!
帅得不敢出门 2008-10-29
  • 打赏
  • 举报
回复
C++单元测试工具列表
http://www.cppblog.com/tx7do/archive/2006/08/14/11223.html
C/C++ unit testing tools (18 found)


Boost

http://www.boost.org/libs/test/doc/index.html

Description:

The Boost Test Library provides a matched set of components for writing test programs, organizing tests in to simple test cases and test suites, and controlling their runtime execution.

Requirement:


Download data:

No data feed available



C Unit Test System

http://sourceforge.net/projects/cut/

Description:

CUT is a simple, to-the-point unit testing system. It's different from other unit test packages in that it follows the KISS principle. It's designed for C testing, not designed to emulate SUnit.

Requirement:

OS Independent

Download data:

Downloadable files: 4744 total downloads to date




Check

http://check.sourceforge.net/

Description:

Check is a unit test framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs.

Requirement:

POSIX

Download data:

Downloadable files: 17934 total downloads to date




CppTest

http://cpptest.sourceforge.net/

Description:

CppTest is a portable and powerful, yet simple, unit testing framework for handling automated tests in C++. The focus lies on usability and extendability. Several output formats are supported and new ones are easily added.

Requirement:

OS Independent

Download data:

Downloadable files: 4445 total downloads to date




CppUnit

http://cppunit.sourceforge.net/

Description:

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML or text format for automatic testing and GUI based for supervised tests.

Requirement:

BeOS, MacOS, Windows, OS Independent, Linux

Download data:

Downloadable files: 293875 total downloads to date




cutee

http://codesink.org/cutee_unit_testing.html

Description:

C++ unit testing environment that makes it really easy to create and run tests of a library or application. It will automatically generate Makefiles, runner classes (classes that execute test functions), and main test application code. It will also automatically update Makefiles and support classes whenever you add new test functions or modify old ones.

Requirement:

UNIX

Download data:

Downloadable files: 9 total downloads to date




CUTest

http://cutest.sourceforge.net/

Description:

CuTest is a unit testing library for the C language.

Requirement:


Download data:

Downloadable files: 9356 total downloads to date




CxxTest

http://cxxtest.sourceforge.net/

Description:

CxxTest is a JUnit/CppUnit/xUnit-like framework for C++. Its advantages over existing alternatives are that it doesn't require RTTI, doesn't require member template functions, doesn't require exception handling, doesn't require any external libraries (including memory management, file/console I/O, graphics libraries) and is distributed entirely as a set of header files. This makes it extremely portable and usable.

Requirement:

OS Independent (Written in an interpreted language)

Download data:

Downloadable files: 26641 total downloads to date




Embedded Unit

https://sourceforge.net/projects/embunit/

Description:

Unit testing framework for Embedded C System. Its design was copied from JUnit and CUnit and more, and then adapted somewhat for Embedded C System.

Requirement:

OS Independent

Download data:

Downloadable files: 3933 total downloads to date




GUNit

http://kooditakomo.cs.tut.fi/projects/gunit/

Description:

GUNit is a C unit testing framework in the spirit of JUnit. The framework incorporates an easy to use GUI based on the Gnome libraries.

Requirement:

Linux

Download data:

No data feed available



ObjcUnit

http://oops.se/objcunit/

Description:

ObjcUnit is a unit testing framework for Objective-C on Mac OS X. Its design was copied from JUnit, written by Erich Gamma and Kent Beck, and then adapted somewhat for Objective-C. It also has support for mock objects, adapted from the Java Mock Objects framework.

Requirement:

Mac OS X

Download data:

No data feed available



OCUnit

http://www.sente.ch/software/ocunit/

Description:

OCUnit is a testing framework for Objective C in the Mac OS X, GNUSTEP and other environments. It is based on the original SUnit framework of Kent Beck, but also include a JUnit like API. Test suites are automatically created at runtime. On Mac OS X it provides full integration with the XCode IDE: tests can be run after each compilation and failures and errors are reported in the build panel.

Requirement:

Mac OS X, GNUstep, OPENSTEP or WebObjects 4

Download data:

No data feed available



QtUnit

http://www.uwyn.com/projects/qtunit/

Description:

QtUnit is a unit testing framework for C++ which compiles into a shared library. It uses the Qt library for platform independence. Tests can be compiled into modules which are automatically reloaded after modification. The text and graphical testrunners are fully localized and integrate perfectly into IDEs for the display of the exact source location where failures occurred.

Requirement:

Qt 3.0

Download data:

No data feed available



simplectest

http://simplectest.sourceforge.net/index.php

Description:

Aims to be a simple but effective testing framework for C and C++ projects, without having too much overhead.

Requirement:

Cygwin (MS Windows), OS Portable

Download data:

Downloadable files: 685 total downloads to date




Splint

http://www.splint.org/

Description:

Splint is a tool for statically checking C programs for coding errors and security vulnerabilities. If effort is invested adding annotations to programs, Splint can perform stronger checking than is possible with traditional lints.

Requirement:

Win32, Solaris, Linux, FreeBSD

Download data:

Downloadable files: 0 total downloads to date




TestKit

http://testkit.sourceforge.net

Description:

Testing framework for Mac OS X and the Objective-C language. Includes testing framework, developer tool integration, easy test organization and packaging, GUI Test Runner, and a command-line version for test automation. Modelled after JUnit, but targets the specific needs of the OS X developer in the Cocoa environment.

Requirement:

MacOS X

Download data:

Downloadable files: 1340 total downloads to date




TUT

http://tut-framework.sourceforge.net/

Description:

TUT simplifies tests organization and provides basic framework to run them. All developers have to do is to fill tests bodies with the actual test code.

Requirement:

C++

Download data:

No data feed available



UnitTest++

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

Description:

UnitTest++ is a unit testing framework for C++ designed for simplicity and portability. Features include no explicit test registration, good crash handling, fixtures, rich condition-checking functionality, minimal footprint for embedded environments.

Requirement:

Win32, Linux, Mac OS X

Download data:

Downloadable files: 1490 total downloads to date




For those projects hosted on SourceForge, the project activity data is updated weekly using live newsfeeds powered by CaRP

星羽 2008-10-29
  • 打赏
  • 举报
回复
转的 = =

C Unit Test System

http://sourceforge.net/projects/cut/

Description:

CUT is a simple, to-the-point unit testing system. It's different from other unit test packages in that it follows the KISS principle. It's designed for C testing, not designed to emulate SUnit.

Requirement:

OS Independent

Download data:

Downloadable files: 4744 total downloads to date

Check

http://check.sourceforge.net/

Description:

Check is a unit test framework for C. It features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs.

Requirement:

POSIX

Download data:

Downloadable files: 17934 total downloads to date

CppTest

http://cpptest.sourceforge.net/

Description:

CppTest is a portable and powerful, yet simple, unit testing framework for handling automated tests in C++. The focus lies on usability and extendability. Several output formats are supported and new ones are easily added.

Requirement:

OS Independent

Download data:

Downloadable files: 4445 total downloads to date

CppUnit

http://cppunit.sourceforge.net/

Description:

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML or text format for automatic testing and GUI based for supervised tests.

Requirement:

BeOS, MacOS, Windows, OS Independent, Linux

Download data:

Downloadable files: 293875 total downloads to date

cutee

http://codesink.org/cutee_unit_testing.html

Description:

C++ unit testing environment that makes it really easy to create and run tests of a library or application. It will automatically generate Makefiles, runner classes (classes that execute test functions), and main test application code. It will also automatically update Makefiles and support classes whenever you add new test functions or modify old ones.

Requirement:

UNIX

Download data:

Downloadable files: 9 total downloads to date

CUTest

http://cutest.sourceforge.net/

Description:

CuTest is a unit testing library for the C language.

Requirement:

Download data:

Downloadable files: 9356 total downloads to date

CxxTest

http://cxxtest.sourceforge.net/

Description:

CxxTest is a JUnit/CppUnit/xUnit-like framework for C++. Its advantages over existing alternatives are that it doesn't require RTTI, doesn't require member template functions, doesn't require exception handling, doesn't require any external libraries (including memory management, file/console I/O, graphics libraries) and is distributed entirely as a set of header files. This makes it extremely portable and usable.

Requirement:

OS Independent (Written in an interpreted language)

Download data:

Downloadable files: 26641 total downloads to date

Embedded Unit

https://sourceforge.net/projects/embunit/

Description:

Unit testing framework for Embedded C System. Its design was copied from JUnit and CUnit and more, and then adapted somewhat for Embedded C System.

Requirement:

OS Independent

Download data:

Downloadable files: 3933 total downloads to date

GUNit

http://kooditakomo.cs.tut.fi/projects/gunit/

Description:

GUNit is a C unit testing framework in the spirit of JUnit. The framework incorporates an easy to use GUI based on the Gnome libraries.

Requirement:

Linux

Download data:

No data feed available

ObjcUnit

http://oops.se/objcunit/

Description:

ObjcUnit is a unit testing framework for Objective-C on Mac OS X. Its design was copied from JUnit, written by Erich Gamma and Kent Beck, and then adapted somewhat for Objective-C. It also has support for mock objects, adapted from the Java Mock Objects framework.

Requirement:

Mac OS X

Download data:

No data feed available

OCUnit

http://www.sente.ch/software/ocunit/

Description:

OCUnit is a testing framework for Objective C in the Mac OS X, GNUSTEP and other environments. It is based on the original SUnit framework of Kent Beck, but also include a JUnit like API. Test suites are automatically created at runtime. On Mac OS X it provides full integration with the XCode IDE: tests can be run after each compilation and failures and errors are reported in the build panel.

Requirement:

Mac OS X, GNUstep, OPENSTEP or WebObjects 4

Download data:

No data feed available

QtUnit

http://www.uwyn.com/projects/qtunit/

Description:

QtUnit is a unit testing framework for C++ which compiles into a shared library. It uses the Qt library for platform independence. Tests can be compiled into modules which are automatically reloaded after modification. The text and graphical testrunners are fully localized and integrate perfectly into IDEs for the display of the exact source location where failures occurred.

Requirement:

Qt 3.0

Download data:

No data feed available

simplectest

http://simplectest.sourceforge.net/index.php

Description:

Aims to be a simple but effective testing framework for C and C++ projects, without having too much overhead.

Requirement:

Cygwin (MS Windows), OS Portable

Download data:

Downloadable files: 685 total downloads to date

Splint

http://www.splint.org/

Description:

Splint is a tool for statically checking C programs for coding errors and security vulnerabilities. If effort is invested adding annotations to programs, Splint can perform stronger checking than is possible with traditional lints.

Requirement:

Win32, Solaris, Linux, FreeBSD

Download data:

Downloadable files: 0 total downloads to date

TestKit

http://testkit.sourceforge.net

Description:

Testing framework for Mac OS X and the Objective-C language. Includes testing framework, developer tool integration, easy test organization and packaging, GUI Test Runner, and a command-line version for test automation. Modelled after JUnit, but targets the specific needs of the OS X developer in the Cocoa environment.

Requirement:

MacOS X

Download data:

Downloadable files: 1340 total downloads to date

TUT

http://tut-framework.sourceforge.net/

Description:

TUT simplifies tests organization and provides basic framework to run them. All developers have to do is to fill tests bodies with the actual test code.

Requirement:

C++

Download data:

No data feed available

UnitTest++

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

Description:

UnitTest++ is a unit testing framework for C++ designed for simplicity and portability. Features include no explicit test registration, good crash handling, fixtures, rich condition-checking functionality, minimal footprint for embedded environments.

Requirement:

Win32, Linux, Mac OS X

Download data:

Downloadable files: 1490 total downloads to date
baihacker 2008-10-29
  • 打赏
  • 举报
回复
cppunit比较出名吧...
redleaves 2008-10-29
  • 打赏
  • 举报
回复
一直以来比较怀疑单元测试的功效....尤其是在较大的工程里,很少有代码可以独立进行单元测试.与其构造一复杂的上下文环境来进行单元测试, 还不如在程序里多搞点ASSERT,VERIFY,LOG之类的东西进行白盒测试....
当然,比较单纯的数据处理也许可以用一下...
purify能进行单元测试?是不是我的知识有点老了...不知道它有这个功能..
我只知道C++Test可以进行自动的单元测试,但比较缺乏针对性...

65,211

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧