Part of the development work in software testing

 

A tool: test commonly used features, screenshots cut log, view the version information, a key test environment to build, ad landing page jump, the import and export system files, script recording, voice testing large ears

 

Two: the need for sugar cubes on-line video software, the background will be changed often on different channels, you need to test iQIYI sugar in the video multiple platforms, Youku and other APP download address is correct, whether the normal jump after a successful download turn. To manual operation, not only the need to repeat the install and uninstall apk apk, also download control address is correct, so the development of the software, automated comparison Log information is performed by reading the corresponding data excel table, it is determined whether the correct Download ; To compare whether the jump page, then use OpenCV judgment

 

 

 Tools III: detecting whether duplicate data interfaces, see the TV has duplicate data, determine the client's problem or server problem, and clearly to the question of who is the server

 

 

 

 

Tool Four: test platform, the development of this platform, refer to "develop test automation platform Python Test Development Operational"

 

 

Details of each tool

Automated testing gadgets:

 

 

 This view system information tool mainly to meet the daily tests, the interception Log, screenshots, advertising landing pages Jump (eliminating the need for tedious backend configuration), a key switch smart TV script recording, a formal environmental testing environment, intelligent voice test

1 "log menu screenshot

 

 

 Click cut log will execute the following code

handle = subprocess.Popen("adb logcat -v threadtime > log.txt", shell=True)
time.sleep(3)
subprocess.Popen("taskkill /F /T /PID " + str(handle.pid) , shell=True)

Note that, in order to avoid the emergence of the situation anr graphical interface appears, you need to set it to multi-threaded processing

DEF log_1 (): 
    handle = subprocess.Popen ( " the adb logcat -v threadtime> log.txt " , the shell = True) 
    the time.sleep ( . 3 ) 
    subprocess.Popen ( " the taskkill / F. / T / the PID " + STR (handle .pid), shell = True)
 # set to multithreading, otherwise the same time respond to multiple buttons become unresponsive 
DEF log (): 
    t = threading.Thread (target = log_1) 
    t.start ()

Player small window Log: Players test often encountered problems, in order to pinpoint problems in the code, find the cause of the Bug, use grep selected player log information

Clear Log: use adb logcat -c

Screenshot: Screenshot due to the need adb command, and then export it to windows windows system, so click directly call the bat script, named according to the time screenshots

Screenshot bat script as follows

@echo off
set date=%Date:~0,4%%Date:~5,2%
set time=%Time:~0,2%%Time:~3,2%%Time:~6,2%
:: set /a m=%time:~10,4%
echo start
adb shell /system/bin/screencap -p /sdcard/a.png
adb pull /sdcard/a.png  .\logandpic\%date%%time%.png
adb shell rm -rf /sdcard/a.png

Screen recording: the same retrieval bat script, only 838 platform before you can use

OFF @echo 
the REM echo % DATE: // ~ -3% extract information week 
the REM echo % Time: // ~ 0,5% extract and fraction of time when 
the REM echo % Time: 0 ~, // -3% and second extraction points and information 
SET DATE =% a Date: ~ 0,4 %% a Date: ~ 5,2% 
SET time = time%: time %% ~ 0,2: 3,2- %% ~ time: ~. 6 , 2% 
the REM SET / AM% = Time: ~ 10,4% 
the adb the shell / System / bin screenrecord to \ Screenshot \% DATE% -%% Time .mp4.

Open the folder: Open the folder to save screenshot

os.system(r'start .\logandpic')

 

Guess you like

Origin www.cnblogs.com/ffrs/p/11432410.html