Problem:You want to use the Robotium Library to test activity.Solution:Add robotium dependencies and write your own test scripts.Discuss:The Android Test Support library provides classes to manipulate the widgets in the activity, but has an easier way to manipulate the Android UI. Although this book is not an introduction to testing, it is easy to add robotium de
; // Not Installed
Private static final int INSTALLED = 1; // INSTALLED and new
Private static final int OLDVERSION = 2; // installed but old
/**
* Determine whether the application is installed or the latest version.
* @ Param packageName the package name after the target application is installed
* @ Param versionCode the specified application version number
* @ Return indicates the installation type.
* @ Author zuolongsnil
*/
Private int isInstallByread (String packageName, int versionCode ){
Preface if you have not used Monkey for Android development, you can see this article today to solve some problems in your Android testing. At least it can help you save test time and discover more problems.Monkey introduction Monkey is an Android command line automated testing
. Adding a large number of buttons and features on the screen is easy, but the buttons must be large enough to be large enough to be delayed.
5, the introduction of animation design must be fine
If you are going to use introduction animations, make the animation as short as possible, design as fine as possible and attractive enough for the user to spend time waiting. The app loads the pictures first, th
please look for this genuine code, after-sales technology is guaranteed, the code has been continuously updated. (piracy is shameful, offenders must investigate) This is the company's team development --------------------------------------------------------------------------------------------------------------- ----------1. There are 4 sets of Oracle, MSYQL, spring3.0, spring4.0 all available without hitting the jar without encrypting the source code ( the bottom 2.1) 2. Support
Android application development process, there may be needs, such as: Jump to the application market to download applications, jump to the application market to their own application scoring, jump to the application market to update their own applications. So how do you jump to the app market?Possible ways to jump everyone knows, the method is as follows:static void goToMarket(Context context, String packag
Note: This article was first published in the ninth part of 51 testing worldCheck tab order
Using a method similar to checking focus, you can check whether the focus jump sequence between controls on the interface is correct, that is, the tab order check we usually call.
The purpose of checking the jump sequence of focus is to improve the efficiency of users. In the input-intensive user interface, users u
Application Scenarios :1. Display the version number of the application in the interface;2, the user launches the application, the background to determine whether the application is the latest version.Each of these scenarios requires that the app's version number be automatically obtained in the program.Idea Introduction :In Android, The version number of the application is configured in the Androidmanifest
; "alt=" 1240 "/>Monkeyrunner is a popular Android test tool for automated functional testing.This tool is one level lower than robotium. This does not have to deal with the source code to do automated testing. This test can be written in Python, and you can use the recording tool to create tests.Monkeyrunner can connect to a computer or simulate real-world devices to run tests. The tool has an interface th
Android Concise Development Tutorial One: overview
Android Simple Development Tutorial Two: Install development environment
Android Concise Development Tutorial III: The first application Hello World
Android Simple development tutorial four: Android Application basics
visible to the end user. Android:versionname: String type. is for the end user to see.program requires the System API version number android:minsdkversion: To perform this program requires the lowest system API version Android:targetsdkversion: This programming when the target system API version of Android: Maxsdkversion: The highest system API version supported
the app widget instances, this is a good place to do the job.
Ondisabled (context)
Called when the last instance of your app widget is removed from the host. You should do some cleanup work in the onenabled (context), such as deleting a temporary database.
OnReceive (context, Intent)
This is invoked when each broadcast is received, and before the callback function above. You don't usually need to imple
(Sessioncalendardatabase). Clearallsessions (0); }}ConclusionTo be able to do unit tests, I think the modified code becomes more readable and easier to maintain. To be sure, there are many ways to make the code better, but in the process of allowing the code to do unit testing, I want the modified code to be as similar to the pre-modification style as possible, so I didn't make any other changes. In the next blog post, I'll teach you how to refactor
The interruption events provided by Android phones are different from those provided by mobile phones in the past. Of course, there are also many similar mechanisms. Therefore, we needProgramStarting from the interruption mechanism, we can customize the interruption events of our system test cases.We can customize an application, print all the inherited methods, and then use these to interrupt the experiment to call these interfaces. If developers can
upgrades, rather than OS upgrades.
Over the past few years, Gmail, Search (including Google Now and Voice Actions), Hangouts (previous talk), Chrome, YouTube, calendars ... These are all directly upgraded. With app upgrades, rather than OS upgrades, you can dramatically shorten the frequency of new features, which are upgraded about 6 months ago and now take only a few days.
This also poses the problem that each new version of Andoird has a new API
In Android, user portraits and android user portraits are set by accessing a local album or camera.
Currently, almost all apps have the need to set up portraits when users register. There are three scenarios:
(1) obtain the image of the local album and crop it as the Avatar.
(2) Start the mobile phone camera, take the
App widgets are also a UI component that can embed a small program (program piece) into the desktop. Compared with common widgets (such as TextView and WebView), the following differences exist:
An App Widget is a live UI component that automatically updates its content;Widgets cannot automatically update their own content and can only passively wait for user cal
box.
Changing the Run/debug configuration (change the Run/debug config)The Run/debug configuration specifies the modules to be run, package deployment, launch page, target device, emulator settings, Logcat options, and so on. The default Run/debug configuration launches the project default activity and uses the Select Deployment target dialog box to select the deployment target. If the default settings are not appropriate for your project or module, you can customize the Run.debug configur
1. Introduction to Monkey testing
Monkey testing is a means of automated testing on the Android platform. The Monkey program simulates the user's touch screen, sliding Trackball, buttons, and other operations to perform stress testing on the program on the device, how long w
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.