App compatibility test / MONKEY configuration and installation

APP test compatibility test

Insert picture description here

After going online for compatibility testing, this situation only applies to Android because this situation is not allowed, and ios is not acceptable. .

Before going online, you can ask the market manager or find Baidu traffic and Baidu index
Insert picture description here

MTC testblrd has a cloud test platform. The
cloud platform will not replace the testers. For example, the cloud platform is also software. He ca n’t test himself. He also has to find someone to test. On this point, it ca n’t be said that the cloud platform will test. Personnel replacement. Cloud platform can only replace part of automated test content

Ease of use test:

Insert picture description here

UI test:
Insert picture description here

Scene interaction test: For
example, when playing an app, you may suddenly quit or switch to another app, or you are using some kind of app, suddenly there is a phone message or video call, and there are many scenarios when users use the app , So we must consider whether the app can be used normally in these different scenarios.
Insert picture description here
Resource contention:
The resources of the mobile phone are limited. For example, when Douyin has a sound when it is used, it will conflict with the microphone speaker. For example, the music is played first and then the vibrato is turned on. The app is down.

Insert picture description here
Message push:
1. The message push display is different on different mobile phones, so it is also easy to go wrong.
Insert picture description here
2. We need to check whether the message push can be displayed normally, and whether the message push can be received after the app exits. (The system has a module for message push. App can use this module to control whether it can receive message push after exiting.)
3. Can you receive messages after disconnecting from the Internet again?
4. Push two messages at the same time. The display or the next one shows
Insert picture description here
the installation / uninstallation / update of the app first :
1. Whether the installation was successful
2. The data processing after uninstalling the app (when the user uninstalls, choose to retain user data, and whether the data can be read correctly during the next installation, If you do not keep the data, can you delete it cleanly?
3. Only consider the updates that come with the phone, and the update in the app market will be ignored, because some of the apps may not have been put on the market yet, consider mandatory updates and normal Update.
Mandatory update:
If the software has been updated many times and the user has not updated it, if the old version is no longer available, then the software may choose to update it secretly (behavior rogue, but to keep the user)
Hot update:
Hot update is the dynamic release of code, which allows developers to fix bugs and release functions without releasing new versions, allowing developers to bypass Apple ’s audit mechanism, avoiding long audit waits and multiple rejections The cost incurred. To put it simply, when a function of a game has a bug, or a function is modified, the latter adds the suitability of a function. We can update the game content without downloading and installing the installation package again.
The benefits of hot update: no need to waste traffic to re-download, no need to pass the store review faster, no need to re-install players can experience the updated content faster.
Apple will review the app's launch. In June 2017, the AppStore review team sent an email to App developers who were "hot-updated" in the AppStore, requesting that all related code, frameworks or SDKs be removed and resubmitted for review, otherwise they will be in the AppStore Remove the software in the middle. (But there are also secretly doing hot updates)
Reasons for Apple ’s objection: Because software hot updates bypass Apple ’s review, hacker developers may modify the APP through hot updates after submitting the normal version, resulting in security risks. Violated Apple's security and privacy policy. In addition, Apple's move can not only improve the fluency of some apps that use mixed language, but also regain control of App review permissions in some channels.
Insert picture description here

Consumption of resources:
1. The consumption of electricity by the app is different, and the app has indicators for the electricity consumed per hour, which needs to be within an acceptable range. (Settings-battery-see the software's power consumption rankings, but need to count a little more data to make an average)
2. The size of the application should not be too large, the time of installation and opening of the app should not be too long, the response time of the operation requires attention.
258 Principle: 2s is the best. 5s users can feel the process of opening. 8s users will have opinions.
3. You can use adb, matching monkey runner or monkey to detect resource consumption

Insert picture description here

Permission:
What will the app do if the user with the required permission is not allowed?
For example, the app needs camera permission, but the user does not allow it, will the app be forced to open or forced to exit?
It should be noted that when a certain permission is not given, can the app use other permissions normally?

Weak network test:
using the app may be used in different networks, whether it can be used normally in different networks.
Method
1. You can use software to simulate the network (3G may be canceled, but 2G will not be canceled because it is the basis of communication), and you can also limit the network speed on the router.
Monkey can achieve irregular operation until the specified time is measured.
Insert picture description hereInsert picture description here

H5 = Website on mobile

Version iteration:
Insert picture description here

增量测试: Only test known functions with changes. (When a lot of functions have already been tested, the automated test may be launched. At this time, we will only test the functions that have been changed.)
全量测试: The software is made from small to large, each time a new function is released, you need to Test all functions again.

What is the difference between Web testing and App testing

1. System architecture:
web项目,一般都是b/s架构,基于浏览器的。app项目,则是c/s的,必须要有客户端,用户需要安装客户端。
As long as the server is updated in the web test, the client will be updated synchronously. App project requires both client and server to be updated.
2. Performance: The
web page will mainly focus on response time, while the app also needs to care about traffic, power, CPU, GPU, Memory. The performance of their servers is no different, they are all one server.
3. Compatibility: The
web is based on a browser, so it is more inclined to be compatible with the direction of the browser and computer hardware and computer system. App testing depends on the resolution, screen size, and device system. web测试是基于浏览器的所以不必考虑安装卸载。
And app是客户端的,则必须测试安装、更新、卸载。in addition to conventional installation, update, uninstall also take into account abnormal scene. Including interruption during installation, weak network, and deletion of installation files after installation. In addition, the APP also has some special tests: such as network and adaptability.
相对于 Web 项目,APP有专项测试,对于app的测试会更麻烦一点
  1. Interference test: interrupt, call, SMS, shutdown, restart, etc.
  2. Weak network test (simulate 2g, 3g, 4g, wifi network status and packet loss); network switching test (reconnect after network disconnection, 3g switching To 4g / wifi, etc.)
  3. Installation, update, and uninstallation
  Installation: need to consider the interruption during installation, weak network, delete installation files after installation, etc.
  Uninstallation: need to consider whether to delete app-related file
  updates after uninstallation : sub-forced update, Non-mandatory update, incremental package update, breakpoint resuming, update in weak network state
  4. Interface operation: regarding the mobile terminal test, pay attention to gestures, horizontal and vertical screen switching, multi-touch, front and background switching
  5. Security test: Whether the installation package can decompile code, whether the installation package is signed, permission settings, such as access to the address book, etc.
  6. Boundary test: less available storage space, no SD card / dual SD card, flight mode, wrong system time, third-party dependence (QQ, WeChat login), etc.

Performance and stability tools—MONKEY

It is a small stress test tool that comes with Android SDK. It can simulate some random events and can generate corresponding random operations on real or virtual machines. This stress tool must not be aimed at the performance of the back end, but for the performance of a single mobile phone. The
goal of some tools is to ensure the stability of the mobile phone running app, and it will not crash because of the use of this app.

◆ Monkey is a tool that comes with Android SDK
◆ Runs on simulated devices and generates pseudo-random streams of user events, such as clicks, touches, or gestures, and several system-level events.
◆ Monkey test, all events are randomly generated, without any subjectivity. Monkey can be used for stress test

So what we are talking about now is to test the single machine. If you want to test the server, for example, Alipay.
Interface testing is required, which is back-end and needs to be tested with loadrunner,
so the testing of mobile app needs to be divided into front-end and back-end tests, front-end uses monkey, back-end uses LR

Environment configuration and installation

◆ JDK installation and configuration
◆ Android SDK installation and configuration
◆ Computer adb connected to mobile phone or virtual device
adb is a tool for Android. Turn on the developer mode of the phone and set it to allow debugging
adb to connect to the night god simulator The adb version of Android SDK is consistent

1. Use the night god simulator to download the mobile phone Taobao, and use the monkey to perform the stress test:
Insert picture description here
2. Check whether the Android SDK is installed
Insert picture description here
3. Link the adb to the night god simulator:
Insert picture description here
4. To know to use adb to send packages , use When the monkey is performing the pressure test, you need to know the package name of the software corresponding to the night god simulator I want to carry out the pressure test, so you should check the package name of Taobao in the night god simulator. You can check all the package names and find taobao
Insert picture description here
Just : if you are not sure, you can add -f, which can tell you which apk:
Insert picture description here
Insert picture description here
the name log level of the tool -p package that depends on the adb applied to the monkey (the three v instructions are the most detailed logs) random event stream ( 1000 means that 1000 random events are generated)> report.txt (type our command into this file)
Insert picture description here

After clicking Enter, the Night God Simulator will randomly simulate a thousand events by itself, including sliding, clicking, etc.

Insert picture description here
After completion, open the report file and view the log:

Insert picture description here
The monkey has a parameter to pass in the seed number, so that the next time its random event flow is exactly the same as this one, this helps us to perform various operations, such as stability, this time did not If you want to return, is it better to use the stream of events that did not pass last time?
Insert picture description here
If you use the real machine, you can use the usb link to the real machine to operate

Cloud test platform

Public testing platform, after all, not every company can purchase all mobile phone models

Insert picture description hereInsert picture description here
There is a big cloud to do some operations like customers

Published 82 original articles · praised 7 · visits 4164

Guess you like

Origin blog.csdn.net/sunshine612/article/details/105610443