


下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、.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 pla
2、tforms. It's 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
3、 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 ma
4、ssively 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 &
5、; 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 git:stonekim
6、/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·
7、; 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/con
8、trol)· A test wrapper (eg (tests/mytest/mytest.py)· Some source code for the test (if it's 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· TE
9、ST_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
10、 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 t
11、est, 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.·
12、; postprocess_iteration() - This processes any results generated by the test iteration, and writes them out into a keyval. It's 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 iterations are complete.
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年简易房屋装修合同范本汇编
- 期中卷 【期中测试·达标卷】-2023-2024学年八年级地理下册单元精讲·速记·巧练(湘教版)(原卷版)
- 2025技术转让合同样本
- Module 6 Unit 1 Well see lots of stones.(教学设计)-2023-2024学年外研版(一起)英语五年级下册
- 2025年深圳市优惠价房购买合同
- 5《国家机构有哪些》(教学设计)-部编版道德与法治六年级上册
- 2025标准合同终止解除劳动合同证明书
- 构建风机智能化控制系统设计规范
- 《紧急处理手术》课件
- 《第四单元 建立网站 第13课 制作网站 一、创建站点》教学设计教学反思-2023-2024学年初中信息技术人教版七年级上册
- 国药茶色素讲稿30课件
- 鲁科版五年级英语下How many ducks do you have?课件2
- 《罗织经》全文及翻译
- 医院药品信息管理系统(DOC)
- isa-381g站用变接地保护测控装置技术使用说明书南网版v3
- 计算机应用基础(中等职业学校校本教材)
- 完整版健康管理师
- 沈阳终止解除劳动合同范文证明书(三联)
- 广东省中型灌区续建配套与节水改造工程初步设计报告编制指南17
- 2022年教师资格《初中道德与法治学科知识与教学能力》真题卷
- SOP标准作业指导书1
评论
0/150
提交评论