07 2016 档案

摘要: 阅读全文
posted @ 2016-07-25 14:36 yexiant 阅读(109) 评论(0) 推荐(0)
摘要:There are several situations where you want to customize Robolectric's test runner to perform some operation before all tests are run, or even before 阅读全文
posted @ 2016-07-21 19:03 yexiant 阅读(184) 评论(0) 推荐(0)
摘要:Custom shadows are a Robolectric feature that allows you to make targeted changes in the way Android functions under test. This could be anything from 阅读全文
posted @ 2016-07-21 19:00 yexiant 阅读(320) 评论(0) 推荐(0)
摘要:Robolectric is a work in progress, and we welcome contributions from the community. We encourage developers to use the standard GitHub workflow to for 阅读全文
posted @ 2016-07-21 18:31 yexiant 阅读(420) 评论(0) 推荐(0)
摘要:Before Robolectric 2.2, most tests created Activities by calling constructors directly, (new MyActivity()) and then manually calling lifecycle methods 阅读全文
posted @ 2016-07-21 16:27 yexiant 阅读(217) 评论(0) 推荐(0)
摘要:There are numerous ways to customize how Robolectric behaves at runtime. Config Annotation The primary way to customize Robolectric is done via the @C 阅读全文
posted @ 2016-07-21 15:55 yexiant 阅读(512) 评论(0) 推荐(0)
摘要:Let's say you have an activity layout that represents a welcome screen: We want to write a test that asserts that when a user clicks on a button, the 阅读全文
posted @ 2016-07-21 15:39 yexiant 阅读(142) 评论(0) 推荐(0)
摘要:Robolectric works best with Gradle or Maven. If you are starting a new project, we would reccomend Gradle first (since it is the build system of choic 阅读全文
posted @ 2016-07-21 15:25 yexiant 阅读(202) 评论(0) 推荐(0)
摘要:Running tests on an Android emulator or device is slow! Building, deploying, and launching the app often takes a minute or more. That's no way to do T 阅读全文
posted @ 2016-07-21 15:14 yexiant 阅读(204) 评论(0) 推荐(0)
摘要:While developing your application, you should check that user interactions are buttery smooth, running at a consistent 60 frames per second. If someth 阅读全文
posted @ 2016-07-19 15:33 yexiant 阅读(703) 评论(0) 推荐(0)
摘要:A content provider manages access to a central repository of data. A provider is part of an Android application, which often provides its own UI for w 阅读全文
posted @ 2016-07-19 13:57 yexiant 阅读(246) 评论(0) 推荐(0)
摘要:Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content pro 阅读全文
posted @ 2016-07-19 11:16 yexiant 阅读(174) 评论(0) 推荐(0)
摘要:If your unit test has no dependencies or only has simple dependencies on Android, you should run your test on a local development machine. This testin 阅读全文
posted @ 2016-07-18 17:03 yexiant 阅读(284) 评论(0) 推荐(0)
摘要:Android tests are based on JUnit, and you can run them either as local unit tests on the JVM or as instrumented tests on an Android device. This page 阅读全文
posted @ 2016-07-18 16:10 yexiant 阅读(299) 评论(0) 推荐(0)
摘要:adb命令 1.获得当前运行的activity栈,同时也可以用此命令查看到具体某一页面的activity名字 adb shell dumpsys activity|grep Run 2.获得手机安装的所有应用包名 adb shell pm list packages 3.获得已安装的应用的apk,导 阅读全文
posted @ 2016-07-12 16:22 yexiant 阅读(204) 评论(0) 推荐(0)
摘要:The IntentService class provides a straightforward structure for running an operation on a single background thread. This allows it to handle long run 阅读全文
posted @ 2016-07-12 16:11 yexiant 阅读(155) 评论(0) 推荐(0)