When developing and testing Android applications, due to the limitations of the simulator, we often feel that the simulator is slow or cannot meet certain functions, how can I deploy the Android Application on a real mobile phone to test it? In fact, deploying the Android Application on a real mobile phone is very simp
I. First, configure the most basic environment
Knowledge preparation + Environment configuration for Android Automated Testing(Click to view details)
Ii. Download athrun
Select a location for storing code on the local machine dir
Right-click dir
SelectSVN checkout
In the pop-up dialog box, the first itemURL of repositoryEnter the corresponding address in the input box below:
Http://code.tao
Testing Display PerformanceSpeed Up your app
What can GPU monitor do?Analyze GPU performance to see the time it takes to draw each frame in real timeGPU Monitor Usage Readiness
Root phone
The GPU Profile switch in the developer options opens
Android Studio 1.4+
GPU Monitor BootWhen you click on the GPU in Android Monitor, the tool is already open,
framework1 How do I use it? Prepare a third-party library-first install the DDT library, followed by the introduction of DDT in the script, then OKSpecific:
Download the DDT library on the Python website;
Commands for importing DDT libraries in scripts: From DDT import DDT, data, unpack
To label DDT before testing the class: @ddt
strong> class Mooktestcase (unittest. TestCase), indicating that this tes
3014885 2127 139857 2117 3014885 2127 0 0 0 0 139857 2117 0 0 0 0where 6th and 8 are listed as Rx_bytes (receive data) and tx_bytes (transmit data) contain statistics on all network traffic such as TCP,UDP.Remarks: Script page http://www.cnblogs.com/penghong2014/p/4530875.html4. PowerMany features of Android are compared to power consumption (such as screen, Gps,sensor sensor, wake-up mechanism, CPU, Internet usage, etc.)1) Anti-screen standby the mo
Write Unit Test class1. Create a Unit Test folder, which is a new package for unit tests that holds the class for unit tests.2. Create a class such as exampletest, and note that you want to inherit from the Instrumentationtestcase class.3. Create a method that starts with test, such as TestjsonTo configure unit tests for a project1. Click "run-> Edit Configurations", then click "+" from the left pop-up list, select Add an Android Tests, then rename it
-trackball:-pct-nav: Navigation key (Hardware)-pct-syskeys:-pct-anyevent:8. Commissioning-hprof: Generating snapshot files for memory-ignore-crashes:-ignore-timeouts:-ignore-security-exceptions-kill-process-after-error-monitor-native-crashes: Monitor the C code inside Android (CPU compute section)-igrone-native-crashes:9.ADB shell-p xxx-throttle 100-pct-touch 50-pct-motion 50-v-v-v10.APK Package Name ViewInstall APK Package Name ViewerSource A in the
Each Android test tool inherits from junit3 testcase.
Applicationtestcase is used to test Android. App. Application;
Servicetestcase is used to test Android. App. Service;
Providertestcase2 is used to test Android. content. contentprovider;
Instrumentationtestcase is used for any test cases that
1. Download Android kernelSource.android.com/source->downloading and Building Building kernelsIt will take about 2 hours, its source code in the training software inside the Android simulator using the Linux-3.10 version of the kernel source codeCopy to Ubuntu and unzip it. Enter this directoryThis is the Android source code has a good cross-tool chain, only need
machine, click the Phone button in the upper left corner to capture the app's current interface, click on any of the top left corner of the phone icon can be, the difference is only the latter on the level of compression, This situation is more advantageous for large numbers of apps that use arrays or generic fills, and does not target elements that are empty or have the same name ID:For example, we locate this share button, we can see this button's Resource-id (with ID positioning), class (cla
, you can add text, voice, custom image editing, etc. The rapid people feel for the user to make a suggestion how to become an easy thing, do not have to click on the N menu, open one page after another, the moment the world is beautiful, the most important is the great convenience of our people like "there is a picture of the truth" developer,Iv. Presentation of the reportReport display, throughout its several reports, pie chart, histogram and so on, provides some summary of the way to present
There is a requirement in the recent project to test the application on at least 100 phones, the first thing to think about is the automation to operate, do not want to operate the same duplicate operation The basic requirement is this, install the tested application, start and exit, and then install the test sample to detect if there is a corresponding pop-up window blocker Considering the various testing frameworks on the market and the familiar pro
Test todayProgramRun a problem on the virtual machine, so the real machine is used for testing, but it is found that it is not recognized under Ubuntu .. The call./ADB devices is shown as follows .. The result cannot be tested on a real machine.
List of devices attachedEmulator-5554 Device???????????? No Permissions
Google Xiaomi real machine test fruitless, Google Ubuntu Android real machine test found
should be noted that although Monkeyrunner uses Python, it does not actually need to install the Python runtime environment, as mentioned earlier, the use of the tools described in this series for Android automated testing does not require the installation of additional tools. When using Monkeyrunner, you first need to turn on the emulator, or connect the real Android
information using toast.If B is an inline class of a or a method defined within a can be run with the following code:Toast.maketext (a.this, "text needed to be displayed", Toast.length_short). Show ();Otherwise, in B, first define the member variable context Mcontext, and then in the construction method of B to the A object as the context Mcontext to B, and then implement the method in B myshow ():Context Mcontext;...B (Context context) {Mcontext = context;}...void Myshow () {Toast.maketext (Mc
{myfunction MyFunction = new MyFunction (); int c = Myfunction.add (3, 4); LOG.D ("Add", string.valueof (c)); Assert.assertequals (7, c);}}6. After the Unit test class has written the above code, we cantest the two methods in the MyFunction class to find the outline view:If we want to test testadd (), we just need to find the corresponding testadd () in outline, then right-click, Run as->android Junit test, If the result is correct, it appears as foll
execution commands.3. Install the Java JDK and set the Java_home variable to your JDK directory.4. Install Appium for Windows version: Download path http://appium.io/downloads.html, I use the latest 1.4 version, very good.5. Install Python version 2.7, although Appium support many languages, but the personal favorite python, there is another reason is that robotframework also support Python, and then I use Robotframework to write Appium oh.6. Install the Python support package in the Appium Cli
Display page (HTML,CSS)
Problem
Q: A large number of bytes of the method must be modified, modify the JIT can be compiled?
A: A large number of bytes of the method proposed to modify, not mandatory, modified may not be JIT-compiled, because the JIT optimization does not mean that the JIT compiled the method, but also need other factors, such as the frequency of calls to the method. So this is a thing that you love me.
Why use Ruby
A: It's a struggle to have idea, because it's not sure what
package name Receivername(2) Empty extrasRun App.broadcast.send--action Android.intent.action.XXX3. Try Permission ElevationElevation of privilege is very similar to denial of service, except that it becomes a intent that constructs more complete and satisfies the program logic. Because activity is generally more relevant than user interaction, intent-based permissions elevate more for broadcast receiver and service. Drozer-related privilege promotion tool, can refer to the Intentfuzzer, which
After Android was developed for a period of time, it was unable to simulate gravity or cell phone card numbers. Therefore, an android mobile phone was used for testing. The mobile phone model was HTC A8181, the following describes how to configure the android real machine test.
Step One download the Computer Driver
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.