[go: up one dir, main page]

CN103279413A - Method for automated testing of software functions and stability of digital television set top box - Google Patents

Method for automated testing of software functions and stability of digital television set top box Download PDF

Info

Publication number
CN103279413A
CN103279413A CN2013101402657A CN201310140265A CN103279413A CN 103279413 A CN103279413 A CN 103279413A CN 2013101402657 A CN2013101402657 A CN 2013101402657A CN 201310140265 A CN201310140265 A CN 201310140265A CN 103279413 A CN103279413 A CN 103279413A
Authority
CN
China
Prior art keywords
test
file
testing
automated testing
digital
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.)
Granted
Application number
CN2013101402657A
Other languages
Chinese (zh)
Other versions
CN103279413B (en
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.)
GCI Science and Technology Co Ltd
Original Assignee
GCI Science and Technology 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 GCI Science and Technology Co Ltd filed Critical GCI Science and Technology Co Ltd
Priority to CN201310140265.7A priority Critical patent/CN103279413B/en
Publication of CN103279413A publication Critical patent/CN103279413A/en
Application granted granted Critical
Publication of CN103279413B publication Critical patent/CN103279413B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for automated testing of software functions and stability of a digital television set top box. The method is achieved between a middle piece and a porting layer. The method comprises the steps: S1, starting a thread of the automated testing, S2, judging whether an automatic testing file exists or not, if the automatic testing file does not exist, terminating the thread of the automated testing, and if the automatic testing file exists, carrying out the step S3, S3, detecting key input, terminating the testing or carrying out the step S4 according to the key input state, S4, judging whether the testing is started or not, if the testing is started, carrying out the step S3, or, reading testing parameters in the automatic testing file and starting the testing, S5, carrying out the testing according to the testing parameters in the automatic testing file, and S6, recording a testing result and obtaining the testing result and a report. Through the method, the problems which are not easy to find and can not be tested when the functions of the set top box are tested manually can be found or exposed.

Description

Digital TV set box software function and stable automated testing method
Technical field
The present invention relates to the software function technical field of measurement and test, more specifically, relate to a kind of digital TV set box software function and stable automated testing method.
Background technology
Produce early stage in set-top box, especially before the fixed version of definite software, test to the box software function just seems important, because it directly has influence on the stability of software finished product, affects indirectly box provider's product quality and evaluation thereof, simultaneously, because the back current cost that upgrading, maintenance bring also is the unavoidable fact, therefore, sells the preceding stability of box that guarantees of box and seem particularly important, it can reduce maintenance cost effectively, increases profit and creates public praise.
Though automatization testing technique can't directly substitute and manually judge or can't directly repair problem, provide for pinpointing the problems and dealing with problems comparatively effectively to help.But when the tester tests, some very unconspicuous problem often is hidden in the long running time, unconventional or above the complicacy operation steps, if be not " unexpected encounter " to these problems, then the very difficult tested personnel of these problems excavate out, and the original intention of automatic test approach also is in order to excavate these destruction under covering as far as possible, and does not need manually to go too much to intervene.
At present, aspect software test, provide many methods, they often are primarily aimed at black box or the white box of function that software constitutes, unit, module etc. and test, these method for testing software mostly are universal method of testing, existing method of testing is primarily aimed at the test of function performance of bottom comparatively etc., the bottom test also can't be perfect under the influence that is subjected to the possible complexity input in upper strata.The stability test of final finished is then used inside fewer or that only be used for company's product, and sharing is low.And temporarily no similar method of testing occurs aspect set-top box software function automatic test.
Summary of the invention
In order to overcome the deficiencies in the prior art, the present invention proposes a kind of digital TV set box software function and stable automated testing method.Be used for finding or exposing some the ND problems that to measure when manually set-top box functionality being tested.
To achieve these goals, technical scheme of the present invention is:
A kind of digital TV set box software function and stable automated testing method are realized at middleware and porting interlayer, may further comprise the steps:
S1. start the thread of automatic test;
S2. judge whether to exist automatic test file, as not existing, terminate thread then; As have automatic test file, then skip to step S3;
S3. detect the button input, stop test or skip to step S4 according to the button input state;
S4. judge whether test starts, and then jumps to step S3 as starting, otherwise reads the test parameter in the automatic test file, starts test;
S5. test according to the build-in test parameter of automatic test file;
S6. logging test results obtains test result and report.
The present invention carries out automatic test to the software function machine stability of digital TV set-top box, at first, in the program start process, create the thread that is used for realizing automatic test, the life cycle of this thread closely links to each other with the existence of automatic test file, automatically the existence of test file is for test thread continuous service being gone down, having determined the life cycle of test thread; If test file does not exist automatically, thread will can not stop idle running, can lower the performance impact that this test thread brings when need not to do automatic test like this.After thread startup operation, test is not to get started simultaneously, also needs to adopt the button input really to start the beginning of test in the present invention, then test according to automatic test file intrinsic parameter behind the test starting, and logging test results, obtain report.
The input of above-mentioned button is not must be truly button input, can be artificial input or triggers by the program incoming event.
Further, the key-press status of described step S3 comprises starting state, continuation state, halted state and return state;
When for starting state, then formally begin to enter test, when for the continuation state, then jump to step S4, when for halted state, stop test, wait for the startup of next round test.
Further, when described key-press status is halted state, at first judge the starting state of test, when test does not start, jump to step S3; Otherwise stop test, jump to step S3 or judge whether to replace moving test file, when need are replaced, then after replacement, jump to step S3, otherwise jump directly to step S3.
In the present invention, the state of button input comprises three kinds, the continuation state is the state that enters test pattern, halted state signal test stops, after test stopped, the tester can replace current automatic test file, detected the button input again, enter the test of a new round by button continuation state, fully provide convenience and dirigibility for test.
Automatically test file except guarantee test continue carry out, also dominated direction and situation that test is carried out, the parameter in the test file is to write according to certain rule institute, can be similar to some in the xml form.
Be in the automatic test file there to be stored parameters: event set and the individual event event test duration of total duration of test, the test number of turns, test.
Automatically stop after total duration representative test how long of its test, above-mentioned parameter item and its corresponding test duration can be placed on same delegation, event of every row, and its rule can be specified according to programmer's needs, as long as there is corresponding program that it is resolved.
Further, also store switch, print entry and the printing rank of printing in the described automatic test file.
Test duration can not be real event, but the simple mark of certain event, and test event with respect to the type of event flag, can be the type of middleware support so long as can represent and correctly be converted to the event type that middleware supports and get final product.
Further, the described automatic test file autotest file that is the embedded Linux system.
Further, obtain module printing and the middleware printing that test result comprises the porting layer among the described step S6.
The present invention can also import behind the startup thread manually, at first judges whether to respond manual input, incorporates test event formation (manual intervention) into if respond then accept manually to import, and influences test process and is recorded in the test result and go.
When beginning test, analysis program can read in the parameter information in the automatic test file of this test foundation and it is resolved, and the information of being correlated with is preserved in modes such as arrays.Can be made as the global variable value as total test duration, test event item and test item duration then be saved in the middle of the enantiomorph array for the loop body circulation send message after the corresponding conversion to middleware to reach the artificial input of simulation, the purpose of manipulator top box.Automatically test file only reads once, and this can be avoided too much file read-write operation and system call, but can take more memory source, and at test phase, this is received easily.
Compared with prior art, beneficial effect of the present invention is: 1) full-automatic analog manual operation's process also can add manual intervention when test, saves manpower and takes full advantage of time inoperative period; 2) good test configurations support and problem information are collected as and solve the problem that occurs and extend efficient help.
Description of drawings
Fig. 1 is existing digital TV set-top box summary hierarchy chart.
Fig. 2 is the overall process flow diagram of automatic test.
Embodiment
The present invention will be further described below in conjunction with accompanying drawing, but embodiments of the present invention are not limited to this.
As shown in Figure 1, the digital TV set box software framework of main flow has mainly comprised several aspects at present, from top to bottom is respectively: application layer, middleware, porting adaptation layer, system layer (embedded Linux), driving layer, hardware and peripheral hardware.Just because of the existence of this level, make between it interchange from bottom to up become single and simple, the present invention mainly pay close attention between middleware layer and the porting layer interchange with related above.
As shown in Figure 1, realizing by " message event " alternately between middleware and the porting.As: [user pushes button]-[ir drives and parses key assignments]-[the porting layer is done one deck encapsulation to key assignments, convert the press key message type that middleware can be identified to]-[porting sends to middleware by modes such as call back functions with event, press key message]-[middleware responds this event by the message processing facility of self, and with result feedback or update displayed to using].Above-mentioned the mutual clear of user and set-top box that be simply summed up basically, and whole process is also fairly simple.Recognize whole process this moment, the type that sends of message etc. there is no direct relation with the user in fact, and when mainly occurring in the porting layer message data is notified to middleware, so in the present invention, the input by analog subscriber has reached the purpose that drives the upper strata.Even can pass through this mode, with the message of the artificial input of the synthetic a series of replacements of event set, reach the effect of automatic operation.
As shown in Figure 2, start-up routine, in start-up course, create the thread that is used for realizing automatic test simultaneously, start thread, and judge whether to exist the automatic test file, general use is the embedded Linux system in the set-top box of preceding main flow, so in the present embodiment, the automatic test file is the autotest file under the embedded Linux system catalogue, when the autotest file does not exist, thread stall then, detect the Ir input otherwise enter, namely detect the button input, 11) when the key-press status of input be the continuation state, company's of being defeated three times " green key " judges then then whether test starts in the present embodiment; When test has started, then return and continue to detect the button input, when test does not start, then read in fileinfo in the autotest file, start test then, and logging test results, obtain report.12) key-press status when input is halted state, and company's of being defeated three times " red key " judges then then whether test starts in the present embodiment; When test does not start, then return and continue to detect the button input, when test has started, then end test and return the input of continuation detection button, or end to judge whether to replace current autotest file after the test, no matter whether replace, all return again herein and continue to detect the button input.13) key-press status when input is return state, is other modes of the non-above-mentioned dual mode of input in the present embodiment, then returns and continues to detect the button input.The mode that replaces current autotest file in above-mentioned " 12) " is mainly test and provides convenience and dirigibility.
The autotest file continues to carry out direction and the situation of carrying out of testing of also having dominated except what guarantee test in the present embodiment, in the present embodiment, parameter in the test file is similar to some in the xml form, and in the test file there be stored parameters automatically: event set and the individual event event test duration of total duration of test, the test number of turns, test.Automatically stop after total duration representative test how long of its test, above-mentioned parameter item and its corresponding test duration can be placed on same delegation, event of every row, and its rule can be specified according to programmer's needs, as long as there is corresponding program that it is resolved.Test duration can not be real event, but the simple mark of certain event, as represent the key-press event etc. that makes progress with DOWN even DN, test event is so long as can represent and correctly be converted to the event type that middleware supports and get final product, with respect to the type of event flag, it can be the type that middleware is supported.
When the test beginning, analysis program can initiatively read in the information of this autotest file the inside and resolve, and relevant information is preserved in modes such as arrays.Be made as the global variable value as total test event, test event item and test item duration then be saved in the middle of the enantiomorph array for the loop body circulation send message after the corresponding conversion to middleware to reach the artificial input of simulation, the purpose of manipulator top box.The autotest file only reads once, and this can be avoided too much file read-write operation and system call, but can take more memory source, and at test phase, this is received easily.
From that time of program start or test beginning, type information can be redirected, and namely by script command type information is flowed the backstage and exports in the assigned catalogue file to reduce it to the influence of system performance.The switch of printing, print entry and printing rank etc. can be configured to autotest file the inside and go.Here related printing comprises that mainly the module of porting layer is printed and middleware is printed, and its module and other control of printing level then need the support of middleware and porting.Meanwhile, carry out which step, the meetings such as result of test are got off by real time record, and what will be done after finishing for test, as: production test report, terminator operation, finished etc. by sound or some thing prompting test, all can be by the customization voluntarily as required of program self reality.At this moment; no matter test and be normally at last or crash; the purpose of test has all reached; if problems such as deadlock; software stability existing problems then being described, and causing the associative operation process that crashes and corresponding type information etc. to be retained analysis, is debug version if software uses; be provided with after the stack information, also can generate corresponding core file and provide very big help for handling problem.
Test time, can be without manual intervention, and also can be set to response or response external input message not in the test process.When test come off duty, inoperative such as rest is during the period, then do not influence test man's life-time.Through above-mentioned explanation, begin to pinpointing the problems again to issue handling provides related thread from test, whole process, this automatic test provides corresponding information support
As shown in Figure 2, the present invention can also import after starting thread manually, at first judge whether to respond manual input, incorporate test event formation (manual intervention) into if respond then accept manually to import, influence test process and be recorded in the test result and go.
Above-described embodiments of the present invention do not constitute the restriction to protection domain of the present invention.Any modification of within spiritual principles of the present invention, having done, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (8)

1. a digital TV set box software function and stable automated testing method is characterized in that, realize at middleware and porting interlayer, may further comprise the steps:
S1. start the thread of automatic test;
S2. judge whether to exist automatic test file, as not existing, terminate thread then; As have automatic test file, then skip to step S3;
S3. detect the button input, stop test or skip to step S4 according to the button input state;
S4. judge whether test starts, and then jumps to step S3 as starting, otherwise reads the test parameter in the automatic test file, starts test;
S5. test according to the test parameter in the automatic test file;
S6. logging test results obtains test result and report.
2. digital TV set box software function according to claim 1 and stable automated testing method is characterized in that, the key-press status of described step S3 comprises starting state, continuation state, halted state;
When for starting state, then formally begin to enter test, when for the continuation state, then jump to step S4, when for halted state, stop test, wait for the startup of next round test.
3. digital TV set box software function according to claim 2 and stable automated testing method is characterized in that, when described key-press status is halted state, at first judge the starting state of test, when test does not start, jump to step S3; Otherwise stop test, jump to step S3 or judge whether to replace moving test file, when need are replaced, then after replacement, jump to step S3, otherwise jump directly to step S3.
4. digital TV set box software function according to claim 1 and stable automated testing method, it is characterized in that in the described automatic test file there being stored parameters: event set and the individual event event test duration of total duration of test, the test number of turns, test.
5. digital TV set box software function according to claim 4 and stable automated testing method is characterized in that, also store switch, the print entry of printing in the described automatic test file and print rank.
6. digital TV set box software function according to claim 4 and stable automated testing method is characterized in that, described test event is to represent and correctly to be converted to the event type of middleware support or the type that middleware is supported.
7. according to claim 1 to 6 each described digital TV set box software function and stable automated testing method, it is characterized in that the autotest file that described automatic test file is the embedded Linux system.
8. digital TV set box software function according to claim 1 and stable automated testing method is characterized in that, obtain module printing and middleware printing that test result comprises the porting layer among the described step S6.
CN201310140265.7A 2013-04-22 2013-04-22 Digital TV set box software function and stability automated testing method Expired - Fee Related CN103279413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310140265.7A CN103279413B (en) 2013-04-22 2013-04-22 Digital TV set box software function and stability automated testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310140265.7A CN103279413B (en) 2013-04-22 2013-04-22 Digital TV set box software function and stability automated testing method

Publications (2)

Publication Number Publication Date
CN103279413A true CN103279413A (en) 2013-09-04
CN103279413B CN103279413B (en) 2016-06-01

Family

ID=49061942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310140265.7A Expired - Fee Related CN103279413B (en) 2013-04-22 2013-04-22 Digital TV set box software function and stability automated testing method

Country Status (1)

Country Link
CN (1) CN103279413B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270630A (en) * 2014-09-05 2015-01-07 深圳创维数字技术有限公司 Terminal testing method and terminal
CN107748302A (en) * 2017-09-06 2018-03-02 国营芜湖机械厂 A kind of automatic test control method of seat electric attachments automatic Synthesis detection device
US10042638B2 (en) 2014-09-30 2018-08-07 Entit Software Llc Evaluating documentation coverage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555014A (en) * 2003-12-26 2004-12-15 中兴通讯股份有限公司 Human-machine order testing method
CN101159499A (en) * 2007-11-07 2008-04-09 中兴通讯股份有限公司 System and method of testing hardware module
CN101187894A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 A keyword-driven automatic testing method and its testing system
US20100100871A1 (en) * 2008-10-22 2010-04-22 International Business Machines Corporation Method and system for evaluating software quality

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555014A (en) * 2003-12-26 2004-12-15 中兴通讯股份有限公司 Human-machine order testing method
CN101187894A (en) * 2006-11-15 2008-05-28 中兴通讯股份有限公司 A keyword-driven automatic testing method and its testing system
CN101159499A (en) * 2007-11-07 2008-04-09 中兴通讯股份有限公司 System and method of testing hardware module
US20100100871A1 (en) * 2008-10-22 2010-04-22 International Business Machines Corporation Method and system for evaluating software quality

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104270630A (en) * 2014-09-05 2015-01-07 深圳创维数字技术有限公司 Terminal testing method and terminal
US10042638B2 (en) 2014-09-30 2018-08-07 Entit Software Llc Evaluating documentation coverage
CN107748302A (en) * 2017-09-06 2018-03-02 国营芜湖机械厂 A kind of automatic test control method of seat electric attachments automatic Synthesis detection device

Also Published As

Publication number Publication date
CN103279413B (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN103365779B (en) Method for testing software and system
CN104391795B (en) Method and system for automatically testing coverage rate in distributed system
KR101404104B1 (en) Diagnostic system and operating method for home appliance
CN111240973B (en) Equipment testing method and system based on simulation and readable storage medium
CN107222739B (en) A kind of IPTV service quality dial testing method based on crawler technology
CN101478696A (en) Automatic test method, system and multimedia device for test cases
CN103279413A (en) Method for automated testing of software functions and stability of digital television set top box
CN109151466A (en) A kind of android system platform clectronic equipment utility function automatic test approach
CN104166610A (en) Mobile terminal detection method and detection system
CN104778118B (en) The improved method of automatization testing technique
CN103605604B (en) A kind of method of batch testing set-top box software stability
CN101378500A (en) Method and apparatus for managing video data
CN105225066B (en) Workflow legality verification method and verification device
CN102981418A (en) Power management for audience measurement meters
CN102426551A (en) Test data screening method and device and test data construction method and device
CN110543300A (en) automatic generation method and tool for automatic test script of automobile instrument
CN108802517A (en) A kind of test method and system of site protective device
CN109376880A (en) Failure feedback method, device and access control equipment
CN109709923A (en) Test control method and device, system, computer readable storage medium
CN106294172A (en) App self-testing method based on terminal unit and device
CN106708725A (en) Test sequence dynamic management method combining test with diagnosis
CN109640078A (en) Set-top box test method, device, set-top box and computer readable storage medium
CN110928795A (en) Stability test method and device for upgrading storage system
CN109932588A (en) A kind of Aerial Electronic Equipment validation test engine
CN202050507U (en) Video display testing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160601