随笔分类 - 移动测试
摘要:在上一遍笔记博客中本以为只能在Setup和TearDown中做条件判断来实现Junit4的@BeforeClass和@AfterClass功能。今天查看SDK时发现其实是有现成的方法来实现这个功能的。方法就是把编写的测试用例从继承自ActivityInstrumentationTestCase2改成...
阅读全文
摘要:Robotium的测试类ActivityInstrumentationTestCase2是继承于Junit3的TestCase类,所以并没有提供Junit4的特性.如网上总结说的不能通过annotate的方式来识别子类的新特征,如不能实现@beforeclass,@afterclass等特征。只能通...
阅读全文
摘要:publicvoidtakeScreenshot(){ ViewdecorView=viewFetcher.getRecentDecorView(viewFetcher.getWindowDecorViews()); screenshotTaker.takeScreenshot(decorView,...
阅读全文
摘要:Robotium作为Android自动化测试框架,还有许多不完善的地方,也不能满足测试人员的所有要求。那么,本文以四个实际中碰到的问题为例,介绍改动Robotium源码的过程。publicbooleanwaitForActivity(Stringname,inttimeout){ Activityc...
阅读全文
摘要:背景:最近在使用Robotium进行Android自动化测试。遇到了一个问题:我需要获得一个View的id(int型数值)。此前我在http://maider.blog.sohu.com/255448342.html和http://maider.blog.sohu.com/255485243.htm...
阅读全文
摘要:背景介绍:最近在做Robotium自动化测试,使用到solo.takeScreenshot()函数以在测试过程中截图,但此函数需要被测试APP具有权限。在只有被测试APP的apk文件的情况下,修改apk文件后缀名为zip,解压缩后,修改AndroidManifest.xml文件,删除META-INF...
阅读全文
摘要:原文地址:http://www.cnblogs.com/xirihanlin/archive/2010/06/15/1758677.htmlAndroid提供了一系列强大的测试工具,它针对Android的环境,扩展了业内标准的JUnit测试框架。尽管你可以使用JUnit测试Android工程,但An...
阅读全文
摘要:Class By定义了页面元素的定位和支持哪些页面元素(至少我是这么理解的),使用及其简单:Used in conjunction with the web methods. Examples are By.id(String id) and By.cssSelector(String select...
阅读全文
摘要:框架目的: Robotium is an Android test automation framework that has full support for native and hybrid applications. Robotium makes it easy to write power...
阅读全文
摘要:The test application demonstrates these key points:An Android test is itself an Android application that is linked to the application under test by en...
阅读全文
摘要:public abstract classActivityInstrumentationTestCase2extendsActivityTestCase//继承自ActivityTestCase类This class provides functional testing of a single a...
阅读全文
摘要:Android是在Linux2.6的内核基础之上运行的,提供核心系统服务:安全、内存管理、进程管理、网络组、驱动模型。内核部分还相当于一个介于硬件层和系统中其他软件组之间的一个抽象层次。但是严格来说它不算是Linux操作系统。Android系统的系统层面的底层是Linux,中间加上了一个叫做Dalv...
阅读全文
浙公网安备 33010602011771号