CN-121985361-A - Fuzzy test method, system, electronic equipment and computer storage medium
Abstract
The present disclosure relates to a fuzzy test method, a system, an electronic device and a computer storage medium, wherein the fuzzy test method is applied to a fuzzy test system based on a 4G/5G communication network protocol, and the fuzzy test system comprises a 4G/5G communication base station and a tested terminal which are in communication connection. The fuzzy test method comprises the steps of obtaining abnormal cases, signaling surface messages and first log data matched with the abnormal cases, analyzing the abnormal cases, the signaling surface messages and the first log data to obtain protocol semantic data, respectively calculating initial similarity between each test case and the abnormal case based on the protocol semantic data, and redetermining execution sequence of the test cases in the test case library according to descending sequence of the initial similarity between each test case and the abnormal case. The application can improve the efficiency of the fuzzy test.
Inventors
- ZHENG QINGQIU
- LI JIANGWEI
- HUANG ZHEN
Assignees
- 思微科技(武汉)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260210
Claims (10)
- 1. The fuzzy test method is characterized by being applied to a fuzzy test system based on a 4G/5G communication network protocol, wherein the fuzzy test system comprises a 4G/5G communication base station and a tested terminal which are in communication connection, the 4G/5G communication base station is used for generating a test case library and sending one test case in the test case library to the tested terminal, and a plurality of test cases in the test case library are ordered according to a preset rule: Acquiring an abnormal case, a signaling surface message matched with the abnormal case and first log data, wherein the abnormal case is the test case which causes the tested terminal to perform abnormal response, and the signaling surface message represents data generated when complete signaling interaction is performed between the 4G/5G communication base station and the tested terminal; Analyzing the abnormal use case, the signaling surface message and the first log data to obtain protocol semantic data, wherein the protocol semantic data at least comprises functions executed by a protocol message matched with the abnormal use case, triggered state conversion and semantic data of contained fields in the communication process of the 4G/5G communication base station and the tested terminal; Based on the protocol semantic data, respectively calculating initial similarity between each test case and the abnormal case; and redefining the execution sequence of the test cases in the test case library according to the descending sequence of the initial similarity between each test case and the abnormal case.
- 2. The ambiguity test method of claim 1, wherein the 4G/5G communication base station includes a protocol state machine, the protocol state machine is configured to sense a protocol state change of the 4G/5G communication network protocol and manage a protocol context of the 4G/5G communication network protocol, the protocol semantic data includes first protocol state data, use case structure data, fault feature data and first protocol interaction data, and the parsing the abnormal use case, the signaling plane message and the first log data to obtain protocol semantic data includes: carrying out structural analysis on the abnormal case to obtain case structural data, wherein the case structural data represents the variation condition of the abnormal case; Analyzing the signaling surface message based on a preset protocol knowledge graph to obtain first protocol interaction data and first protocol state data, wherein the first protocol interaction data represents data related to signaling interaction when a 4G/5G communication base station and the tested terminal communicate based on the abnormal use case, and the first protocol state data represents all state conversion conditions of the protocol state machine when the 4G/5G communication base station and the tested terminal communicate based on the abnormal use case; And carrying out feature extraction on the first log data to obtain the fault feature data, wherein the fault feature data represents abnormal information when the tested terminal generates abnormal response.
- 3. The fuzzy test method of claim 2, wherein the initial similarity includes a structural similarity, and wherein the calculating the initial similarity between each of the test cases and the abnormal case based on the protocol semantic data includes: selecting any one test case from the test case library as an initial case; Calculating the structural similarity between the initial use case and the use case structural data; and taking any test case except the initial case in the test case library as a new initial case, and calculating the new structural similarity between the new initial case and the case structure data until the structural similarity corresponding to each initial case in the test case library is obtained.
- 4. The fuzzy test method of claim 3, wherein the initial similarity further comprises an interaction similarity and a state similarity, and further comprising, after said calculating the structural similarity between the initial use case and the use case structural data: based on the structural similarity, predicting second protocol interaction data and second protocol state data generated when the 4G/5G communication base station sends the initial use case to the tested terminal for signaling interaction, wherein the second protocol interaction data represents data related to signaling interaction when the 4G/5G communication base station and the tested terminal communicate based on the initial use case, and the second protocol state data represents all state conversion conditions of the protocol state machine when the 4G/5G communication base station and the tested terminal communicate based on the initial use case; calculating interaction similarity between the first protocol interaction data and the second protocol interaction data and state similarity between the first protocol state data and the second protocol state data; after said calculating the new said structural similarity between said new said initial use case and said use case structural data, further comprising: Predicting new second protocol interaction data and new second protocol state data based on the new structural similarity; And calculating the new interaction similarity and the new state similarity until the interaction similarity and the state similarity corresponding to each initial use case in the test use case library are obtained.
- 5. The fuzzy test method of claim 4, wherein the initial similarity further comprises a fault similarity, and further comprising, after the calculating the structural similarity between the initial use case and the use case structural data: Predicting whether the tested terminal generates abnormal response or not after the 4G/5G communication base station sends the initial use case to the tested terminal; If the abnormal response of the tested terminal is predicted, acquiring second log data generated when the abnormal response of the tested terminal is predicted; calculating fault similarity between the fault characteristic data and the second log data; after said calculating the new said structural similarity between said new said initial use case and said use case structural data, further comprising: Predicting whether the tested terminal generates abnormal response after the 4G/5G communication base station sends the new initial use case to the tested terminal; if the abnormal response of the tested terminal is predicted, acquiring new second log data generated when the abnormal response of the tested terminal is predicted; and calculating new fault similarity between the fault characteristic data and the new second log data until the fault similarity corresponding to each initial use case in the test use case library is obtained.
- 6. The fuzzy test method of claim 5, further comprising, after said separately computing an initial similarity between each of said test cases and said abnormal case: Respectively calculating a first product of the structural similarity corresponding to each initial use case and a first preset weight, respectively calculating a second product of the interaction similarity corresponding to each initial use case and a second preset weight, respectively calculating a third product of the state similarity corresponding to each initial use case and a third preset weight, and respectively calculating a fourth product of the fault similarity corresponding to each initial use case and a fourth preset weight; and respectively calculating the weight sum of the first product, the second product, the third product and the fourth product corresponding to each initial use case.
- 7. The fuzzy test method of claim 6, wherein the redefining the order of execution of the test cases in the test case library in descending order of the initial similarity between each of the test cases and the abnormal case comprises: And performing descending order sorting on the weight sum corresponding to each initial use case, and redefining the execution order of the test cases in the test case library based on the descending order result.
- 8. The fuzzy test system based on the 4G/5G communication network protocol is characterized by comprising a 4G/5G communication base station and a tested terminal which are in communication connection, wherein the 4G/5G communication base station is used for generating a test case library and sending one test case in the test case library to the tested terminal, and a plurality of test cases in the test case library are ordered according to a preset rule; The 4G/5G communication base station is used for: Acquiring an abnormal case, a signaling surface message matched with the abnormal case and first log data, wherein the abnormal case is the test case which causes the tested terminal to perform abnormal response, and the signaling surface message represents data generated when complete signaling interaction is performed between the 4G/5G communication base station and the tested terminal; Analyzing the abnormal use case, the signaling surface message and the first log data to obtain protocol semantic data, wherein the protocol semantic data at least comprises functions executed by a protocol message matched with the abnormal use case, triggered state conversion and semantic data of contained fields in the communication process of the 4G/5G communication base station and the tested terminal; Based on the protocol semantic data, respectively calculating initial similarity between each test case and the abnormal case; and redefining the execution sequence of the test cases in the test case library according to the descending sequence of the initial similarity between each test case and the abnormal case.
- 9. An electronic device comprising a memory storing computer readable instructions and a processor executing the computer readable instructions stored in the memory to implement the ambiguity test method of any one of claims 1 to 7.
- 10. A computer storage medium having stored therein computer readable instructions that are executed by a processor in an electronic device to implement the ambiguity test method of any one of claims 1-7.
Description
Fuzzy test method, system, electronic equipment and computer storage medium Technical Field The present disclosure relates to the field of network communication connection technologies, and in particular, to a fuzzy test method, a system, an electronic device, and a computer storage medium. Background With the development of communication network technology and the drawbacks of low spectrum efficiency, limited service supporting capability and the like revealed by 2G/3G networks in the data age, 4G/5G networks have been developed as a new generation mobile communication technology, so that terminal devices using 4G/5G networks as communication technologies and 4G/5G network base stations can communicate directly with each other. When the fuzzy test is carried out on the terminal equipment, the 4G/5G network base station receives the abnormal response sent by the terminal equipment, and how to adjust the execution sequence of other test cases to be tested based on the abnormal cases matched with the abnormal response so as to improve the execution efficiency and accuracy of the fuzzy test becomes important research content. Disclosure of Invention The disclosure discloses a fuzzy test method, a system, an electronic device and a computer storage medium, which can improve the accuracy of the fuzzy test. In a first aspect, the disclosure relates to a fuzzy test method, which is applied to a fuzzy test system based on a 4G/5G communication network protocol, wherein the fuzzy test system comprises a 4G/5G communication base station and a tested terminal which are in communication connection, the 4G/5G communication base station is used for generating a test case library and sending a test case in the test case library to the tested terminal, a plurality of test cases in the test case library are ordered according to a preset rule, the method comprises the steps of acquiring an abnormal case, a signaling surface message matched with the abnormal case and first log data, wherein the abnormal case is the test case which leads to abnormal response of the tested terminal, the signaling surface message represents data generated when complete signaling interaction is carried out between the 4G/5G communication base station and the tested terminal, analyzing the abnormal case, the signaling surface message and the first log data to obtain the communication protocol data, the communication case comprises at least the signaling surface message matched with the abnormal case, and the test case is triggered according to a test field of the test case, and the test case is triggered according to the sequence, and the test case is triggered by the test case, and the test case is triggered by the semantic data. The embodiment of the application can acquire the abnormal use case sent to the tested terminal and the signaling surface message and the first log data matched with the abnormal use case when the tested terminal generates abnormal response, so as to obtain the interaction condition between the tested terminal and the 4G/5G communication base station when the tested terminal generates abnormal response. And then analyzing the abnormal case, the signaling surface message and the first log data to obtain protocol semantic data, so that the subsequent calculation of the initial similarity between other test cases and the abnormal case based on the protocol semantic data is facilitated. And finally, re-determining the execution sequence of all the test cases in the test case library based on the descending sequence of the initial similarities, so that other test cases with the highest similarities with the abnormal cases are sent to the tested terminal, and the fuzzy test efficiency is improved. In some embodiments, the 4G/5G communication base station comprises a protocol state machine, wherein the protocol state machine is used for sensing protocol state changes of the 4G/5G communication network protocol and managing protocol contexts of the 4G/5G communication network protocol, the protocol semantic data comprises first protocol state data, case structure data, fault feature data and first protocol interaction data, the analysis of the abnormal case, the signaling surface message and the first log data is carried out to obtain protocol semantic data, the analysis of the abnormal case is carried out to obtain case structure data, the case structure data is used for representing variation conditions of the abnormal case, the signaling surface message is analyzed based on a preset protocol knowledge graph to obtain first protocol interaction data and first protocol state data, the first protocol interaction data represents data related to signaling interaction when the 4G/5G communication base station and the tested terminal are in communication, the first protocol interaction data represents the first protocol interaction data when the abnormal state is carried out on the basis of the abnormal case, the first protocol inte