全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Linux内核测试工具Autotest简介【Introduction】Autotest is a framework for fully automated testing. It is designed primarily to test the Linux kernel, though it is useful for many other purposes such as qualifying new hardware, virtualization testing and other general user space program testing under linux platforms. Its an open-source project under the GPL and is used and developed by a number of organizations, including Google, IBM, Red Hat, and many others.Testing is not about running tests . testing is about finding and fixing bugs. We have to: Run the tests Find a bug Classify the bug Hand the bugs off to a developer Developer investigates bug (cyclical) Developer tests some proposed fix (cyclical) Fix checked in New release issued to test team.So many test systems I see are oriented only around the first two (or even one!) steps. This is massively inefficient【Autotest vs Other harnesses】 ONE harness to do performance, stress, multi-machine testing, etc. 性能,压力,分布式测试 Consistent results & logging structure Web and CLI front end 网页前端控制测试用例 Web and CLI analysis backend 网页前端分析 Shared machine pool & scheduler EASY to write new tests: low entry barrier 易写新测试 Open source share tests with vendors 开源 Control files are powerful! Proven scaling 6000 machines+ 可控制机器数【setup】 直接从github上的stonekim/autotest 克隆下来,其中添加了新的功能测试用例可以不放在tests文件夹下,可在任意位置。git clone :stonekim/autotest.git 注意不安装也可使用,但若安装,需将项目中的commux文件夹copy到安装目录下。另外如有需要也须将可执行文件复制过去cd autotest/sudo python setup.py installsudo cp commux /setup/path/autotest【Usage Tutorial】 Run Client host(the result is in results folder)cd client/sudo ./autotest -verbose tests/sleeptest/control Run Server host(The Server host should ssh connect Client host without password ,instead of authorized keys)cd server/sudo ./autoserv -remote -m roothostaddress1,roothostaddress2 -c ./client/tests/sleeptest/control【Test Example】每个测试用例包含以下文件: An example control file (eg tests/mytest/control) A test wrapper (eg (tests/mytest/mytest.py) Some source code for the test (if its not all done in just the python script)1. control文件 :tests/sleeptest/controlA control file should define at the very top a set of variables. These are: AUTHOR TIME NAME TEST_CATEGORY TEST_CLASS TEST_TYPE SYNC_COUNT DOCexcept SYNC_COUNT are set to a string. SYNC_COUNT is a number which has relevance for the scheduling of multi-machine server side jobs. In addition you can define the variable EXPERIMENTAL (either True or False). By default it is False, but when set to True, will control whether the job shows up in the web frontend by default.2. python脚本文件: tests/sleeptest/sleeptest.py,类中一般包括以下几个方法,方法间的关系如图所示: initialize() - This is run before everything, every time the test is run. setup() - This is run when you first use the test, and normally is used to compile the source code. run_once() - This is called by job.run_test N times, where N is controlled by the iterations parameter to run_test (defaulting to one). It also gets called an additional time with profilers turned on, if you have any profilers enabled. postprocess_iteration() - This processes any results generated by the test iteration, and writes them out into a keyval. Its generally not called for the profiling iteration, as that may have different performance. postprocess() - DEPRECATED This is called once to do postprocessing of test iterations, after all iteration
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 酒店员工带教计划
- 2025年解除劳动合同并获得补偿金协议格式
- 土地增值收益分配优化
- 新QC七大手法简介教案
- 小班数学活动一样多教案
- 职业病防治知识培训版本教案
- 语文第一课教案
- 六年级下册英语UnitThereis教案
- 原创年《南方新课堂·高考总复习》生物必修细胞膜系统的边界细胞核系统的控制中心配套教案(2025-2026学年)
- 大班手工活动设计太阳帽教案(2025-2026学年)
- 2025国家公务员政治理论应知应会知识试题库与答案
- (2026年)中国老年肌少症诊疗专家共识解读课件
- 杭州商铺买卖合同范本
- 2025江苏苏大教服集团校园招聘笔试历年典型考点题库附带答案详解试卷3套
- 花知晓在日本市场的营销策略分析
- 雨课堂学堂云在线《运动与减脂塑形》单元测试考核答案
- 反渗透膜处理培训课件
- 人武部2025年终总结样本(3篇)
- 山西省旅游资源
- 抖音母婴行业当我遇见小小的你项目营销方案
- 【《自动杀鱼机的方案计算设计》14000字】
评论
0/150
提交评论