android unit test

  • Android Unit and Integration testing:https://github.com/codepath/android_guides/wiki/Android-Unit-and-Integration-testing

  • Unit Testing with JUnit - Tutorial:http://www.vogella.com/tutorials/JUnit/article.html
  • Android application testing with the Android test framework - Tutorial

    :http://www.vogella.com/tutorials/AndroidTesting/article.html

  • Robolectric Installation for Unit Testing:https://github.com/codepath/android_guides/wiki/Robolectric-Installation-for-Unit-Testing
  • Android Button Example:http://www.mkyong.com/android/android-button-example/
  • https://code.google.com/p/robotium/wiki/Getting_Started
  • Android Testing With Robolectric:http://www.peterfriese.de/android-testing-with-robolectric/
  • Check WebView‘s URL while Unit Testing in Robotium:http://stackoverflow.com/questions/16023988/check-webviews-url-while-unit-testing-in-robotium
时间: 2024-08-21 19:16:59

android unit test的相关文章

Android unit test中通过颜色比对替代肉眼检查

对于Android UI类的单元测试,以前写的有些代码就是sleep 10秒,然后肉眼检查下.这样子在自动化测试中没有用. 今天修改了下代码,其实肉眼检查也就是检查pixel的颜色,所以可以直接获取view的某个点的颜色,然后跟期望值比较就行了. 这是获取view中某个pixel颜色的代码: public static int getColor(View view, int x, int y) { int w = view.getWidth(); int h = view.getHeight()

(4.5.4)Android测试TestCase单元(Unit test)测试和instrumentationCase单元测试

Android单元和instrumentation单元测试 Developing Android unit and instrumentation tests Android的单元测试是基于JUnit的.可分为: 1.本地单元测试 - 可以在JVM上运行测试(速度快,优先考虑). 2.Instrumented单元测试 - 需要Android系统 Android的Gradle插件支持在JVM上执行Andr??oid单元测试.它使用特殊版本的android.jar(也称为 Android mocka

Android 自动化测试(2)根据ID查找对象(java)

之前一篇文章写的是 Android 自动化测试(1)如何安装和卸载一个应用(java) ,下面再探索一下如果在普通java应用程序中,根据ID来查找对象 1.类库依赖: The library dependencies are: chimpchat.jar,common.jar,ddmlib.jar,guava-13.0.1.jar,sdklib.jar,hierchyviewer2lib.jar They can all be found in the sdk/tools/lib subdir

Android 自己的自动化测试(2)依据ID查找对象(java)

前一篇文章是写 Android 自己的自动化测试(1)如何安装和卸载应用程序(java) ,以下再探索一下假设在普通java应用程序中,依据ID来查找对象 1.类库依赖: The library dependencies are: chimpchat.jar,common.jar,ddmlib.jar,guava-13.0.1.jar,sdklib.jar,hierchyviewer2lib.jar They can all be found in the sdk/tools/lib subdi

安装Android SDK和ADT步骤和遇到的问题

http://894503895.diandian.com/post/2012-05-16/18695648 1.安装eclipse.下载地址:http://www.eclipse.org/downloads/ 注意:安装3.6版本及以上2.安装ADT(1)在线安装   打开Eclipse,选择help->Install New Software...弹出安装新软件窗口   在"Work with"中输入https://dl-ssl.google.com/android/ecli

Android 进行单元测试难在哪-part1

原文链接 : Against Android Unit Tests 原文作者 : Matthew Dupree 译文出自 : 开发技术前线 www.devtf.cn 译者 : chaossss 校对者: tiiime 状态 : 完成 正如我在序中所说,在 Android 中难于进行测试是众多 Android 开发者的共识.上一篇博文发出后,有许多同行回复了我,并对我的观点表示支持: - Andy Dyer (@dammitandy) April 13, 2015 @philosohacker大大

Android 进行单元测试难在哪-part2

原文链接 : Why Android Unit Testing is so hard 原文作者 : Matthew Dupree 译文出自 : 开发技术前线 www.devtf.cn 译者 : chaossss 校对者: tiiime 状态 : 完成 在Android 进行单元测试难在哪-part1中,我用干货告诉大家:即使是 Google 大牛写出来的代码也无法进行测试.确切地说,我真正告诉大家的是:根本没办法在 SessionDetailActivity 的 onStop() 方法里进行单元

Android 进行单元测试难在哪-序

原文链接 : Against Android Unit Tests 原文作者 : Matthew Dupree 译文出自 : 开发技术前线 www.devtf.cn 译者 : chaossss 校对者: Rocko 状态 : 完成 其实不仅仅只有普通 Android 开发工程师觉得测试 Android 应用很恼火,大牛们也受此困扰已久.例如 Jake Wharton 曾经明确地表示:Android 平台自诞生之初就与应用测试势如水火.Don Felker 和 Kaushik Gopal 也在他们

通过JUnit进行Android单元测试

要了解android单元测试,首先必须了解junit 什么是 JUnit ? JUnit是采用测试驱动开发的方式,也就是说在开发前先写好测试代码,主要用来说明被测试的代码会被如何使用,错误处理等:然后开始写代码,并在测试代码中逐步测试这些代码,直到最后在测试代码中完全通过. 现简要说JUnit的4大功能 管理测试用例.修改了哪些代码,这些代码的修改会对哪些部分有影响,通过JUnit将这次的修改做个完整测试.这也就JUnit中所谓的TestSuite. 定义测试代码.这也就是JUnit中所谓的Te