CN101727393A - Method for dynamically testing embedded system software - Google Patents

Method for dynamically testing embedded system software Download PDF

Info

Publication number
CN101727393A
CN101727393A CN200910256475A CN200910256475A CN101727393A CN 101727393 A CN101727393 A CN 101727393A CN 200910256475 A CN200910256475 A CN 200910256475A CN 200910256475 A CN200910256475 A CN 200910256475A CN 101727393 A CN101727393 A CN 101727393A
Authority
CN
China
Prior art keywords
test
tested program
analogue
test case
key
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
CN200910256475A
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.)
Hisense Broadband Multimedia Technology Co Ltd
Original Assignee
Hisense Broadband Multimedia 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 Hisense Broadband Multimedia Technology Co Ltd filed Critical Hisense Broadband Multimedia Technology Co Ltd
Priority to CN200910256475A priority Critical patent/CN101727393A/en
Publication of CN101727393A publication Critical patent/CN101727393A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for dynamically testing embedded system software which comprises a tested program to be dynamically tested. The method comprises the following steps: setting a test module for dynamically testing the tested program in the tested program; and calling the test module in the running process of the tested program so as to implement the dynamic test on the tested program. The method implements automatic dynamic test on the software without a special hardware test platform by embedding the test module into the tested program and automatically calling the test module to dynamically test the tested program in the running process of the tested program.

Description

A kind of dynamic testing method of built-in system software
Technical field
The present invention relates to a kind of method of testing of software, specifically, relate to a kind of built-in system software be carried out the method for dynamic test, belong to the software testing technology field.
Background technology
At present, embedded design has become the modernization of industry, intelligentized the only way which must be passed, and embedded product has been deep into all trades and professions.Because the special-purpose degree of embedded system is higher, the whole inheritance of system is less relatively, in order to guarantee the stability of system, the test of built-in system software becomes an important step of embedded development, also is the key link of software from the performance history to the application process.Whether method for testing software according to needs operational objective code, can be divided into two kinds of static test and dynamic tests.Static test is the operational objective program code not, mainly comprises code check, static structure analysis, code quality tolerance and document test etc.Dynamic test is by the operation tested program, checks the difference of operation result and expected results, and performances such as analysis software operational efficiency and robustness.
Along with the high speed development of embedded platform software and hardware, the testing tool of embedded platform and method of testing are also more and more advanced, more and more perfect.But because the singularity of embedded system, the automated testing method that can't be applied in comparative maturity " recording-playback " on the PC platform carries out dynamic test to built-in system software.At present, the dynamic test of built-in system software mainly adopts two kinds of methods:
The first, adopt PC software and supporting hardware platform (as emulator) to carry out alternately with target platform, realize dynamic test to built-in system software.Hardware platforms such as employing emulator are tested, and can single step carry out tested program, and not only efficient is higher, and automaticity is also higher.But its shortcoming is: on the one hand, need to buy special-purpose testing hardware platform, cost an arm and a leg, cost is higher; On the other hand, the testing hardware platform is at the design of specific objective platform development, and its versatility is relatively poor.The untapped special test hardware platform of some target embedded platform then can't adopt this method to carry out the dynamic test of software.
The second, adopt black box method of testing, test by tester's manual operation.There is not the software test module this method in itself, and is therefore relatively poor to the healthy and strong performance test effect of software fully by manually operating, and can not determine the stability of software fast, causes that test speed is slow, efficient is low and can not realize automatic test.
Summary of the invention
The present invention is directed to the above-mentioned shortcoming and defect that the built-in system software dynamic test exists in the prior art, a kind of dynamic testing method of built-in system software is provided, by in tested program, embedding test module, in the tested program operational process, call test module automatically tested program is carried out dynamic test, under the situation that does not need the specialized hardware test platform, realized the robotization dynamic test of software.
For solving the problems of the technologies described above, the present invention is achieved by the following technical solutions:
A kind of dynamic testing method of built-in system software comprises the tested program that need carry out dynamic test; In described tested program, be provided with the test module that tested program is carried out dynamic test, in the tested program operational process, call described test module, realize dynamic test described tested program.
According to the present invention, described test module can be realized the performance test to tested program execution speed aspect, and the specific implementation method is: described test module is provided with test case performance element and test case storage unit; When in the tested program operational process, calling described test case performance element, described test case performance element at first obtains test case from described test case storage unit, obtain the current active window of tested program then, and the test case of being obtained is exported in the current active window of described tested program.
According to the present invention, for improving the versatility of test case, the test case in the described test case storage unit is the format test case; Described test case performance element obtains test case from described test case storage unit after, earlier test case is resolved, and then the test case after will resolving exports in the current active window of described tested program.
According to the present invention, described test case performance element can adopt following method to obtain the current active window of tested program: by calling the correlation module entrance function of described tested program, obtain and the corresponding tested program of test case interface, and be the current active window the tested program layout setting of being obtained.
According to the present invention, described test module can realize that the specific implementation method is: described test module is provided with analogue-key performance element and analogue-key storage unit to the test of the healthy and strong performance of tested program; When in the tested program operational process, calling described analogue-key performance element, described analogue-key performance element obtains the analogue-key value from described analogue-key storage unit, and the bottom that exports the analogue-key value of being obtained to embedded system calls for described tested program by key processing module.
According to the present invention, for realizing the random operation test to tested program, described analogue-key performance element obtains the analogue-key value according to following method from described analogue-key storage unit:
The analogue-key performance element produces random number;
Calculate the mould value of described random number to the analogue-key sum stored in the described analogue-key storage unit;
From described analogue-key storage unit, obtain corresponding analogue-key value according to described mould value.
According to the present invention, described test module is embedded in the described tested program with the form of chock, is convenient to tested program calling test module.
Compared with prior art, advantage of the present invention and good effect are:
1, by test module is set in tested program, can in the tested program implementation, calls described test module automatically tested program is tested automatically, improve the automaticity of built-in system software dynamic test, improve testing efficiency.
2, by the test case performance element is set in test module, can realize performance test automatically to the tested program execution speed, replace artificial implementation of test cases with the program implementation of test cases, can find the stability of entire system fast, improved testing efficiency.
3, by the analogue-key performance element is set in test module, can simulate high strength user operation and random operation easily, realize robustness testing to tested program, testing efficiency height, test performance are accurate.
Description of drawings
Fig. 1 is the basic flow sheet of an embodiment of dynamic testing method of built-in system software of the present invention;
Fig. 2 is the workflow diagram of test case performance element among Fig. 1 embodiment;
Fig. 3 is the workflow diagram of analogue-key performance element among Fig. 1 embodiment.
Embodiment
The present invention is further detailed explanation below in conjunction with accompanying drawing.
The present invention is directed to cost height or the low deficiency of test automation degree that existing built-in system software dynamic test exists, a kind of dynamic testing method of built-in system software is provided.The core of this method is in the built-in system software program test module to be set, and in the tested program operational process, can call this test module as required automatically, by the dynamic test of operation test module realization to tested program.Use dynamic testing method of the present invention, test process is changed into Automatic Program by existing manual operation and is called execution, not only can realize automatic test to the tested program partial properties, and the inside implementation that can intervene tested program, realize white-box testing, and can in test process, find the performance of entire system apace, test speed is fast, efficient is high, cost is low, be easy to realize.
In described test module, test case performance element, analogue-key performance element etc. can be set as required, to realize test to the tested program different performance.
Fig. 1 shows the basic flow sheet of an embodiment of dynamic testing method of built-in system software of the present invention.
In this embodiment, for ease of call test module in the tested program implementation, test module is embedded in the described tested program with the form of chock.Be provided with on the one hand test case performance element and corresponding test case storage unit in the test module, in the described test case storage unit pre-stored several test cases, be used to realize performance test to tested program execution speed aspect; On the other hand, also be provided with analogue-key performance element and corresponding analogue-key storage unit, described analogue-key storage unit pre-stored several analogue-key values, in order to simulation high strength user operation and random operation, realize test to the healthy and strong performance of tested program.
In this embodiment, the user interface definition of test module is two-layer, and ground floor enters the test case performance element with electing still be the analogue-key performance element, and the second layer mainly is to carry out the interface accordingly.
As shown in Figure 1, the basic procedure of this embodiment is as follows:
S101: flow process begins.
S102: embedded system initialization.
S103: operation tested program.
S104: judge whether to call test module.If call test module, execution in step S105; If the never call test module continues step S103, the operation tested program.
At the tested program operational process, can carry out the test of correlated performance to tested program as required at any time to calling test module.
S105: judge whether implementation of test cases.If implementation of test cases, execution in step S106; If not implementation of test cases then goes to step S108.After calling test module, it is implementation of test cases or analogue-key that the user can select from the user interface of test module, if implementation of test cases then enters corresponding test case performance element; If not implementation of test cases, what show that the commissioning staff selects is to carry out analogue-key, then will enter corresponding analogue-key performance element.
S106: enter the test case performance element.The concrete course of work of test case performance element can be with reference to figure 2.
S107: judge whether the test case performance element is finished.If be finished, go to step S110; If do not execute, continue execution in step S106.
S108:, then enter the analogue-key performance element if the tester has selected analogue-key in the test module user interface.The concrete course of work of analogue-key performance element can be with reference to figure 3.
S109: judge whether the analogue-key performance element is finished.If be finished, go to step S110; If do not execute, continue execution in step S108.
S110: the corresponding performance element in the test module is finished, export corresponding test result after, test result is analyzed.Certainly, in the test module operational process, the tester also can observe, writes down and analyze some test results in the tested program operational process.
S111: one time dynamic test finishes.
In the tested program operational process, can repeatedly call and carry out test module as required, realize dynamic test to the distinct program module.
Fig. 2 shows the workflow diagram of test case performance element in the foregoing description.As described in Figure 2, after entering the test case performance element, tested program is carried out dynamic test according to following flow process:
S201: enter the test case performance element.
S202: the test case performance element obtains the test case of having stored from the test case storage unit.
S203: resolve the test case of being obtained.In this embodiment, for improving the versatility of test case, the test case of storing in the described test case storage unit is formative test case.For example, one of them test case definition is: 1-2[6]-6, wherein, button operation of each digitized representation ,-be blank character, the digitized representation of [] lining is carried out number of times.In above-mentioned definition, 1 represents acknowledgement key, and 2 represent down Arrow, and 6 represent return key, then being described as of above-mentioned test case: press acknowledgement key, by 6 down Arrows, return.
S204: the current active window that obtains tested program.After having resolved test case, the test case performance element need obtain in which window in the applied tested program of this test case, and this window is generally the current active window of tested program.The test case performance element obtains and the corresponding tested program of test case interface by calling the correlation module entrance function of described tested program, and is the current active window with the tested program layout setting of being obtained.
S205: the test case after will resolving exports in the current active window of tested program, thereby realizes the purpose of sampling fc-specific test FC use-case dynamic test tested program.
Fig. 3 shows the workflow diagram of analogue-key performance element in the foregoing description.As described in Figure 3, after entering the analogue-key performance element, tested program is carried out dynamic test according to following flow process:
S301: enter the analogue-key performance element.
S302: the analogue-key performance element produces random number.
S303: calculate the mould value of random number to the analogue-key sum stored in the analogue-key storage unit.The analogue-key value of storing in the mould value of calculating gained and the analogue-key storage unit is one to one.
S304: from described analogue-key storage unit, obtain corresponding analogue-key value according to described mould value.
S305: with the analogue-key value of being obtained export to the embedded system bottom by key processing module.Because bottom is by being mutual between key processing module and the tested program, tested program will be called bottom is handled test module output by key processing module analogue-key operation.
In above-mentioned processing procedure, can simulate high strength user operation by setting the operation of repeatedly carrying out same key in the certain hour; Also can obtain at random analogue-key value, simulate random operation by repeatedly producing random number.By the mode that program comes analogue-key to operate, also more faster than the mode speed of manual operation button, intensity is also much higher, therefore, can test the healthy and strong performance of tested program faster, more accurately, improves the efficient of software dynamic test.
Certainly; the above only is a kind of preferred implementation of the present invention; should be understood that; for those skilled in the art; under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (7)

1. the dynamic testing method of a built-in system software comprises the tested program that need carry out dynamic test, it is characterized in that, is provided with the test module that tested program is carried out dynamic test in described tested program; In the tested program operational process, call described test module, realize dynamic test described tested program.
2. dynamic testing method according to claim 1 is characterized in that, described test module is provided with test case performance element and test case storage unit; When in the tested program operational process, calling described test case performance element, described test case performance element at first obtains test case from described test case storage unit, obtain the current active window of tested program then, and the test case of being obtained is exported in the current active window of described tested program.
3. dynamic testing method according to claim 2, it is characterized in that, test case in the described test case storage unit is the format test case, described test case performance element obtains test case from described test case storage unit after, earlier test case is resolved, and then the test case after will resolving exports in the current active window of described tested program.
4. dynamic testing method according to claim 2, it is characterized in that, described test case performance element is by calling the correlation module entrance function of described tested program, obtain and the corresponding tested program of test case interface, and be the current active window the tested program layout setting of being obtained.
5. according to each described dynamic testing method in the claim 1 to 4, it is characterized in that described test module is provided with analogue-key performance element and analogue-key storage unit; When in the tested program operational process, calling described analogue-key performance element, described analogue-key performance element obtains the analogue-key value from described analogue-key storage unit, and the bottom that exports the analogue-key value of being obtained to embedded system calls for described tested program by key processing module.
6. dynamic testing method according to claim 5 is characterized in that, described analogue-key performance element obtains the analogue-key value according to following method from described analogue-key storage unit:
The analogue-key performance element produces random number;
Calculate the mould value of described random number to the analogue-key sum stored in the described analogue-key storage unit;
From described analogue-key storage unit, obtain corresponding analogue-key value according to described mould value.
7. dynamic testing method according to claim 1 is characterized in that, described test module is embedded in the described tested program with the form of chock.
CN200910256475A 2009-12-29 2009-12-29 Method for dynamically testing embedded system software Pending CN101727393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910256475A CN101727393A (en) 2009-12-29 2009-12-29 Method for dynamically testing embedded system software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910256475A CN101727393A (en) 2009-12-29 2009-12-29 Method for dynamically testing embedded system software

Publications (1)

Publication Number Publication Date
CN101727393A true CN101727393A (en) 2010-06-09

Family

ID=42448311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910256475A Pending CN101727393A (en) 2009-12-29 2009-12-29 Method for dynamically testing embedded system software

Country Status (1)

Country Link
CN (1) CN101727393A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880549A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and device for production test
CN103761184A (en) * 2013-12-31 2014-04-30 华为技术有限公司 Method, device and system for testing code segment of program
CN107832212A (en) * 2017-11-02 2018-03-23 浪潮软件集团有限公司 Automatic testing method and device, readable medium and storage controller
CN107908561A (en) * 2017-11-16 2018-04-13 珠海全志科技股份有限公司 virtual reality software performance testing method and system
CN110990283A (en) * 2019-12-04 2020-04-10 中国直升机设计研究所 Method for automatically testing robustness of airborne display and control software

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880549A (en) * 2012-09-26 2013-01-16 广东欧珀移动通信有限公司 Method and device for production test
CN103761184A (en) * 2013-12-31 2014-04-30 华为技术有限公司 Method, device and system for testing code segment of program
CN103761184B (en) * 2013-12-31 2017-01-04 华为技术有限公司 Code segment method of testing, device and the system of program
CN107832212A (en) * 2017-11-02 2018-03-23 浪潮软件集团有限公司 Automatic testing method and device, readable medium and storage controller
CN107908561A (en) * 2017-11-16 2018-04-13 珠海全志科技股份有限公司 virtual reality software performance testing method and system
CN107908561B (en) * 2017-11-16 2020-09-01 珠海全志科技股份有限公司 Virtual reality software performance test method and system
CN110990283A (en) * 2019-12-04 2020-04-10 中国直升机设计研究所 Method for automatically testing robustness of airborne display and control software

Similar Documents

Publication Publication Date Title
CN101727393A (en) Method for dynamically testing embedded system software
CN110633222B (en) Method and device for determining regression test case
CN103019942B (en) Method and system for automatically testing applications to be tested based on android system
CN109885499B (en) Robot automatic test system and test method
CN103312850A (en) Mobile phone automation testing system and work method
CN104375937A (en) Continuous integration method and system of automated testing results
CN104268310A (en) Method for calling UVM verification environment through special graphical interface
CN106155897B (en) Service processing method and device
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN103513966A (en) PHP developing framework based on assemblies
CN103399814A (en) Automated testing method and automated testing device
CN116540682A (en) Method, system, device, equipment and medium for testing analog single machine
CN106526367A (en) Electronic equipment testing method and device
CN106028367B (en) Automatic testing method and system based on CMWrun testing platform
CN101251823B (en) DSP assembly language program verification method and device
CN105372545A (en) A cable error prevention method based on code identification
CN103310037B (en) A kind of method of setting up layout design rules detection file verification shape library
CN111611154A (en) Regression testing method, device and equipment
CN103593282A (en) Implementation method of product automation testing and auxiliary tool of product automation testing
CN110888809B (en) Risk prediction method and device for test task
CN107273745A (en) A kind of dynamic analysing method of the malicious code of dynamic link library form
CN104424096A (en) Automatic testing system and method for Android platform based device
CN113688031A (en) Testing positioning method based on byte code enhancement technology
CN106941552B (en) Mobile terminal shutdown performance evaluation method
CN105740114A (en) Fault tolerance test method and apparatus for mobile terminal

Legal Events

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

Application publication date: 20100609