1. Download RobotiumOpen: http://code.google.com/p/robotium/Download: Robotium-solo-3.4.1.jar (need to rely on this package when writing test cases)2, need to re-sign the APK, because robotium required to be tested application and test code to have a consistent signature, so we need to download to the APK, through Re-sign.jar to generate the Debug key apk, this re-generated APK will be consistent with the
Activity testing relies heavily on the Android Instrumation framework, and unlike other Android components, activity has complex lifecycle callback functions (such as OnCreate, OnStart, etc.) These callback functions are typically not called directly except through the Instrumation interface.
The basic test class for the tes
1, Monkey Test is an Android platform for automated testing of a fast and effective means, through the monkey tool can simulate the user touch screen, sliding trackball, buttons and other operations to the simulator or mobile device software on the pressure test, testing the stability of the software, robustness. Its principle is to send a pseudo-random user even
configure the ADB environment1. Download the Android SDK, unzip2. Configure the Platform-tools and tools directories in the SDK directory to the system change environment variable3. Open CMD window, enter ADB, have ADB help information to configure successInstall APK fileFirst copy the APK package that needs to be tested to the Platform-tools directoryThen execute the install command adb install test.apkOne of the points to note is that when you exec
This example describes the Android programming unit test. Share to everyone for your reference, specific as follows:
Full instance code code click here to download the site.
This article is based on the previous article, "Unit Test for Java programming (JUNIT) example analysis" to continue to explain the Android unit
Series review: This series mainly introduces the use of Uiautomator from the perspective of development, including three articles in total:Basics: The Uiautomator of Android automated Testing (i)Tip: Android Automated test Uiautomator (ii) (not completed)Comparison tool: Android automated
Part II (Practice):Get ready:Download Android SDK address: https://developer.android.com/index.htmlConfigure environment variables (for Ubuntu or Mac)Source/etc/profileDownload Install Python 2.7/3.6An app stress test practice:1. Prepare a laptop and an Android phone. Mobile developer options, open USB connection2. ADB Devices viewing devices3. Install the
Online about the Android Unit Test text posts abound, after reading can solve the problem is good, can not solve the problem that is a waste of time and experience. Most articles come from this article:http://rexstjohn.com/unit-testing-with-android-studio/Since being put into the Android Studio IDE, I've basically been
1. JUnit's Testsuite can centrally store test classes and run test cases in batches of test classes, with the following source code:Package com.coolwi.km.user.testsuites;Import Com.coolwi.km.user.testcase.MyCardRecord;Import Com.coolwi.km.user.testcase.MyCardUserTestcase1;Import Junit.framework.JUnit4TestAdapter;Import Junit.framework.Test;Import Junit.framework.
1. First install ADB, Java Environment2.:Link: Https://pan.baidu.com/s/1i5xltpN Password: ra6gMonkey is very simple to understand is like a monkey a bit messy, see if there is a bug can withstand the pressureMailbox settingsNormally, if the Monkey test completes successfully, at the end of the log, the number of times the current execution event is printed and the time spent;//Monkey finished represents execution completion \Abnormal conditionsMonkey
Instrumented unit testing refers to testing that runs on a physical machine or simulator, so you can use the Android framework's API and the supporting API. This will be the case where you need to use device information, such as app context, you can use the instrumented unit test. Using the instrumented unit test can also reduce the code of the Mock (and, of cour
This example describes the general steps for creating a test project and the basic method of writing test cases.
For simplicity, create a HelloWorld application with a greeting class defined as follows:
public class Greeting {
private String name;
Public greeting (String name) {
This.name=name
}
Public String getgreetings () {return
"Hello," +name
}
}
The
Android 006 unit testAndroid testing and log testing common test categoriesBefore introducing Android Junit, let's first introduce the common test categories.
Depends on whether the source code is known:
Black box testing: I do not know the source code, but only test the
Hi:The app testing Service, which uses the Testin cloud test, is completely free and can be used to test apps anytime, anywhere online. It includes ios/android, including phone, Pad, touch and more than 3,800, more than 57,000 test terminals, including mobile phones, wearable, to smart TV and other types of
A basic concept1 API: Application programming interface, software system different components of the convergence of the Convention.2 Kinds:
Object-oriented Language API
Libraries and Frameworks API
APIs and protocols
API and Device Interface
Web API
3 Related categories: Web API, HTTP API4 HTTP API interface types: Get, post, put, delete, options, Head, trace, connect5 main talk get, post; Scenario: client-side fault tolerance, the ability of the server to handl
Test in Android review Android, reviewandroid
In Android, there are two types of tests:
1. Write test code in a project.
2. Create a project to write test code.
1. Write test code in
Objective
In the process of programming, multiple layers of logic control are often nested, and such nesting relationships often lead to the inability to visually see the logical relationship of the program, which can lead to a relatively easy omission during the testing process. So we need to introduce decision table and decision Tree , in which decision table is a very important tool in designing logic control .Decision table
Not much to say, first look at the definition (although not many
The Android test framework-related APIs are mainly defined in three packages:
Android.test used to write Android test cases
Android.test.mock defines a test "pile" for convenience testing
Android.test.suitebuilder Test Runner c
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.