CN-122027534-A - Automatic test method, device and equipment
Abstract
The application provides an automatic test method, device and equipment, which comprises the steps of constructing a field message template, acquiring environment configuration data and call instance configuration data of a current test environment, replacing the environment field placeholder by the environment configuration data, replacing the call instance field placeholder by the call instance configuration data to obtain field message reference data, generating a simulation message corresponding to the event type in the field message reference data based on the environment configuration data, the call instance configuration data and the message characteristic data in the field message reference data, and automatically testing the access equipment based on the simulation message. By the technical scheme, when the access equipment is abnormal, the access equipment can be automatically tested, and an automatic test result is obtained. Access devices include, but are not limited to FTTR devices.
Inventors
- LI YAN
- SHU XIONGTAO
Assignees
- 新华三信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260214
Claims (10)
- 1. An automated testing method, the method comprising: Constructing a field message template, wherein the field message template comprises event types, environment field placeholders, call instance field placeholders and message characteristic data, and the message characteristic data is obtained by extracting key information of a collected media resource management protocol message of the access equipment; acquiring environment configuration data and call instance configuration data of a current test environment, replacing the environment field placeholder by the environment configuration data, and replacing the call instance field placeholder by the call instance configuration data to obtain field message reference data; Generating a simulation message corresponding to the event type in the field message reference data based on the environment configuration data, the call instance configuration data and the message characteristic data in the field message reference data; and automatically testing the access equipment based on the simulation message.
- 2. The method of claim 1, wherein the step of determining the position of the substrate comprises, Before the construction of the field message template, the method further comprises the following steps: Collecting a plurality of media resource management protocol messages of the current test environment; Selecting a first type of media resource management protocol message corresponding to the access equipment from the plurality of media resource management protocol messages, wherein the first type of media resource management protocol message comprises a line identifier or a ROOT identifier of the access equipment, the line identifier represents a unique identifier of a line or a port on the access equipment, and the ROOT identifier represents that the access equipment is registered with a ROOT identity; Selecting a candidate media resource management protocol message corresponding to the event type from the first type media resource management protocol message aiming at each configured event type; And extracting key information of the candidate media resource management protocol message to obtain message characteristic data, wherein the message characteristic data is used for constructing a field message template corresponding to the event type.
- 3. The method of claim 2, wherein selecting a candidate media resource management protocol message corresponding to the event type from the first type of media resource management protocol messages comprises: Selecting a second type of media resource management protocol message from the first type of media resource management protocol message as a candidate media resource management protocol message, wherein the second type of media resource management protocol message comprises the event type and a transaction identifier, and the transaction identifier represents a unique identifier of a transaction formed by a command between access equipment and a media gateway controller; Selecting a third type of media resource management protocol message from the first type of media resource management protocol message as a candidate media resource management protocol message, wherein the transaction identifier in the third type of media resource management protocol message is the same as the transaction identifier in the second type of media resource management protocol message; And selecting a fourth type of media resource management protocol message from the first type of media resource management protocol message as a candidate media resource management protocol message, wherein the time interval between the message acquisition time of the fourth type of media resource management protocol message and the message acquisition time of the second type of media resource management protocol message is smaller than a preset threshold value, or the time interval between the fourth type of media resource management protocol message and the message acquisition time of the third type of media resource management protocol message is smaller than a preset threshold value.
- 4. The method of any of claims 1-3, wherein the event type comprises at least one of a registration event type, an off-hook event type, a dial event type, and an on-hook event type, and wherein the field message template comprises at least one of a registration event type field message template, an off-hook event type field message template, a dial event type field message template, and an on-hook event type field message template; the environment configuration data comprises at least one of a protocol version, a protocol port number, a domain name of a media gateway controller, an IP address of the media gateway controller and a port of the media gateway controller; The call instance configuration data comprises at least one of an IP address of the access device, a line identification of the access device and a number of the access device, wherein the number represents an attribute of the line; the message characteristic data comprises at least one of message collection time, event type, transaction identification, call context identification, command type, registration mode, registration reason and line identification; Wherein, the transaction type indicates that the media resource management protocol message is a request message or a response message; the call context identifier is used for describing a group of related terminals and connections; The command type is used for realizing control of the call context and the line; the registration mode represents a mode when the access equipment initiates registration; The registration reason represents the reason when the access device initiates registration.
- 5. The method of claim 4, wherein said replacing said context field placeholder with said context configuration data and said replacing said call instance field placeholder with said call instance configuration data, after obtaining field message reference data, further comprises: Modifying parameters to be reconstructed in the field message reference data to obtain modified field message reference data, wherein the parameters to be reconstructed comprise at least one of the message acquisition time, the transaction type, the command type and the event type; And generating a simulation message corresponding to the event type based on the environment configuration data, the call instance configuration data and the message characteristic data in the modified field message reference data.
- 6. The method of claim 1, wherein the simulated messages include a simulated request message, an expected response message, an expected request message, and a simulated response message; The automatic test for the access equipment based on the simulation message comprises the following steps: simulating the access equipment to send the simulation request message to a media gateway controller, and receiving an actual response message returned by the media gateway controller aiming at the simulation request message; Receiving an actual request message sent by the media gateway controller, and simulating the access equipment to send the simulated response message aiming at the actual request message to the media gateway controller; The test result is determined according to the matching degree between the actual response message and the expected response message and the matching degree between the actual request message and the expected request message.
- 7. The method of claim 6, wherein if the event type is a registration event type, the simulated REQUEST message comprises a REQUEST message with a command type of service change SERVICECHANGE type, the expected response message comprises a response REPLY message with a command type of SERVICECHANGE type, the expected REQUEST message comprises a REQUEST message with a command type of modification type, and the simulated response message comprises a REPLY message with a command type of modification type; If the event type is an off-hook event type, the simulation REQUEST message comprises a REQUEST message of which the command type is a notification Notify type, the expected response message comprises a REPLY message of which the command type is a Notify type, the expected REQUEST message comprises a REPLY message of which the command type is a Modify type, and the simulation response message comprises a REPLY message of which the command type is a Modify type; If the event type is a dialing event type, the simulation REQUEST message comprises a REQUEST message with a command type of a Notify type, the expected response message comprises a REPLY message with a command type of a Notify type, the expected REQUEST message comprises a REPLY message with a command type of an Add type, and the simulation response message comprises a REPLY message with a command type of an Add type; The expected REQUEST message further comprises a REQUEST message with a command type of a modification type, and the simulation response message further comprises a REPLY message with a command type of a modification type; If the event type is an on-hook event type, the simulation REQUEST message comprises a REQUEST message with a command type of a Notify type, the expected response message comprises a REPLY message with a command type of a Notify type, the expected REQUEST message comprises a REPLY message with a command type of a Modify type, and the simulation response message comprises a REPLY message with a command type of a Modify type; The expected REQUEST message also includes a REQUEST message of the command type minus Substract type, and the analog response message also includes a REPLY message of the command type Substract type.
- 8. An automated test equipment, the equipment comprising: the system comprises a construction module, a message feature data acquisition module and a message feature module, wherein the construction module is used for constructing a field message template, and the field message template comprises event types, environment field placeholders, call instance field placeholders and message feature data, wherein the message feature data is obtained by extracting key information of a collected media resource management protocol message of access equipment; The acquisition module is used for acquiring environment configuration data and call instance configuration data of the current test environment, replacing the environment field placeholder by the environment configuration data, and replacing the call instance field placeholder by the call instance configuration data to obtain field message reference data; the generation module is used for generating a simulation message corresponding to the event type based on the environment configuration data, the call instance configuration data and the message characteristic data in the field message reference data; And the test module is used for automatically testing the access equipment based on the simulation message.
- 9. The apparatus of claim 8, wherein the device comprises a plurality of sensors, The acquisition module is also used for acquiring a plurality of media resource management protocol messages of the current test environment; Selecting a first type of media resource management protocol message corresponding to the access equipment from the plurality of media resource management protocol messages, wherein the first type of media resource management protocol message comprises a line identifier or a ROOT identifier of the access equipment, the line identifier represents a unique identifier of a line or a port on the access equipment, and the ROOT identifier represents that the access equipment is registered with a ROOT identity; Selecting a candidate media resource management protocol message corresponding to the event type from the first type media resource management protocol message aiming at each configured event type; And extracting key information of the candidate media resource management protocol message to obtain message characteristic data, wherein the message characteristic data is used for constructing a field message template corresponding to the event type.
- 10. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor configured to execute the machine-executable instructions to implement the method of any one of claims 1-7.
Description
Automatic test method, device and equipment Technical Field The present application relates to the field of communications technologies, and in particular, to an automatic testing method, apparatus, and device. Background With the widespread deployment of various types of access devices (broadband access devices) in an operating network, these access devices carry both data traffic and fixed voice access traffic, these access devices may include, but are not limited to FTTR (Fiber to the Room ) devices, access gateways, home gateways, media gateways, and the like. When the access device carries the fixed voice access service, the fixed voice access service adopts a media resource management protocol, such as H.248 protocol, and the media gateway controller controls a plurality of access devices to provide voice access capability such as POTS (Plain Old Telephone Service ) for the end user. However, when the access device carries the fixed voice access service, a large number of messages of the fixed voice access service may cause an abnormality of the access device, and a worker cannot learn the cause of the abnormality of the access device. Disclosure of Invention The application provides an automatic test method, which comprises the following steps: Constructing a field message template, wherein the field message template comprises event types, environment field placeholders, call instance field placeholders and message characteristic data, and the message characteristic data is obtained by extracting key information of a collected media resource management protocol message of the access equipment; acquiring environment configuration data and call instance configuration data of a current test environment, replacing the environment field placeholder by the environment configuration data, and replacing the call instance field placeholder by the call instance configuration data to obtain field message reference data; Generating a simulation message corresponding to the event type in the field message reference data based on the environment configuration data, the call instance configuration data and the message characteristic data in the field message reference data; and automatically testing the access equipment based on the simulation message. The application provides an automated testing apparatus, the apparatus comprising: the system comprises a construction module, a message feature data acquisition module and a message feature module, wherein the construction module is used for constructing a field message template, and the field message template comprises event types, environment field placeholders, call instance field placeholders and message feature data, wherein the message feature data is obtained by extracting key information of a collected media resource management protocol message of access equipment; The acquisition module is used for acquiring environment configuration data and call instance configuration data of the current test environment, replacing the environment field placeholder by the environment configuration data, and replacing the call instance field placeholder by the call instance configuration data to obtain field message reference data; the generation module is used for generating a simulation message corresponding to the event type based on the environment configuration data, the call instance configuration data and the message characteristic data in the field message reference data; And the test module is used for automatically testing the access equipment based on the simulation message. The application provides an electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor for executing the machine-executable instructions to implement the automated test method of the above examples of the application. The present application provides a computer program product comprising a computer program which, when executed by a processor, implements the automated test method of the above examples of the application. The present application provides a machine-readable storage medium storing machine-executable instructions executable by a processor for executing the machine-executable instructions to implement the automated test method of the present application as exemplified above. As can be seen from the above technical solutions, in the embodiment of the present application, by constructing the field report Wen Moban, the environment configuration data and the call instance configuration data of the current test environment are obtained, the environment field placeholder in the field message template is replaced by the environment configuration data, and the call instance field placeholder in the field message template is replaced by the call instance configuration data, so as to obtain the field message reference data. In this way, the simulation message can be generated based on the field message