随笔分类 -  移动测试

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