Background
An MSS (maintenance support subsystem) as a maintenance support system of a place-core has a plurality of devices, such as VOBC, ATS, ZC, CI, meter axis, power supply, DCS, DSU, microcomputer monitor, LEU, etc., in communication therewith. The system can comprehensively monitor and record the signal equipment used on line, can comprehensively record and analyze the input and output states, and has rich warning functions.
Before the MSS operates online, the MSS needs to perform test verification in several stages, i.e., unit test, integration test, and subsystem test, to verify whether the data sent to the MSS is consistent with the data received by the MSS. Because the interfaces are numerous, the interfaces are complex, the number of communication devices is large, and in order to automatically test the MSS, the labor is saved, and the efficiency is improved. The method was developed.
The existing MSS test can be carried out only manually, and whether the MSS test is correct or not can be checked one by one. The method has the following defects:
1) the fault injection of the MSS can not be simulated by external equipment;
2) the interfaces are numerous and complex, automatic testing cannot be performed on the MSS, the efficiency is low, and the test labor consumption is large;
3) the universality is not strong, and the test can be carried out only by matching with external actual equipment.
Disclosure of Invention
The invention aims to provide an MSS automatic test method and system, which can solve the problems that the prior art can not simulate external equipment to carry out fault injection on the MSS, can not carry out automatic test on the MSS and can only carry out test by matching with external actual equipment.
To this end, in one aspect, the present invention provides an MSS automated testing system, which is an industrial personal computer and includes:
a transmitter, a resolver and a comparator; wherein,
the transmitter and the analysis device are connected with the MSS to be tested, the comparison device is connected with the transmitter and the analysis device,
the transmitter is configured to simulate at least one external device connected to the MSS to be tested to transmit first data to the MSS to be tested,
the analysis device is used for collecting second data sent to the external equipment after the MSS to be tested receives the first data, analyzing the second data to obtain third data,
the comparison device is used for comparing the first data with corresponding third data according to a preset comparison rule to obtain a comparison result, and generating a test report of the MSS to be tested according to the comparison result.
On the other hand, the invention provides an automatic testing method of an MSS, which comprises the following steps:
simulating, by the transmitter, at least one external device connected to the MSS to be tested to send first data to the MSS to be tested,
the analysis device collects second data sent to the external equipment after the MSS to be tested receives the first data, analyzes the second data to obtain third data,
and comparing the first data with corresponding third data by the comparison device according to a preset comparison rule to obtain a comparison result, and generating a test report of the MSS to be tested according to the comparison result.
The MSS automatic test method and system of the embodiment of the invention can realize the automatic test of the MSS to be tested by comparing the input and the output of the MSS to be tested by using the transmitter, the analysis device and the comparison device, thereby saving labor and improving efficiency.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present embodiment discloses an MSS automated testing system, which is an industrial personal computer and includes:
a transmitter 1, an analyzer 2 and a comparator 3; wherein,
the transmitter 1 and the analysis device 2 are connected with the MSS to be tested, the comparison device 3 is connected with the transmitter 1 and the analysis device 2,
the transmitter 1 is configured to simulate at least one external device connected to the MSS to be tested to send first data to the MSS to be tested,
the analysis device 2 is configured to collect second data sent to the external device after the MSS to be tested receives the first data, analyze the second data to obtain third data,
the comparison device 3 is configured to compare the first data with corresponding third data according to a preset comparison rule to obtain a comparison result, and generate a test report of the MSS to be tested according to the comparison result.
The MSS automatic test system mainly connects the transmitter, the MSS and the analysis device together, the transmitter simulates external equipment to send data to the MSS, the analysis device analyzes the data sent by the MSS, and the MSS automatic test can be realized by automatically comparing the data sent by the transmitter and the data analyzed by the analysis device.
The MSS automatic test system mainly comprises five functional modules of sending data to the MSS, analyzing the data sent by the MSS, automatically comparing, displaying a software interface and generating a report, wherein each functional module is introduced as follows.
Sending data to the MSS: and simulating external equipment, sending data to the MSS, configuring the data sent to the MSS by using the EXCEL, and automatically sending the data of all interfaces.
Analyzing data sent by the MSS: and collecting and analyzing data sent by the MSS.
Automatic comparison: and acquiring the analyzed data sent by the MSS, and automatically comparing according to the configuration file. The data of all interfaces can be compared automatically, and a report is generated. When the interface is changed, only the configuration file needs to be changed, and the code does not need to be modified.
Displaying a software interface: and displaying the data sent to the MSS and the data sent to the outside by the MSS obtained by analysis. The data that passed the alignment are represented in green and the data that did not pass in red. Is convenient for users to watch.
And (3) generating a report: reports are automatically generated based on templates provided by the user. The report is in EXCEL format, which facilitates the next operation by the tester.
The MSS automatic test system of the embodiment of the invention can realize the automatic test of the MSS to be tested by comparing the input and the output of the MSS to be tested by using the transmitter, the analysis device and the comparison device, thereby saving labor and improving efficiency.
Optionally, in another embodiment of the MSS automated testing system of the present invention, the transmitter and the analysis device are connected to the MSS to be tested through a cable, and the comparison device is connected to the transmitter and the analysis device through a cable.
Optionally, in another embodiment of the MSS automated test system of the present invention, the first data is configured by EXCEL, and the transmitter is configured to traverse the first data, and transmit data obtained from each traversal to an external device, or
And the data processing module is used for traversing the first data and simultaneously sending the first data to corresponding external equipment.
In addition, the prior art cannot perform traversal test on a complex interface, but the present invention can perform traversal test on the complex interface by traversing the first data configured by the EXCEL and sending the data obtained by each traversal to an external device.
Optionally, in another embodiment of the MSS automated test system of the present invention, the test report is in EXCEL format.
Optionally, in another embodiment of the MSS automatic test system of the present invention, the system is installed with a network card and is connected to the switch through a cable.
In the embodiment of the invention, the MSS to be tested can be remotely tested through the switch and the network card.
Optionally, in another embodiment of the MSS automated test system of the present invention, the method further includes:
and the display device is used for displaying the first data, the third data and the comparison result.
Referring to fig. 2, the present embodiment discloses an MSS automated testing method based on the MSS automated testing system of the foregoing embodiment, including:
s1, simulating by the transmitter at least one external device connected with the MSS to be tested to send first data to the MSS to be tested,
s2, the analysis device collects the second data sent by the MSS to be tested to the external device after receiving the first data, analyzes the second data to obtain the third data,
and S3, comparing the first data with corresponding third data by the comparison device according to a preset comparison rule to obtain a comparison result, and generating a test report of the MSS to be tested according to the comparison result.
The MSS automatic test method of the embodiment of the invention can realize the automatic test of the MSS to be tested by comparing the input and the output of the MSS to be tested by using the transmitter, the analysis device and the comparison device, thereby saving labor and improving efficiency.
Optionally, in another embodiment of the MSS automatic test method according to the present invention, before the simulating, by the transmitter, that at least one external device connected to the MSS to be tested sends the first data to the MSS to be tested, the method further includes:
performing EXCEL configuration on the first data by the transmitter;
wherein, the simulating, by the transmitter, at least one external device connected to the MSS to be tested to send first data to the MSS to be tested includes:
traversing the first data configured by the EXCEL by the transmitter, and transmitting the data obtained by each traversal to an external device, or
And traversing the first data configured by the EXCEL by the transmitter, and simultaneously transmitting the first data to corresponding external equipment.
Optionally, in another embodiment of the MSS automated testing method of the present invention, the test report is in EXCEL format.
Optionally, in another embodiment of the MSS automated testing method of the present invention, the method further includes:
and displaying the first data, the third data and the comparison result.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.