当前时区为 UTC + 8 小时

发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : A glance at Autopilot - Autopilot一览
帖子发表于 : 2013-05-09 10:01 

注册: 2013-05-09 9:11
帖子: 9
系统: UbuntuKylin 13.04
送出感谢: 0 次
接收感谢: 0 次

http://www.theorangenotebook.com ... e-at-autopilot.html
A glance at 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.

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 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.

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.

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测试用例并且可以运行只是一个简单的学习语法的问题 - 这里欢迎非程序员的参与。

显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 

当前时区为 UTC + 8 小时


正在浏览此版面的用户:没有注册用户 和 1 位游客

不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译