A kind of test macro of hardware module and method
Technical field
The present invention relates to the hardware module measuring technology, be specifically related to a kind of test macro and method of hardware module.
Background technology
Appearance along with various products, the hardware module of forming product is also varied, different model, different series, different classes of product development, bear by different team or project team respectively and finish, bear by different team or test group for the test job of the various hardware modules of forming product is also inevitable so.
Because the method for testing of hardware module is determined by Test Design person oneself fully, the scheme and the design criteria that do not have standard, even to identical hardware module, identical test environment, designed hardware module testing system and the method for different testers also has than big-difference, no matter be at test framework, look ﹠ feel, or on extensibility and the automaticity.So, for different hardware modules, different test environments, designed hardware module testing system and the method for coming out of different testers differs a thousand li especially, so, the test macro of existing hardware module and method are because unified criterion and standard, the long and testing procedure complexity of construction cycle of relating to.
Perhaps, test team or test group are arranged in the Test Design process of hardware module, can be often and other bear the test team of different hardware module testing task or test group and link up and consult, thereby reach the common recognition in the hardware module test, make every effort to standard and simplify the test of hardware module, yet, this common recognition of reaching among a small circle is difficult to obtain large-area popularization, finally still can not realize the specification hardware module testing, thereby simplifies the purpose of the test of hardware module.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of test macro and method of hardware module, can shorten the construction cycle of hardware module test, and can form the design criteria and the standard of hardware module testing method gradually, thereby the test of hardware module is advanced to hardware and software platform gradually, simplify the test of hardware module.
For achieving the above object, technical scheme of the present invention is achieved in that
A kind of test macro of hardware module, this system comprises test package, hardware module and test platform, wherein, test platform is used for according to the test item of the type of hardware module and needs test test package and hardware module being carried out the operating component configuration, and the control test package is tested hardware module.
Described test platform further comprises main executive routine, configuration database, result database, special purpose test modules, operating component database and User Interface, wherein,
Main executive routine is used to control the test process of whole hardware module, main executive routine can obtain the essential information of hardware module and present to the user by User Interface from configuration database, main executive routine can also be given special purpose test modules with the dependence test information configuration in the configuration database according to configuration and the operation of user on User Interface, and the test result that after end of test (EOT) special purpose test modules is reported stores result database into, and is shown to User Interface;
Configuration database is used for the essential information of storage hardware module;
Result database is used for the test result of storage hardware module;
Special purpose test modules be used for dependence test information according to the configuration of main executive routine from operating component database downloading-running assembly to hardware module and/or test package, and foundation is connected with test between hardware module, the test package, thereby tests; Special purpose test modules also is used for the test result that test package and hardware module report is reported main executive routine;
The operating component database is used for the operating component of storage hardware module testing needs;
User Interface is used for the essential information of configuration database hardware module is presented to the user, and realization test macro and user's is mutual.
A kind of method of testing of hardware module, this method comprises:
A, main executive routine obtain the essential information of hardware module from configuration database, and the essential information of the hardware module obtained is presented in the User Interface;
B, user carry out the test parameter configuration according to the test needs by User Interface, and start test;
C, end of test (EOT), main executive routine is saved in result database with test result.
Comprise step after the described startup of the step b test: main executive routine reads dependence test information in the configuration database according to user configured test parameter, and call special purpose test modules, if call success, then main executive routine is given special purpose test modules with the dependence test information configuration that reads, and special purpose test modules control test package and hardware module are tested; Otherwise, return error message.
Described dependence test information comprises special purpose test modules path and operating component path at least.
Described special purpose test modules control test package and hardware module are tested and be: special purpose test modules arrives hardware module or test package according to operating component path downloading-running assembly earlier, foundation is connected with test between hardware module, the test package then, thereby reaches test to hardware module jointly by special purpose test modules control test package.
Comprise step after the described end of test (EOT) of step c: test package and hardware module report special purpose test modules with test result, and special purpose test modules reports test result main executive routine again.
Described main executive routine further shows test results in User Interface after test result is saved in result database.
The test macro of hardware module of the present invention and method, the ingredient of hardware module testing system is divided into constant part and variable part, when different hardware modules is tested with different test environments, only need system's variable part to be adjusted accordingly according to the different of hardware module and test environment, just can test, so shortened the construction cycle of hardware module test; Again because after system and method for the present invention tests hardware module, the essential information and the dependence test assembly of hardware module can be preserved, if things go on like this, just can form the design criteria and the standard of hardware module testing method, thereby the test of hardware module is advanced to hardware and software platform gradually, simplified the test of hardware module.
Description of drawings
Fig. 1 is the test system structure figure of hardware module of the present invention;
Fig. 2 is the method for testing process flow diagram of hardware module of the present invention.
Embodiment
Basic thought of the present invention is: the ingredient of hardware module testing system is divided into constant part and variable part, when different hardware modules is tested with different test environments, only need system's variable part to be adjusted accordingly, just can test according to the different of hardware module and test environment.
Be described in further details below in conjunction with the test macro and the method for the drawings and specific embodiments hardware module of the present invention.
Fig. 1 is the test system structure figure of hardware module of the present invention, as shown in Figure 1, the test macro of hardware module of the present invention is made up of test platform, hardware module and test package, wherein, test platform is used for according to the test item of the type of hardware module and needs test test package and hardware module being carried out the operating component configuration, and control test package hardware module is tested, test platform comprises main executive routine, configuration database, result database, special purpose test modules, operating component database and User Interface again.
Main executive routine is used to control the test process of whole hardware module, main executive routine can obtain the essential information of hardware module and present to the user by User Interface from configuration database, main executive routine can also be given special purpose test modules with the dependence test information configuration in the configuration database according to configuration and the operation of user on User Interface, and the test result that after end of test (EOT) special purpose test modules is reported stores result database into, and is shown to User Interface;
Configuration database is used for the essential information of storage hardware module;
Result database is used for the test result of storage hardware module;
Special purpose test modules be used for dependence test information according to the configuration of main executive routine from operating component database downloading-running assembly to hardware module or test package, and foundation is connected with test between hardware module, the test package, thereby tests; Special purpose test modules also is used for the test result that test package and hardware module report is reported main executive routine;
The operating component database is used to store the operating component of test needs;
User Interface is used for the essential information of configuration database hardware module is presented to the user, and is mutual to realize test macro and user's.
Here, main executive routine, configuration database, result database and the User Interface in the test macro is classified as the constant part of system, this four part can maybe not need the test item tested different and do not change because the hardware module difference of test; Again because different hardware modules special purpose test modules, operating component database and the test package corresponding different with different test items, so special purpose test modules, operating component database, hardware module and test package are classified as the variable part of system, maybe need the test item tested not simultaneously in the hardware module difference, only need adjust accordingly and get final product the variable part of system.
Fig. 2 is the method for testing process flow diagram of hardware module of the present invention, and as shown in Figure 2, the method for testing of hardware module of the present invention mainly may further comprise the steps:
Step 21: main executive routine obtains the essential information of hardware module from configuration database, and the essential information of the hardware module obtained is presented in the User Interface.Here, the essential information of hardware module comprises the installation site information etc. of dimension information, hardware module and test package of version, hardware module and the test package of hardware module classification, hardware module model, hardware module.
Step 22: the user carries out the test parameter configuration according to the test needs by User Interface, and starts test.The user is according to the test needs, the classification of selection hardware module, model, beta version etc., can determine the hardware module that needs are tested by classification and the model of selecting hardware module, by selecting beta version, need can determine the test item of test, for example, to with a kind of hardware module, the test item of beta version A correspondence is I1, I2, I3, I4, and the test item of beta version B correspondence is I1, I2, I4, I5 ....
Step 23~step 26: main executive routine reads dependence test information in the configuration database according to user configured test parameter, and call special purpose test modules, if call success, then give special purpose test modules with the dependence test information configuration that reads, special purpose test modules control test package and hardware module are tested execution in step 27; Otherwise, return error message.Here, dependence test information comprises the path of the operating component of the path of special purpose test modules and user test needs at least.When special purpose test modules control test package and hardware module are tested, operating component path downloading-running assembly according to main executive routine configuration arrives hardware module or test package earlier, foundation is connected with test between hardware module, the test package then, thereby the control test package is tested hardware module.Here, for fear of introducing the operating component mistake because of repeatedly downloading, also can select to allow test package carry operating component, when downloading, only downloads operating component the operating component of hardware module, because in the test process, mistake appears in the operating component of hardware module can be downloaded again, and the operating component of test package mistake occurs and can cause test paralysis.
Operating component is after the definite title or path of good hardware module essential information in configuration database, is that title or the path that essential information is distributed developed according to system.With environment monitoring board EMxx is example, in configuration database, the module title can be defined as ZXWx-Bxx, need the hardware version of test to be defined as ZXWx-Bxx_aXX, the path of special purpose test modules be ZXWx-Bxx RunProg EMxx EMxx_axx, the path of operating component be ZXWx-Bxx RunProg EMxx EMxx_axx_fxx, and the test item number definition corresponding with this hardware version is ZXWx-Bxx_c1, ZXWx-Bxx_c2, ZXWx-Bxx_c4, ZXWx-Bxx_c5 etc., after having determined the title or path of essential information in configuration database, just can carry out the exploitation of operating component according to definite good title or path.
Step 27: after the end of test (EOT), special purpose test modules reports main executive routine to test result, and main executive routine is saved in result database with test result again, and shows test results in User Interface.After the end of test (EOT), by test package and hardware module test result is reported special purpose test modules earlier, report main executive routine by special purpose test modules again.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.