A glance at Autopilot - Autopilot一览


煎饼
煎饼 2022-10-08 12:24:27 66553
分类专栏: 资讯
*温馨提示:本人英文能力有限,翻译不当之处还望大家跟帖指正,共同学习、进步!*

http://www.theorangenotebook.com ... e-at-autopilot.html
A glance at Autopilot
Autopilot一览

So, as has been already mentioned, automated testing is going to come into focus this cycle. To that end, I'd like to talk about some of the tools and methods for automated testing that exist and are being utilized inside ubuntu.
所以,正如已经提及的,自动化测试将在这个周期成为焦点。最后,我想谈谈存在、运用在ubuntu中的自动化测试的一些工具和方法。

I'm sure everyone has used unity at some point, and you will be happy to know that there is an automated testsuite for unity. Perhaps you've even heard the name autopilot. The unity team has built autopilot as a testing tool for unity. However, autopilot has broader applications beyond unity to help us do automated testing on a grander scale. So, to introduce you to the tool, let's check out a quick demo of autopilot in action shall we? Run the following command to install the packages needed (you'll need quantal or raring in order for this to work): sudo apt-get install python-autopilot unity-autopilot

我相信每个人都在某种程度上使用过unity,并且你会很高兴知道unity有一个自动化测试集。也许你已经听说过Autopilot。Unity团队建立Autopilot作为unity的一个测试工具。然而,Autopilot已经超越unity有了更广泛的应用-帮助我们在一个更大规模中运用自动化测试。所以,向你介绍这个工具,让我们看看运行中的Autopilot的快速演示好吗?运行下面的命令来安装需要的包(为了这个能工作,你需要在quantal(Ubuntu 12.10)或者raring(Ubuntu 13.04)版本上执行):
sudo apt-get install python-autopilot unity-autopilot

Excellent, let's check this out. A word of caution here, running autopilot tests on your default desktop will cause your computer to send mouse and keyboard commands all by itself ;-) So, before we go any further, let's hop over into a 'Guest Session'. You should be able to use the system indicator in the top right to select 'Guest Session'. Once you are there, you'll be in a new desktop session, so head back over to this page. Without further ado, open a terminal and type:autopilot run unity.tests.test_showdesktop.ShowDesktopTests.test_showdesktop_hides_apps  

好的,让我们来看看这个。在这里警告你,在你的默认桌面运行Autopilot测试将导致你的电脑自发地发送鼠标和键盘命令;-)所以,在我们继续之前,让我们跳到“客人会话”。你应该能够使用系统指示器在右上角选择“客人会话”。一旦点击,你将会进入一个新的桌面会话,所以返回到这个页面。闲话少说,打开终端并输入:
autopilot run unity.tests.test_showdesktop.ShowDesktopTests.test_showdesktop_hides_apps

This is a simple test to check and see if the "Show Desktop" button works. The test will spawn a couple of applications, click the show desktop button and verify clicking on it will hide your applications. It'll clean up after itself as well, so no worries. Neat eh?
这是一个查看“显示桌面”按钮是否工作的简单测试。测试将会产生几个应用程序,点击“显示桌面”按钮,验证点击它是否会隐藏你的应用。它将进行自身清洁,所以不用担心。整洁么?

You'll notice there's quite a few unity testcases, and you've installed them all on your machine now.
你会注意到有不少unity测试用例,并且你已经在你的机器上安装了所有的。

autopilot list unity

As a sidenote, you are likely to find some of the testcases fail on your machine. The testsuite is run constantly by the unity developers, and the live results of commit by commit success or failure is actually available on jenkins. Check it out.
作为一个旁观者,你可能会发现一些测试用例在你的机器上运行失败。Unity开发者不断运行测试集,提交的实时结果成功或失败实际上仅在jenkins中有效。检查出来。

So in closing, this cycle we as a community have some goals surrounding easing the burden for ourselves in testing, freeing our resources and minds towards the deeper and more thorough testing that automation cannot handle. To help encourage this move of our basic testcases towards automation, the next series of blog posts will be a walkthrough on how to write Autopilot testcases. I hope to learn, explore and discover along with all of you. Autopilot tests themselves are written in python, but don't let that scare you off! If you are able to understand how to test, writing a testcase that autopilot can run is simply a matter of learning syntax -- non-programmers are welcome here!
总之,这个周期我们作为一个社区有一些目标围绕在测试中为自己减轻负担,释放我们的资源、让思想更深层次和更全面的测试不能自动化的操作。为了帮助鼓励我们的基本测试面向自动化这一举措,接下来的博客帖子将介绍怎样编写Autopilot测试用例。我希望跟你们一起学习、探索和发现。Autopilot测试本身使用python编写的,但是不要让这个把你吓跑!如果能够理解如何测试,编写一个Autopilot测试用例并且可以运行只是一个简单的学习语法的问题 - 这里欢迎非程序员的参与。

网站声明:如果转载,请联系本站管理员。否则一切后果自行承担。

本文链接:https://www.xckfsq.com/news/show.html?id=18872
赞同 0
评论 0 条
煎饼L0
粉丝 0 发表 6 + 关注 私信
上周热门
银河麒麟添加网络打印机时,出现“client-error-not-possible”错误提示  1448
银河麒麟打印带有图像的文档时出错  1365
银河麒麟添加打印机时,出现“server-error-internal-error”  1151
统信桌面专业版【如何查询系统安装时间】  1073
统信操作系统各版本介绍  1070
统信桌面专业版【全盘安装UOS系统】介绍  1028
麒麟系统也能完整体验微信啦!  984
统信【启动盘制作工具】使用介绍  627
统信桌面专业版【一个U盘做多个系统启动盘】的方法  575
信刻全自动档案蓝光光盘检测一体机  484
本周热议
我的信创开放社区兼职赚钱历程 40
今天你签到了吗? 27
信创开放社区邀请他人注册的具体步骤如下 15
如何玩转信创开放社区—从小白进阶到专家 15
方德桌面操作系统 14
我有15积分有什么用? 13
用抖音玩法闯信创开放社区——用平台宣传企业产品服务 13
如何让你先人一步获得悬赏问题信息?(创作者必看) 12
2024中国信创产业发展大会暨中国信息科技创新与应用博览会 9
中央国家机关政府采购中心:应当将CPU、操作系统符合安全可靠测评要求纳入采购需求 8

添加我为好友,拉您入交流群!

请使用微信扫一扫!