The use of APP special testing methods and tools (a must-read for novice testers)

APP special test

1. Network test

You can use packet capture tools to assist grid testing. Recommended: fiddler, Charles

(1) Network switching
 2G-3G-4G-wifi-poor network signal-no network

(2) The network signal is weak
 Pay attention to whether ANR or crash occurs

2. Interrupt test

(1) Unexpected interruption
a. Incoming call
b. SMS
c. Alarm clock
d. Disconnect the network
e. Power outage
f. Video chat
g. Voice chat
h. No response
i. System update reminder
j. Insufficient memory reminder
k. Message notifications from other apps
(2) Task switching
a. Lock screen
b. Switch to other applications

3. Compatibility test

(1) Different models
(2) Different operating system versions

Note: app compatibility testing method
(1) Manual testing (generally suitable for projects with a small number of users and low requirements for compatibility testing)

(2) Cloud testing platform (generally suitable for projects with a large number of users and high requirements for compatibility testing)

Currently, mainstream cloud testing platforms on the market include:

(1) Tencent Cloud Test:

http://wetest.qq.com

(2) Baidu Cloud Test:

http://mtc.baidu.com

(3) Alibaba Cloud Test:

http://mqc.aliyun.com/

(4) testin cloud test:

https://www.testin.cn/

4. Performance test

(1) Client performance test
a. Traffic consumption
b. Power consumption
c.CPU
d. Memory consumption
(2) Server-side performance testing

5. UI testing

(1) Switch between horizontal and vertical screens
(2) Gesture operation
a. Long press to call out the menu
b. Pinch with both hands to zoom in and out.
c. Slide
(3) Adaptive keyboard occlusion on the input information interface
(4) Other UI testing points are basically the same as web

6. Security testing

(1) The password is not displayed in text
(2) The password box does not support copying
(3) Encrypted transmission of sensitive information
(4) Multiple login failures and account lockout
(5) After successful login, if you do not operate the software for a long time, the session will be lost and you will be prompted to log in again.
(6) Permission control
(7)SQL injection

7. Stability test (completed using monkey)

8. Installation test

(1) Before installation
a. Clean Android system
b. An old version of Android system installed
c. Android system with this version installed
d. Install the latest version of Android system (older version needs to be installed)
e. Android system equipped with anti-virus software
f. Android systems installed with other software in the same industry
g. Android system with insufficient memory

(2) During the installation process
a. Unexpected interruption
b. License confirmation prompt
c. Whether to display the installation progress

(3) After installation
a. Whether the software can be started normally
b. Check whether the installation files are complete
c. Check permissions
d. Statistics of total installation time

9. Upgrade test

(1) Automatic upgrade
(2) A prompt will pop up indicating whether to upgrade, and you must choose manually.
(3) Unexpected interruption during upgrade process
(4) Insufficient memory during the upgrade process
(5) Whether the data is synchronized after the upgrade
(6) Upgrade while the app is running
(7) Cross-version upgrade test

10. Uninstallation test

(1) Consider unexpected interruption during uninstallation of large apps
(2) Uninstall the app while it is running
(3) After the app is uninstalled, are the corresponding files deleted?
(4) After uninstalling, reinstall this version of the app
(5) Whether the uninstallation confirmation prompt pops up

11. Interface testing (assisted by packet capture tool required)

(1) Interfaces between modules within the system
(2) Third-party interface outside the system (with interface, main tune)
(3) The called interface outside the system (no interface, interface testing tool is required to simulate sending requests)

12. Other tests

(1)Supported file formats
a) Image upload
b) Video upload
c) File upload
Now I have also found a lot of test friends and created a communication group to share technology, sharing a lot of technical documents and video tutorials we collected.
If you don’t want to experience the feeling of not being able to find resources when studying on your own, having no one to answer your questions, and persisting for a few days before giving up.
You can join us to communicate. And there are many technical experts who have made certain achievements in automation, performance, security, test development, etc.
Share their experience, and also share many live lectures and technical salons
You can learn for free! Focus on it! Open source! ! !
QQ group number: 110685036 [password: csdn999]

Tools needed for APP testing

1. adb testing tool

adb: android debug bridge, Android debug bridge, a tool for connecting computers and Android phones

1. adb get-serialno to get the serial number:
2. adb devices: used to view the Android devices currently connected to the computer
3. adb install apk file package: install app on Android device
Note: If there are 2 or more Android devices currently connected to the computer, you can complete the installation through the following command:
adb -s device serial number install apk file package
install -r overwrites the installation, retains data and cache files -d solves low version problem -s installs apk to sd card
4. adb uninstall app package name: uninstall app
The optional uninstall parameter -k is used to uninstall the software but retain the configuration and cache files.
5. adb shell: Enter the adb running environment
5.1. adb [-d|-e|-s <serial Number>] <command>
-d: real machine (applicable when there is only one real machine among multiple devices)
-e: simulator (applicable when there is only one simulator among multiple devices)
-s: serial number
5.2. adb shell ls [-al] lists the files and folders in the directory. The optional parameter -al can view the detailed information of the files and folders.
5.3. adb shell cd <folder> to enter the folder
5.4. adb shell cat <filename> to view files
5.5. adb shell rename path/oldfilename path/newfilename rename file
5.6. adb shell rm -r <folder> -r optional parameter is used to delete the folder and all files below it
5.7, adb shell mv path/1 path/2 move files
5.8. adb shell cp file path/1 copy file
5.9. adb shell mkdir path/1 creates directory
5.10. adb shell chmod 777 filename sets the maximum read and write permissions for files
\t
6. adb push PC path and file Mobile path: Transfer files specified on the computer to the path specified on the mobile phone
7. adb pull mobile path and file PC path: transfer the file specified on the mobile phone to the path specified on the computer
8. adb logcat to view the log:
What are the levels of logs generated in the Android system?
I: information
V: redundant (lowest priority)
D: debugging
W: warning
E: Error
F: serious error
S - Silent (highest priority, no information will be printed)
\t\t
Log format: adb logcat -s filter specified parameters log -v time retain log time >> append write > overwrite write
Log filtering: adb -e logcat tag name: level>1.txt or use grep to filter adb logcat | grep "SEARCH_TERM"
For example: adb -e logcat taobao:w>11.txt
Save all logs with w level and above and containing taobao tag to 11.txt
\t\t
For example: adb -e logcat *:w>11.txt
Save w level and above logs and all logs to 11.txt
Use to clear old logs
adb logcat -c

9. adb reboot to restart the machine:
10. adb reboot [bootloader|recovery] Restart the device, optional parameters to enter bootloader (brush mode) or recovery (recovery mode)
11. adb shell am start -n package_name starts the application
12. adb kill-server terminates the adb service process:
13. adb start-server restarts the adb service process:
14. adb help Get help. It contains an introduction to various commands and parameters of adb.
15. adb version Check adb version
16. adb root Restart adb with root privileges
17. adb remount remounts the system partition as a read-write partition. This command is very important in the operating system directory.
18. adb shell pm path <package_name> View the path of the app
18.1. adb shell pm list packages View the names of all Apps View the names of APPs on your phone. You can add -f after
19. adb shell dumpsys package <package_name> | grep version to view apk version information
20. adb shell pm clear <PACKAGE> deletes all data related to the package: clear data and cache
21. adb shell ps <package_name|PID> [ adb shell ps | grep <package_name> ] View process-related information of an app
22. adb shell kill pid Number kills a process, generally used to simulate the recurrence of a bug
23. adb shell dumpsys meminfo <package_name|PID> Check the memory usage of a certain app
24. adb shell getprop | grep heapgrowthlimit View the maximum memory limit of a single application
25. adb shell dumpsys batterystats ><package_name> > xxx.txt to obtain the power consumption information of a single application
26. adb shell wm size [adb shell dumpsys window | grep Surface] Check the mobile phone resolution
27. adb shell getprop | grep version Check the mobile sdk version
28. adb shell getprop | grep product to view mobile phone model information
29. adb shell cat /proc/meminfo to check the current memory usage of the system
30. adb shell top checks the cpu and memory usage of the process on the device
31. Use adb shell screencap /sdcard/screen.png command to take screenshots on mobile phones
32. Adb shell screenrecord /sdcard/demo.mp4 command to record screen video
33. adb shell input simulates keystrokes/input
33.1. The adb shell input text "insert%stext%shere" command enters some information into the screen input box. %s represents a space.
33.2. adb shell input tap 500 1450 simulates screen click event
33.3. adb shell input swipe 100 1500 100 450 100 simulates gesture sliding events starting from screen coordinates (100, 1500) and sliding to (100, 450). The whole process takes 100ms. [adb shell input swipe 100 500 100 500 500] Simulate long press event
33.4. adb shell input keyevent simulates the command of clicking the physical button

2.monkey

1. Usage occasions: Mainly used for app stability testing. A tool that comes with Android system.
2. Principle: Test the stability of a mobile phone or an app by sending a large number of random events.
3. adb shell monkey event number > log file: test the stability of the phone
4. Basic parameters of monkey command
(1)-p app package name
Note: If you need to send random events to multiple apps at the same time, just add -p app package name 2
like:
adb shell monkey -p package name 1 -p package name 2 number of events > log file
(2) Log detail level:
 -v: The verbosity level is level 1
 -v -v
 -v -v -v

ANR: application not responding, application not responding
number
(3) Increase event delay
 --throttle milliseconds
(4)-s seed number

5. Monkey event type
(1) --pct-touch percentage: touch event
Note: The percentage can be written as 70 or 70%. The sum of the percentages of multiple events cannot be greater than 100%.
(2) --pct-motion percentage: sliding event
For example: adb shell monkey -p package name -v -v -v --pct-touch 60 --pct-motion 20 5000 >log file
(3) --pct-trackball percentage: track events
(4) --pct-nav percentage: up, down, left and right direction keys
(5) --pct-majornav percentage: Home key, menu key, return key
(6) --pct-syskeys percentage: system keys such as sound keys, lock screen keys, etc.

6. Monkey debugging options
(1) --hprof: A profiling report will be generated in the /data/misc directory. The report file has a large capacity, so use it with caution.
(2) --ignore-crashes: Ignore crashes. During the execution of monkey, if it encounters a crash, it will continue to execute without stopping.
(3) --ignore-timeouts: Ignore timeout errors (ANR). During the execution of monkey, if ANR is encountered, the execution will continue without stopping.
(4) --ignore-security-exceptions: Ignore permission errors. During the execution of monkey, if a permission error is encountered, the execution will continue without stopping.
(5) --kill-process-after-error: End the process after a program error.

ADB usage guide:

Click the link to access the specific content: http://www.wanandroid.com/blog/show/2310

The author writes these test methods first and will continue to update them later. If you have other good test methods, please leave a message below! ! !

Finally, I would like to thank everyone who has read my article carefully. Looking at the increase in fans and attention, there is always some courtesy. Although it is not a very valuable thing, if you can use it, you can take it directly!

Software testing interview document

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Alibaba, Tencent, Byte, etc., and some Byte bosses have given authoritative answers. After finishing this set I believe everyone can find a satisfactory job based on the interview information.

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. Python entry skill treeWeb crawlerSelenium387439 people are learning the system