CN110597679A - Shell script-based channel changing pressure testing system and method - Google Patents

Shell script-based channel changing pressure testing system and method Download PDF

Info

Publication number
CN110597679A
CN110597679A CN201910893013.9A CN201910893013A CN110597679A CN 110597679 A CN110597679 A CN 110597679A CN 201910893013 A CN201910893013 A CN 201910893013A CN 110597679 A CN110597679 A CN 110597679A
Authority
CN
China
Prior art keywords
channel
test
data
live broadcast
shell script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910893013.9A
Other languages
Chinese (zh)
Inventor
任玉梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201910893013.9A priority Critical patent/CN110597679A/en
Publication of CN110597679A publication Critical patent/CN110597679A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2236Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test CPU or processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing

Abstract

The invention discloses a channel-changing pressure testing system based on a shell script, which comprises a PC (personal computer), intelligent equipment, a signal source and a core debugging tool, wherein the PC comprises: the PC issues a channel switching pressure test instruction and receives feedback data and stores and analyzes the data, and the intelligent equipment is preassembled with a live broadcast module and receives and executes the test instruction of the PC through the core debugging tool. Also disclosed is a method comprising: starting a live broadcast module of the intelligent equipment and loading a live broadcast channel; importing a shell script and communicating with intelligent equipment; the PC circularly sends channel changing key values and stores the identification files of all live channels by taking the channel numbers as names respectively; and testing the channel identification file, the memory occupation and the CPU occupation data every channel change until the test is finished. The invention ensures timely interruption when the test is abnormal, quickly locks the fault trigger point and timely retains the data and the fault phenomenon; meanwhile, a special person is not needed to watch, and the working efficiency is improved.

Description

Shell script-based channel changing pressure testing system and method
Technical Field
The invention relates to the technical field of channel changing pressure testing of media equipment, in particular to a channel changing pressure testing system and method based on shell scripts.
Background
With the rapid development of new media, Android intelligent device live broadcast channels are increasing day by day, for example, live broadcast modules such as various live broadcast APPs, digital televisions of televisions and set top boxes, and the number of programs owned by the live broadcast modules is generally over 100, and the number of the programs is increased year by year, so that the test of the live broadcast modules is particularly important to the pressure test of channel change playing. Although some automatic devices capable of realizing automatic channel switching replace complicated manual tests at present, most of the devices are poor in compatibility and need to be adapted with equipment to be tested, and the test cannot be immediately suspended to keep the site under abnormal conditions in the test process; and with the iterative update of the equipment to be tested, the test device still needs to be maintained frequently, and the purchase of the device and the maintenance need to increase the test cost.
Disclosure of Invention
The invention aims to provide a channel-changing pressure test system and method based on a shell script, which are used for solving the problems that a test device needs to be adapted to equipment to be tested in an automatic channel-changing pressure test and a field can not be temporarily reserved due to test abnormity in the prior art.
The invention solves the problems through the following technical scheme:
the utility model provides a pressure test system trades platform based on shell script, includes PC, smart machine, signal source and core debugging frock, wherein:
the PC is used for running the shell script, issuing a test instruction, receiving feedback data, storing and analyzing the data; the shell script is used for carrying out pressure test on a live broadcast module of the intelligent equipment;
the intelligent equipment is preassembled with a live broadcast module and used for receiving and executing a test instruction of the PC;
the signal source is used for outputting signals to a live broadcast module of the intelligent equipment;
and the movement debugging tool is used for the communication connection of the PC and the intelligent equipment.
The PC machine comprises: as a control core of the whole test, the shell script is operated to be responsible for issuing instructions, controlling the test flow, receiving data, analyzing, processing and storing information and controlling the operation of the whole pressure test; the PC and the shell script running on the PC are compiled instruction sets and are used for automatically completing pressure test on a live broadcast module of the android intelligent equipment, the live broadcast module is pre-installed on the android intelligent equipment, and the android intelligent equipment can be an intelligent television or a set top box, a digital television, an analog television and the like;
the signal source is responsible for outputting a set signal to a live broadcast module pre-installed in the android intelligent device so that the signal source outputs corresponding channel content; the signal output by the signal source generally comprises a network signal, a digital television signal, an analog signal and the like;
the core debugging tool can be used for communication following a standard serial port communication protocol through a USB serial port line.
Running the shell script through the serial port, reading DEBUG information of the core, judging whether the channel switching process is normal, monitoring occupation conditions of the memory and the CPU and judging and processing, pausing a test flow when abnormality occurs, and reserving test data so as to analyze.
A channel changing pressure test method based on shell scripts comprises the following steps:
step S100: starting a live broadcast module of the intelligent equipment, accessing a signal source, and loading or searching a live broadcast channel;
step S200: leading in a shell script by a PC (personal computer), and communicating with intelligent equipment through a core debugging tool;
step S300: the PC circularly sends channel changing key values according to interval duration set by the shell script, and stores identification files of all live channels by taking channel numbers as names;
step S400: and testing the channel identification file, the memory occupation and the CPU occupation data for each channel change until the preset channel change times are reached, and finishing the test.
Further, step S400 specifically includes:
step S410: after a fixed delay, a new identification file of the current channel is obtained and stored in another directory with the channel number as the name, and compared with the file with the same name in step S300,
if the channel change is inconsistent, prompting that channel change fails, pausing the test process, and storing the test data and recording the time point;
if the identification file is known, deleting the new identification file, and entering the next step;
step S420: acquiring current memory occupation data of a live broadcast module through a shell script, comparing the current memory occupation data with a preset maximum memory value, judging the current memory occupation data to be abnormal if the current memory occupation data is larger than the preset maximum memory value, prompting memory overflow, pausing a test process, and reserving the test data for analysis; otherwise, judging the result to be normal, and entering the next step;
step S430: acquiring current CPU occupation data of a live broadcast module through a shell script, comparing the current CPU occupation data with a preset CPU maximum value, judging that the current CPU occupation data is abnormal if the current CPU occupation data is larger than the preset CPU maximum value, prompting that the CPU occupation is too high, pausing a test process, and reserving the test data for analysis; otherwise, judging the result to be normal, and entering the next step;
step S440: and (4) counting the channel changing times, judging whether the preset cycle times are reached, if not, refreshing and displaying the channel changing times and entering the step S410, otherwise, prompting that the test is finished and finishing the test.
By the method, the shell script is operated through the core debugging tool in the live broadcast module, so that automatic channel changing is realized, and meanwhile, whether the live broadcast is normally played after channel changing is monitored in real time, and the memory occupation and CPU occupation conditions of the live broadcast module in the repeated channel changing process are monitored. The current situation that a specially-assigned person needs to be arranged for watching in the current channel changing test process is changed, and the person is liberated from the test work with strong repeatability so as to be concentrated on the analysis and the solution of the abnormal problem and the improvement of the test means, and the whole work efficiency is improved; the method can test the channel switching and playing process of the live broadcast module in an all-round manner, ensures that the test flow is interrupted in time when the test is abnormal, quickly locks the fault trigger point, retains the related data and the fault phenomenon in time, and prevents artificial careless omission.
Compared with the prior art, the invention has the following advantages and beneficial effects:
according to the invention, through the design of the circular shell script, whether the channel is successfully changed and the conditions of memory occupation and CPU occupation are monitored in real time in the automatic channel changing process, the purchase and maintenance cost of an automatic testing device is not paid out, and the timely interruption of a testing process, the rapid locking of a fault trigger point and the timely retention of related data and fault phenomena in abnormal testing can be ensured; meanwhile, a person does not need to be attended by a special person, the person is liberated from the test work with strong repeatability, and the work efficiency is improved.
Drawings
FIG. 1 is a flow chart of the test of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
the utility model provides a pressure test system trades platform based on shell script, includes PC, smart machine, signal source and core debugging frock, wherein:
the PC is used for running the shell script, issuing a test instruction, receiving feedback data, storing and analyzing the data; the shell script is used for carrying out pressure test on a live broadcast module of the intelligent equipment;
the intelligent equipment is preassembled with a live broadcast module and used for receiving and executing a test instruction of the PC;
the signal source is used for outputting signals to a live broadcast module of the intelligent equipment;
and the movement debugging tool is used for the communication connection of the PC and the intelligent equipment.
The PC machine comprises: as a control core of the whole test, the shell script is operated to be responsible for issuing instructions, controlling the test flow, receiving data, analyzing, processing and storing information and controlling the operation of the whole pressure test; the PC and the shell script running on the PC are compiled instruction sets and are used for automatically completing pressure test on a live broadcast module of android intelligent equipment, and the android intelligent equipment can be an intelligent television or a set top box, a digital television, an analog television and the like;
the signal source is responsible for outputting a set signal to a live broadcast module pre-installed in the android intelligent device so that the signal source outputs corresponding channel content; the signal output by the signal source generally comprises a network signal, a digital television signal, an analog signal and the like;
the core debugging tool can be used for communication following a standard serial port communication protocol through a USB serial port line.
Running the shell script through the serial port, reading DEBUG information of the intelligent device/core, judging whether the channel switching process is normal, monitoring the occupation conditions of the memory and the CPU and judging and processing, and when the abnormal conditions occur, pausing the test flow and reserving the test data so as to analyze.
Example 2:
referring to fig. 1, a channel change pressure testing method based on shell scripts includes:
step 1, starting a live broadcast module pre-installed in android intelligent equipment, accessing a fixed signal, and loading or searching all live broadcast channels; the method specifically comprises the following steps:
under the condition of intelligent television networking, a network live broadcast APP is opened, and all live broadcast channels are loaded in the opening process of the live broadcast APP for a user to watch;
step 2, the PC machine communicates with the android intelligent device through a core debugging tool, and a shell script is introduced, and the method specifically comprises the following steps:
and connecting the PC and the smart television by using a USB (universal serial bus) to serial port lines, inputting a debugging command in a serial port tool, and determining whether correct DEBUG information is output or not so as to determine whether the connection is normal or not. Importing and running a shell script after the connection is normal;
step 3, circularly sending channel change key values according to set interval duration through the shell script, and respectively storing original identification files of all live channels by taking the channel numbers as names, wherein the method specifically comprises the following steps:
through a USB serial port, acquiring the total number of channels, inputting an ' input key ' program +/-key value ' for changing channels, calling a sleep command to set delay after fixed delay (such as 8 seconds), inputting a command through a serial port tool to acquire identification information of a current channel, and storing the identification information in a file (file1) under a current directory by taking a current channel number as a name; entering the step 4;
step 4, the shell script sends a channel change key value once, acquires an identification file of the current channel after fixed time delay, takes the channel number as a new file to be stored in another directory, compares the channel number with the identification file with the same name in the step 3, prompts 'channel change failure' if the channel number is inconsistent with the identification file with the same name in the step 3, pauses the test flow, and reserves test data for analysis; if yes, deleting the new identification file, specifically including:
the Shell script defines a USB serial port input cmp file1 file2, a new identification file (file2) generated in the step 4 is compared with a corresponding file (file1) in the original identification file, the condition is added to judge if [ $0 ═ 0] is equal to 0], namely the return value is 0, the new identification file is deleted if the condition is consistent, the step 5 is carried out, otherwise, the related system logs are automatically packed and the time point is recorded, and then the step 8 is carried out;
step 5, acquiring current memory occupation data of the live broadcast module through the shell script, comparing the current memory occupation data with a preset maximum memory value, if the current memory occupation data is larger than the preset maximum memory value, judging the current memory occupation data to be abnormal, prompting memory overflow, pausing a test process, and reserving the test data so as to be analyzed, otherwise, judging the current memory occupation data to be normal, and specifically comprising the following steps of:
inputting commands through the USB serial port, such as:
dumpsys meminfo grep application package name | sed-n '1p' | Busybox awk '{ print $1}' | Busybox-d 'K:'
Acquiring a memory occupation value, comparing the memory occupation value with a preset maximum memory occupation value, namely adding judgment, if the memory occupation value is larger than the maximum value, judging the memory occupation value to be abnormal, prompting memory overflow, pausing a test process, reserving test data for analysis, and if the memory occupation value is not larger than the maximum value, judging the memory occupation value to be normal, and entering a step 6;
step 6, acquiring current CPU occupation data of the live broadcast module through the shell script, comparing the current CPU occupation data with a preset CPU maximum value, judging the data to be abnormal if the current CPU occupation data is larger than the preset CPU maximum value, prompting that the CPU occupation is too high, pausing a test process, and reserving the test data for analysis; otherwise, the judgment is normal, and specifically includes:
inputting a command through a USB serial port:
top-n 1| grep 'application package name'. non-traditional Chinese medicine
Acquiring a CPU occupation value, comparing the CPU occupation value with a preset CPU maximum value, judging that the CPU occupation value is abnormal if the CPU occupation value is larger than the preset CPU maximum value, prompting that the CPU occupation is too high, pausing a test process, and reserving test data for analysis; otherwise, judging the operation to be normal, and entering a step 7;
and 7, counting channel change times, judging whether preset cycle times are reached, refreshing and displaying the channel change times and entering the step 4 if the preset cycle times are not reached, otherwise prompting that the test is finished and entering the step 8.
And 8, ending the test.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.

Claims (3)

1. The utility model provides a pressure test system trades platform based on shell script which characterized in that, includes PC, smart machine, signal source and core debugging frock, wherein:
the PC is used for running the shell script, issuing a test instruction, receiving feedback data, storing and analyzing the data; the shell script is used for carrying out pressure test on a live broadcast module of the intelligent equipment;
the intelligent equipment is preassembled with a live broadcast module and used for receiving and executing a test instruction of the PC;
the signal source is used for outputting signals to a live broadcast module of the intelligent equipment;
and the movement debugging tool is used for the communication connection of the PC and the intelligent equipment.
2. A channel-changing pressure test method based on shell scripts is characterized by comprising the following steps:
step S100: starting a live broadcast module of the intelligent equipment, accessing a signal source, and loading or searching a live broadcast channel;
step S200: leading in a shell script by a PC (personal computer), and communicating with intelligent equipment through a core debugging tool;
step S300: the PC circularly sends channel changing key values according to interval duration set by the shell script, and stores identification files of all live channels by taking channel numbers as names;
step S400: and testing the channel identification file, the memory occupation and the CPU occupation data for each channel change until the preset channel change times are reached, and finishing the test.
3. The channel-changing pressure testing method based on the shell script as claimed in claim 2, wherein the step S400 specifically includes:
step S410: after a fixed delay, a new identification file of the current channel is obtained and stored in another directory with the channel number as the name, and compared with the file with the same name in step S300,
if the test data are inconsistent, the channel change fails, the test flow is suspended, and the test data are stored;
if the identification file is known, deleting the new identification file, and entering the next step;
step S420: acquiring current memory occupation data of a live broadcast module through a shell script, comparing the current memory occupation data with a preset maximum memory value, judging that the current memory occupation data is abnormal if the current memory occupation data is larger than the preset maximum memory value, pausing a test process, and reserving the test data for analysis; otherwise, judging the result to be normal, and entering the next step;
step S430: acquiring current CPU occupation data of a live broadcast module through a shell script, comparing the current CPU occupation data with a preset CPU maximum value, judging that the current CPU occupation data is abnormal if the current CPU occupation data is larger than the preset CPU maximum value, pausing a test process, and reserving the test data for analysis; otherwise, judging the result to be normal, and entering the next step;
step S440: counting channel changing times, judging whether preset cycle times are reached, if not, refreshing and displaying the channel changing times and returning to the step S410; otherwise, the test is ended.
CN201910893013.9A 2019-09-20 2019-09-20 Shell script-based channel changing pressure testing system and method Pending CN110597679A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910893013.9A CN110597679A (en) 2019-09-20 2019-09-20 Shell script-based channel changing pressure testing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910893013.9A CN110597679A (en) 2019-09-20 2019-09-20 Shell script-based channel changing pressure testing system and method

Publications (1)

Publication Number Publication Date
CN110597679A true CN110597679A (en) 2019-12-20

Family

ID=68861781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910893013.9A Pending CN110597679A (en) 2019-09-20 2019-09-20 Shell script-based channel changing pressure testing system and method

Country Status (1)

Country Link
CN (1) CN110597679A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130059786A (en) * 2011-11-29 2013-06-07 (주)에이치엠솔루션 System for measuring quality of digital television settop box
CN104918043A (en) * 2014-03-12 2015-09-16 北京市博汇科技股份有限公司 Program broadcast testing method and device
CN105608005A (en) * 2015-12-23 2016-05-25 深圳创维-Rgb电子有限公司 Television system test method and system
CN105760304A (en) * 2016-03-07 2016-07-13 四川长虹电器股份有限公司 Method for automatically detecting television channel search
US9959192B1 (en) * 2015-09-15 2018-05-01 Google Llc Debugging interface for inserted elements in a resource
CN109151462A (en) * 2018-11-02 2019-01-04 四川长虹电器股份有限公司 The method of Android intelligent television booting video pressure test

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130059786A (en) * 2011-11-29 2013-06-07 (주)에이치엠솔루션 System for measuring quality of digital television settop box
CN104918043A (en) * 2014-03-12 2015-09-16 北京市博汇科技股份有限公司 Program broadcast testing method and device
US9959192B1 (en) * 2015-09-15 2018-05-01 Google Llc Debugging interface for inserted elements in a resource
CN105608005A (en) * 2015-12-23 2016-05-25 深圳创维-Rgb电子有限公司 Television system test method and system
CN105760304A (en) * 2016-03-07 2016-07-13 四川长虹电器股份有限公司 Method for automatically detecting television channel search
CN109151462A (en) * 2018-11-02 2019-01-04 四川长虹电器股份有限公司 The method of Android intelligent television booting video pressure test

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KAVINXUE: "Shell脚本切换电视频道", 《HTTPS://WWW.CNBLOGS.COM/KAVINXUE/P/7389262.HTML》 *

Similar Documents

Publication Publication Date Title
CN107516510B (en) Automatic voice testing method and device for intelligent equipment
CN102665093B (en) Test method for set top box and test system thereof
CN105094783B (en) method and device for testing stability of android application
CN109361562B (en) Automatic testing method based on associated network equipment access
CN112596972A (en) Vehicle-mounted equipment testing method, device and system and computer equipment
CN104246714A (en) Software defect verification
CN103365770A (en) Mobile terminal software testing system and software testing method
CN101887392A (en) Method and device for testing software system operation stability
CN104850499A (en) Automatic test method and device for base band software
CN112559372A (en) Interface test case generation method, system and storage medium
CN103605604A (en) Method for batch testing of set-top box software stability
CN112732587A (en) Method and device for acquiring automatic test log, electronic equipment and storage medium
CN108874649A (en) Generation method, device and its computer equipment of automatic test script
CN106294172A (en) App self-testing method based on terminal unit and device
CN112269697B (en) Equipment storage performance testing method, system and related device
CN108810525A (en) A kind of combined Intelligent set top box volume production test method and system
CN110597679A (en) Shell script-based channel changing pressure testing system and method
CN201123074Y (en) Testing device for detecting stability of set-top box
CN116244133A (en) Hard disk test management method, system, terminal and storage medium
CN107704379A (en) A kind of video recording system and application method suitable for automatic test course
CN113608089B (en) SOA test method, system and device for switching power supply MOS tube and readable storage medium
CN115396352A (en) CMS server-side protocol testing method, system, equipment and storage medium
CN107273296A (en) The method of testing and test device of a kind of software
CN113691669A (en) Android mobile phone APP control vehicle full-process test analysis system and method
CN108932171B (en) Embedded software interaction method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220

RJ01 Rejection of invention patent application after publication