Download presentation
Presentation is loading. Please wait.
Published byTheodore Sherman Modified over 9 years ago
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/googlemo ck/ mockpp :http://linux.softpedia.com/get/Pro gramming/Quality-Assurance-and- Testing/Mock-Objects-for- Cplusplus-6035.shtml
5
下一代构建工具 http://www.scons.org/ ( 研 发院应用) 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/cpp lint/ FlawFinder Splint http://www.splint.org/
10
代码复杂度度量 + 代码行统计 复杂度 cppncss http://cppncss.sourceforge.net/ 圈复杂度 >10 ,代码风险高 代码行统计 cccc : http://cccc.sourceforge.net/
11
调用栈 pstack strace/lstrace Mstrace Calltree http://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
系统级测试框架 DejaGNU http://www.gnu.org/s oftware/dejagnu/ (基于 Expect ,因而 基于 Tcl ) QMTest http://www.codesource ry.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
24
未来规划 -- 难于串联 local build Auto check in test Auto unit test Auto bvt test Auto code cloverage Auto rule check Auto daily test
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.6 http://linux.softpedia.com/get/Programming/Quality-Assurance-and-Testing/Automated-Testing- Framework-30068.shtml http://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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.