1 / 26

Linux c/c++测试工具

Linux c/c++测试工具. 梁剑钊. UED Team Design. 大纲. 单元测试框架 mock 构建 / 管理工具 冒烟测试服务器 静态代码检查工具 代码复杂度和代码行数统计 调用栈工具 性能 分析工具 内存检测工具 IO测试工具 网络监控工具 代码覆盖率工具 Linux test suites 文档生成 规划. 单元测试框架 gtest> Apsara>cppunit. Google gtest

manning
Download Presentation

Linux c/c++测试工具

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux c/c++测试工具 梁剑钊 UED Team Design

  2. 大纲 • 单元测试框架 • mock • 构建/管理工具 • 冒烟测试服务器 • 静态代码检查工具 • 代码复杂度和代码行数统计 • 调用栈工具 • 性能分析工具 • 内存检测工具 • IO测试工具 • 网络监控工具 • 代码覆盖率工具 • Linux test suites • 文档生成 • 规划

  3. 单元测试框架gtest> Apsara>cppunit Google gtest Apsara unit: 研发院自主研发,可产生报表/流程(check in ->build->run unit tet ->if failed mail ) Cppunit boost::test Cxxunit tut

  4. mock • Googlemock: http://code.google.com/p/googlemock/ • mockpp :http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/Mock-Objects-for-Cplusplus-6035.shtml

  5. 下一代构建工具 http://www.scons.org/ (研发院应用) 目标: c/c++的maven Automake/conf CMake:http://www.cmake.org/ No makefile 依赖管理管理不清晰 语法不清晰

  6. 自动构建管理工具http://buildbot.net/

  7. Buildbot+Apsara自动化邮件

  8. Smolder-smoke test server-http://sourceforge.net/projects/smolder/

  9. 静态代码检查工具 Cppcheck (商务搜索+平台测试qa应用) 准确率很高 漏测率较高 Cpplint: http://google-styleguide.googlecode.com/svn/trunk/cpplint/ FlawFinder Splint http://www.splint.org/

  10. 代码复杂度度量+代码行统计 • 复杂度 cppncsshttp://cppncss.sourceforge.net/ • 圈复杂度>10,代码风险高 • 代码行统计cccc : http://cccc.sourceforge.net/

  11. 调用栈 pstack strace/lstrace Mstrace Calltreehttp://linux.softpedia.com/progDownload/calltree-Download-971.html

  12. 性能分析工具 Gprof/graphviz/gprof2dot (B2B) Rational Purify(商业) Intel vtune (支持本地/远程分析 only intel cpu) TAU is a C++ profiling, tuning, and analysis

  13. 性能分析工具 Google performance tools

  14. profile • 集团 Profiling system

  15. 内存检测 Valgrind(b2b/asc) Memwatch Purify(商业) catchesegv, libSegFault.so

  16. IO测试 Iotest(delica项目) vdbench (运维部) IOMeter Bonnie IO

  17. 网络监控 Sar –n DEV tcpdump  -A -X   src 10.2.6.29   and port 8080 Ethereal sniffer

  18. 系统级测试框架 • DejaGNUhttp://www.gnu.org/software/dejagnu/(基于Expect,因而基于Tcl) • QMTest http://www.codesourcery.com/qmtest/(基于Python)

  19. 代码覆盖率工具 gcov/lcov

  20. Intermediate Coverage Goals

  21. linux test suites-LTP • http://ltp.sourceforge.net/

  22. Review Board-http://www.review-board.org/

  23. doxygen • doxygen

  24. 未来规划--难于串联 local build Auto rule check Auto check in test Auto daily test Auto unit test Auto bvt test Auto code cloverage

  25. 参考 http://grd.alibaba-inc.com/projects/grd http://www.slideshare.net/mpeters/smolder-and-buildbot-presentation http://conferences.mongueurs.net/yn2008/talk/967 http://www.slideshare.net/mpeters/smolder-introduction http://www.slideshare.net/jza/buildbot-bigger-better-buildier http://ltp.sourceforge.net/ http://www.diybl.com/course/6_system/linux/Linuxjs/2008727/134082.html http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/ http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/TAU-1363.shtml Automated Testing Framework 0.6http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/Automated-Testing-Framework-30068.shtml http://search.cpan.org/~wonko/Smolder-1.35/lib/Smolder/Manual.pm http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/Mock-Objects-for-Cplusplus-6035.shtml http://ltp.sourceforge.net/test/ http://www.bullseye.com/coverage.html#intro http://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/Invoking-Gcov.html#Invoking%20Gcov http://www.javaranch.com/journal/2004/01/IntroToCodeCoverage.html http://en.wikipedia.org/wiki/Code_coverage http://ltp.sourceforge.net/coverage/lcov.php http://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov http://linux.die.net/man/1/lcov

  26. END END

More Related