Summary of the invention
The invention provides method of testing and the device of a kind of DSU, can testing efficiency be improved.
On the one hand, the invention provides the method for testing of a kind of DSU, comprising:
S1: send test command according to the test script pre-set to measured data storage unit DSU, perform described test command to make described tested DSU;
S2: obtain the test data that described tested DSU performs the generation of described test command;
S3: the anticipatory data in described test data and described test script is compared, obtains test result;
S4: generate test report according to described test result.
Further, also comprised before described S1: the described test script loading outside input.
Further, described S1 comprises:
Send test command according to described test script to ZC equipment, to make described ZC equipment that described test command is sent to tested DSU, and make described tested DSU perform described test command.
Further, described S2 comprises:
Obtain described tested DSU that described ZC equipment sends and perform the test data that described test command produces.
Further, described S4 comprises:
Described test report is generated according to described test result and the test report template pre-set.
On the other hand, the invention provides the proving installation of a kind of DSU, comprising:
Transmitting element, for sending test command according to the test script pre-set to measured data storage unit DSU, performs described test command to make described tested DSU;
Acquiring unit, performs the test data of described test command generation for obtaining described tested DSU;
Comparing unit, for being compared by the anticipatory data in described test data and described test script, obtains test result;
Generation unit, for generating test report according to described test result.
Further, also comprise: loading unit, for loading the described test script of outside input.
Further, described transmitting element, specifically for sending test command according to described test script to ZC equipment, to make described ZC equipment that described test command is sent to tested DSU, and makes described tested DSU perform described test command.
Further, described acquiring unit, the described tested DSU sent specifically for obtaining described ZC equipment performs the test data that described test command produces.
Further, described generation unit, specifically for generating described test report according to described test result and the test report template pre-set.
By method of testing and the device of a kind of DSU provided by the invention, automatically can test DSU, in the process performing test script, not need artificial participation, and automatically can generate test report, improve testing efficiency.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly; below in conjunction with the accompanying drawing in the embodiment of the present invention; technical scheme in the embodiment of the present invention is clearly and completely described; obviously; described embodiment is the present invention's part embodiment, instead of whole embodiments, based on the embodiment in the present invention; the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
Embodiments provide the method for testing of a kind of DSU, see Fig. 1, the method comprises:
S1: send test command according to the test script pre-set to tested DSU, perform described test command to make described tested DSU;
S2: obtain the test data that described tested DSU performs the generation of described test command;
S3: the anticipatory data in described test data and described test script is compared, obtains test result;
S4: generate test report according to described test result.
The method of testing of a kind of DSU provided by above-described embodiment, can be tested DSU automatically, does not need artificial participation, and automatically can generate test report, improve testing efficiency in the process performing test script.
Test script in above-described embodiment can be xml form, has the test command pre-set in test script.
In a kind of possible implementation, also comprised before described S1: the described test script loading outside input.
In the implementation that another kind is possible, existing ZC (Zone Controller, zone controller) equipment can be passed through and come to send test command to tested DSU.Described S1 comprises:
Send test command according to described test script to ZC equipment, to make described ZC equipment that described test command is sent to tested DSU, and make described tested DSU perform described test command.
Can be obtained the test data of tested DSU generation by existing ZC equipment, described S2 comprises:
Obtain described tested DSU that described ZC equipment sends and perform the test data that described test command produces.
Above-mentioned ZC equipment can be ZC emulator, ZC system cabinet.The open corresponding interface of ZC equipment, is used for carrying out data transmission with tested DSU.Tested DSU can to ZC equipment send corresponding information as: temporary speed limitation information, cancel the mark etc. that powers on, also can obtain the temporary speed limitation information of reply and the label information etc. that powers on from ZC equipment simultaneously.
In order to satisfactory test report can be produced, can test report template be pre-set, according to test report template by the data stuffing of correspondence in template.Described S4 comprises:
Described test report is generated according to described test result and the test report template pre-set.
Above-mentioned DSU can be DSU software, DSU system.
The embodiment of the present invention additionally provides the proving installation of a kind of DSU, and see Fig. 2, this device comprises:
Transmitting element 201, for sending test command according to the test script pre-set to tested DSU, performs described test command to make described tested DSU;
Acquiring unit 202, performs the test data of described test command generation for obtaining described tested DSU;
Comparing unit 203, for being compared by the anticipatory data in described test data and described test script, obtains test result;
Generation unit 204, for generating test report according to described test result.
In a kind of possible implementation, said apparatus also comprises not shown loading unit, for loading the described test script of outside input.
In a kind of possible implementation, described transmitting element, specifically for sending test command according to described test script to ZC equipment, to make described ZC equipment that described test command is sent to tested DSU, and makes described tested DSU perform described test command.
Described acquiring unit, the described tested DSU sent specifically for obtaining described ZC equipment performs the test data that described test command produces.
In order to satisfactory test report can be produced, can test report template be pre-set, according to test report template by the data stuffing of correspondence in template.Described generation unit, specifically for generating described test report according to described test result and the test report template pre-set.
Above-mentioned proving installation, ZC equipment, tested DSU can be connected by network.
The content such as information interaction, implementation between each unit in the said equipment, subelement, due to the inventive method embodiment based on same design, particular content can see in the inventive method embodiment describe, repeat no more herein.
The method of testing of a kind of DSU provided by the present embodiment and device, can make DSU test specification, sequencing, simplification, thus improve testing efficiency, shorten the test duration, and it is inaccurate to reduce the slip up test result brought of manual testing.
It should be noted that, in this article, the relational terms of such as first and second and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element " being comprised " limited by statement, and be not precluded within process, method, article or the equipment comprising described key element and also there is other same factor.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in the storage medium of embodied on computer readable, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium in.
Finally it should be noted that: the foregoing is only preferred embodiment of the present invention, only for illustration of technical scheme of the present invention, be not intended to limit protection scope of the present invention.All any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., be all included in protection scope of the present invention.