CN112187561A - Communication module testing method, device, computer equipment and storage medium - Google Patents

Communication module testing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN112187561A
CN112187561A CN202010834647.XA CN202010834647A CN112187561A CN 112187561 A CN112187561 A CN 112187561A CN 202010834647 A CN202010834647 A CN 202010834647A CN 112187561 A CN112187561 A CN 112187561A
Authority
CN
China
Prior art keywords
result
registration
module
communication module
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010834647.XA
Other languages
Chinese (zh)
Other versions
CN112187561B (en
Inventor
李佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202010834647.XA priority Critical patent/CN112187561B/en
Publication of CN112187561A publication Critical patent/CN112187561A/en
Application granted granted Critical
Publication of CN112187561B publication Critical patent/CN112187561B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a communication module testing method, a communication module testing device, computer equipment and a storage medium. The method comprises the following steps: sending a first service data writing request aiming at the network equipment to a target communication module so that the target communication module generates a second service data writing request according to the first service data writing request, and transmitting the second service data writing request to the network equipment so as to instruct the network equipment to write data according to the second service data writing request, thereby obtaining a data writing result; sending a writing result acquisition request corresponding to the target communication module to the network equipment so that the network equipment returns a data writing result according to the writing result acquisition request; acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result; and determining a service data write-in test result corresponding to the target communication module according to the write-in comparison result. The method can improve the testing efficiency.

Description

Communication module testing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of automated testing technologies, and in particular, to a method and an apparatus for testing a communication module, a computer device, and a storage medium.
Background
With The development of The Internet of Things (IOT), OneNET technology has emerged. The OneNet is an open cloud platform based on an open win-win concept and independently developed and developed for public services. The Internet of things application network formed by taking the OneNet as the service platform can reduce the development difficulty, save the development cost and shorten the development period.
Currently, the communication module may transmit data to the OneNET cloud platform, which may store and forward the data. Therefore, when testing the communication module, it is usually tested whether the communication between the communication module and the OneNET cloud platform is normal.
However, when testing the communication module, the testing is usually performed manually, and the testing requires a lot of time, resulting in inefficient testing.
Disclosure of Invention
In view of the above, it is necessary to provide a communication module testing method, apparatus, computer device and storage medium capable of improving testing efficiency in view of the technical problem of low testing efficiency.
A communication module testing method, the method comprising: when the target communication module is successfully registered to the network equipment, sending a first service data writing request aiming at the network equipment to the target communication module, so that the target communication module generates a second service data writing request according to the first service data writing request, and transmitting the second service data writing request to the network equipment to instruct the network equipment to write data according to the second service data writing request, so as to obtain a data writing result; sending a writing result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the data writing result according to the writing result acquisition request; acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result; and determining a service data write test result corresponding to the target communication module according to the write comparison result.
In some embodiments, the obtaining a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result includes: acquiring a standard writing result corresponding to the data writing result, wherein the standard writing result is obtained according to the service data to be written corresponding to the first service data writing request; and comparing the data writing result with the standard writing result to obtain the writing comparison result.
In some embodiments, the determining that the target communication module successfully registered with the network device comprises: sending a first module registration request to the target communication module, so that the target communication module generates a second module registration request according to the first module registration request, wherein the second module registration request carries module registration information, and transmits the second module registration request to the network equipment, so as to instruct the network equipment to register the target communication module according to the module registration information, and obtain a module registration result; sending a registration result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the module registration result according to the registration result acquisition request; acquiring a standard registration result corresponding to the module registration result, and comparing the module registration result with the standard registration result to obtain a registration comparison result; and when the registration comparison result is consistent, determining that the target communication module is successfully registered to the network equipment.
In some embodiments, the method further comprises: sending a module registration instruction to the target communication module so that the target communication module generates and returns a module registration request corresponding to the target communication module according to the module registration instruction; the module registration request carries module registration information; extracting module registration information in the module registration request, transmitting the module registration information to the network equipment so that the network equipment carries out authentication according to the module registration information, and generating a registration response result according to an authentication result; sending a registration result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the registration response result according to the registration result acquisition request; the sending a first module registration request to the target communication module includes: and when the target communication module is determined to be successfully registered according to the registration response result, sending a first module registration request to the target communication module.
In some embodiments, said transmitting said module registration information to said network device comprises: acquiring registration address information, wherein the registration address information is address information corresponding to a page for module registration provided by the network equipment; acquiring a corresponding module registration page according to the registration address information, wherein the module registration page comprises a registration information filling area; writing the module registration information into the registration information padding area.
In some embodiments, the determining, according to the write comparison result, a service data write test result corresponding to the target communication module includes: and when the write-in comparison result is consistent, determining that the service data write-in test result corresponding to the target communication module is a test pass.
A communication module testing apparatus, the apparatus comprising: the first service data writing request sending module is used for sending a first service data writing request aiming at the network equipment to a target communication module when the target communication module is determined to be successfully registered to the network equipment, so that the target communication module generates a second service data writing request according to the first service data writing request and transmits the second service data writing request to the network equipment to indicate the network equipment to write data according to the second service data writing request, and a data writing result is obtained; a write result obtaining request sending module, configured to send a write result obtaining request corresponding to the target communication module to the network device, so that the network device returns the data write result according to the write result obtaining request; the standard writing result acquisition module is used for acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result; and the test result determining module is used for determining a service data write test result corresponding to the target communication module according to the write comparison result.
In some embodiments, the standard write result obtaining module comprises: a standard writing result obtaining unit, configured to obtain a standard writing result corresponding to the data writing result, where the standard writing result is obtained according to-be-written service data corresponding to the first service data writing request; and the writing comparison result obtaining unit is used for comparing the data writing result with the standard writing result to obtain the writing comparison result.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above-described communication module testing method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned communication module testing method.
When the target communication module is successfully registered in the network equipment, the communication module testing method, the communication module testing device, the computer equipment and the storage medium send a first service data writing request aiming at the network equipment to the target communication module, so that the target communication module generates a second service data writing request according to the first service data writing request, transmits the second service data writing request to the network equipment to indicate the network equipment to write data according to the second service data writing request, obtains a data writing result, sends a writing result obtaining request corresponding to the target communication module to the network equipment, so that the network equipment returns a data writing result according to the writing result obtaining request, obtains a standard writing result corresponding to the data writing result, compares the data writing result with the standard writing result, and obtains a writing comparison result, and determining a service data write test result corresponding to the target communication module according to the write comparison result, so that the target communication module is automatically tested, and the test efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for testing a communication module in some embodiments;
FIG. 2 is a flow diagram illustrating a method for testing a communication module in some embodiments;
FIG. 3 is a schematic diagram of interaction between a network device and a target communication module and test equipment in some embodiments;
fig. 4 is a flowchart illustrating the steps of determining that a target communication module successfully registers with a network device in some embodiments;
FIG. 5 is a flowchart illustrating the steps of sending a first module registration request in some embodiments;
FIG. 6 is a diagram of an application environment of a method for testing a communication module in some embodiments;
FIG. 7 is a block diagram of a communication module testing apparatus in some embodiments;
FIG. 8 is a diagram of the internal structure of a computer device in some embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The communication module testing method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a target communication module 102, a network device 104, and a test device 106. The target communication module 102, the network device 104, and the test device 106 communicate with each other via a network.
Specifically, when the test device 106 determines that the target communication module 102 is successfully registered to the network device 104, the test device 106 sends a first service data write-in request for the network device 104 to the target communication module 102, the target communication module 102 generates a second service data write-in request according to the first service data write-in request, transmits the second service data write-in request to the network device 104, and the network device 104 performs data write-in according to the second service data write-in request to obtain a data write-in result; the test equipment 106 sends a writing result acquisition request corresponding to the target communication module 102 to the network equipment 104, and the network equipment 104 returns a data writing result according to the writing result acquisition request; the test equipment 106 acquires a standard writing result corresponding to the data writing result, and compares the data writing result with the standard writing result to obtain a writing comparison result; the test device 106 determines, according to the write-in comparison result, that the service data corresponding to the target communication module 102 is written in the test result.
The target communication module 102 may be a communication module for connecting to a network in an intelligent electronic device, such as a smart meter and a smart water meter, and the network device 104 and the test device 106 may be implemented by separate servers or a server cluster formed by multiple servers.
The network equipment can be a OneNet cloud server, and the OneNet is an open cloud platform which is based on an open win-win concept and is independently developed and developed for public services. The Internet of things application network formed by taking the OneNet as the service platform can reduce the development difficulty, save the development cost and shorten the development period.
In some embodiments, as shown in fig. 2, a method for testing a communication module is provided, which is described by taking the method as an example for being applied to the testing device 106 in fig. 1, and includes the following steps:
s202, when the target communication module is successfully registered to the network equipment, sending a first service data writing request aiming at the network equipment to the target communication module, so that the target communication module generates a second service data writing request according to the first service data writing request, and transmitting the second service data writing request to the network equipment to instruct the network equipment to write data according to the second service data writing request, and obtaining a data writing result.
Specifically, registering the target communication module with the network device refers to adding the target communication module to the network device. When it is determined that the target communication module is successfully registered to the network device, the network device may obtain the service data from the target communication module and store the obtained service data. The third-party device may obtain the service data corresponding to the target communication module from the network device. The service data refers to data related to a service, and may be data related to an electric or water rate, for example. The third-party device refers to a device for acquiring service data from the network device, and may be a server, for example, when the service data is power consumption data, the third-party device may be a server for supervising the power consumption data. The target communication module may be referred to as a device Client or NB (Narrow Band) communication module.
In order to test whether the target communication module can accurately transmit the service data to the network device, the test device may enable the target communication module to send data to the network device by using the first service data write request, so that whether the target communication module can accurately transmit the data may be determined according to the data before and after the target communication module sends the data. The first service data write request is used for requesting the target communication module to write the service data into the network device, the first service data write request may carry test service data, and the test service data refers to service data used in a test process. The test service data may be generated by the test device, may be real service data acquired by the test device, such as real power consumption data, or may be data virtualized by the test device, and may be generated according to a preset service data generation rule, for example, where the preset service data generation rule may be set as needed. The first service data write request may be an instruction, for example, an AT (Attention) instruction. The AT command is a command applied to connection and communication between a terminal device and a PC (Personal Computer) application. The AT commands may also be referred to as AT commands.
The second service data write request is used for writing service data into the network equipment. The target communication module may extract the service data from the first service data write-in request, and generate a second service data write-in request according to the extracted service data, where the second service data write-in request may carry the extracted service data. The first traffic data write request may be an instruction, for example, an AT instruction. The data writing result refers to data written into the network device according to the second service data writing request. The target communication module may transmit the second service data write request to the network device through an interface of the network device. The target communication module communicates with the network device, and the interface of the network device may be a southbound interface. Messages transmitted over the southbound interface may be referred to as southbound interface messages. For example, the OneNET server may perform data transmission with the communication module through the southbound interface.
In some embodiments, the test device may obtain a registration status corresponding to the target communication module from the network device, and determine whether the target communication module is successfully registered to the network device according to the registration status. The registration status may be selected from unregistered and registered. For example, when the test device determines that the registration state corresponding to the target communication module is registered, it may be determined that the target communication module is successfully registered in the network device, and when the test device determines that the registration state corresponding to the target communication module is unregistered, it may be determined that the target communication module is not successfully registered in the network device.
In some embodiments, the target communication module may process the service data extracted from the first service data write request, and generate a second service data write request according to the processed service data. For example, the target communication module may process the extracted service data according to a preset computer protocol, so that the processed service data conforms to the specification of the preset computer protocol. The preset computer Protocol may be customized as needed, or may be selected from existing computer protocols, for example, may be selected from The CoAP (The Constrained Application Protocol) Protocol and The HTTP (Hyper Text Transfer Protocol). For example, the target communication module may process the extracted data according to the CoAP protocol and transmit the data to the network device according to the CoAP protocol.
In some embodiments, the second service data write request may carry an identifier of the target communication module, and the network device may extract the service data from the second service data write request, determine a write position of the service data according to the identifier of the target communication module, and write the service data into the corresponding position. The identifier of the target communication module may be, for example, an IMEI (International Mobile Equipment Identity) of the target communication module. The IMEI is used to identify each individual mobile communication module such as a mobile phone in a mobile phone network, and is used to uniquely identify the mobile communication module.
In some embodiments, when the target communication module obtains the first service data write request, the service data carried in the first service data write request may be temporarily stored, instead of immediately sending the second service data write request to the network device. And when the target communication module receives a service data acquisition request sent by the network equipment, sending a second service data writing request to the network equipment according to the service data acquisition request. The service data acquisition request may be, for example, a service data read request. The test device may call a read interface corresponding to the network device, and send a service data acquisition request (service data read request) to the target communication module. As shown in fig. 3, the command corresponding to the read request may be "AT + mlread".
And S204, sending a writing result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns a data writing result according to the writing result acquisition request.
Specifically, the write result acquisition request is used to request acquisition of a data write result from the network device. The write result obtaining request may correspond to a preset network transport protocol, and the preset network transport protocol may be, for example, an HTTP protocol. The write result obtaining request may carry a write result identifier corresponding to the data write result, where the write result identifier may include at least one of an identifier of the target communication module or a service data type. The traffic data type may include at least one of temperature or humidity, for example. The service data corresponding to the target communication module in the network device may include service data corresponding to a plurality of service data types, respectively.
In some embodiments, the test device may call an interface corresponding to the write result obtaining request corresponding to the network device, and send the write result obtaining request to the network device through the interface corresponding to the write result obtaining request. When the network device communicates with the test device, the interface of the network device used may be referred to as a northbound interface. Messages transmitted over the northbound interface may be referred to as northbound interface messages. For example, the OneNET server can transmit data to and from the third-party device through the northbound interface.
In some embodiments, the network device may obtain, from the write result obtaining request, a write result identifier corresponding to the data write result, obtain, according to the obtained write result identifier, the corresponding data write result, and transmit the obtained data write result to the test device.
And S206, acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result.
Specifically, the standard writing result is a correct writing result corresponding to the data writing result, and the standard writing result may be test service data carried in the first service data writing request or data obtained by processing the test service data according to a service data processing rule.
In some embodiments, in the process of writing the service data into the network device through the target communication module, when the transmission process is accurate, the data written into the network device is consistent with the service data received by the target communication module, that is, the data written into the network device is consistent with the test service data carried in the first service data writing request, and then the test device may use the obtained test service data as a standard writing result. The test device may store test service data corresponding to each first service data write request in advance.
In some embodiments, in the process of writing the service data into the network device through the target communication module, when the transmission process is accurate, the data written into the network device is obtained by processing the service data received by the target communication module according to a service data processing rule, and at this time, the test device may process the obtained test service data according to the service data processing rule, and use the processed result as a standard writing result.
In some embodiments, the test equipment may compare the standard writing result with the data writing result to obtain a writing comparison result. The write compare result may be one of a compare consistent and a compare inconsistent.
And S208, determining a service data write test result corresponding to the target communication module according to the write comparison result.
Specifically, the service data writing test result is used to indicate whether the service data is accurately written into the network device, and may be one selected from normal service data writing and abnormal service data writing. When the service data writing test result is that the service data writing is normal, the service data is accurately written into the network equipment, and when the service data writing test result is that the service data writing is abnormal, the service data is not accurately written into the network equipment.
In some embodiments, when the network device determines that the write comparison result is consistent, it may be determined that the service data write test result corresponding to the target communication module is that the service data write is normal. When the network device determines that the write comparison result is inconsistent, it may be determined that the service data write test result corresponding to the target communication module is a service data write exception.
In the communication module testing method, when the target communication module is successfully registered to the network equipment, a first service data writing request aiming at the network equipment is sent to the target communication module, so that the target communication module generates a second service data writing request according to the first service data writing request, the second service data writing request is transmitted to the network equipment to instruct the network equipment to write data according to the second service data writing request, a data writing result is obtained, a writing result obtaining request corresponding to the target communication module is sent to the network equipment, so that the network equipment returns the data writing result according to the writing result obtaining request, a standard writing result corresponding to the data writing result is obtained, the data writing result is compared with the standard writing result, a writing comparison result is obtained, and a service data writing test result corresponding to the target communication module is determined according to the writing comparison result, the automatic test of the target communication module is realized, and the test efficiency is improved.
AT present, a communication module can be connected with an onent platform to perform related function tests, and because the data receiving and sending operations on the onent platform are generally performed by manually performing operations of reading, writing, executing, subscribing, canceling and the like on the onent platform, and the tests are completed by manually receiving and sending AT commands AT an NB communication module end. For example, when the NB module interacts with the platform, the manual test has a time limit, and after receiving an AT report issued by the platform, a corresponding response AT must be sent in 3S, which is difficult to operate and affects the test efficiency. In addition, the manual test can only cover the test from the south interface (from the Client end to the Server end), can not cover the test from the north interface (from the Server end to the APP end) and the test from pulling through the north and south messages (from the APP end and the Client end), and can not cover the test due to the fact that the north interface does not have a visual user interface for operation. The APP terminal refers to a third-party device terminal.
In some embodiments, the test device may simulate a third-party device, send various operation requests for the target communication module to the network device, and the operation requests may include, for example, subscription and unsubscription in fig. 3, and the like.
In some embodiments, the test device may send a resource registration request to the target communication module to cause the target communication module to perform resource creation with the network device. The test device may send a resource list acquisition request to the network device, thereby acquiring the resource created in the network device. And when the resources are determined to be successfully created, determining that the function of the resource creation corresponding to the target communication module is normal. The resource list acquisition request may be, for example, the reading device status and the resource list in fig. 3.
In some embodiments, the step S206 obtains a standard writing result corresponding to the data writing result, and compares the data writing result with the standard writing result, and obtaining the writing comparison result includes: acquiring a standard writing result corresponding to the data writing result, wherein the standard writing result is obtained according to the service data to be written corresponding to the first service data writing request; and comparing the data writing result with the standard writing result to obtain a writing comparison result.
Specifically, the service data to be written refers to the test service data described above. The test device may store test service data corresponding to each first service data write-in request, and the test device may obtain the test service data corresponding to the first service data write-in request corresponding to the data write-in result, as a standard write-in result corresponding to the data write-in result, or process the obtained test service data to obtain the standard write-in result.
In some embodiments, the data written into the network device is consistent with the service data to be written carried in the first service data writing request, and at this time, the test device may use the obtained service data to be written as a standard writing result. Of course, the data written into the network device is obtained by processing the service data to be written received by the target communication module according to the service data processing rule, and at this time, the test device may process the obtained service data to be written according to the service data processing rule, and take the processed result as a standard writing result.
In the above embodiment, since the service data carried in the first service data write request is data that needs to be actually written into the network device, a standard write result is obtained according to the service data to be written corresponding to the first service data write request, and a real and effective standard write result can be obtained.
In some embodiments, as shown in fig. 4, the determining that the target communication module is successfully registered with the network device in step S202 includes:
s402, a first module registration request is sent to the target communication module, so that the target communication module generates a second module registration request according to the first module registration request, the second module registration request carries module registration information, and the second module registration request is transmitted to the network equipment, so that the network equipment is instructed to register the target communication module according to the module registration information, and a module registration result is obtained.
Specifically, the first module registration request is used to trigger the target communication module to register with the network device. The first module registration request may be sent by the target communication module when it is registered in the network device. The second module registration request is for requesting registration of the target communication module with the network device. The second module registration request may be an AT command, for example, the "AT + MIPLOPEN" command in fig. 3. For example, when the target communication module has a built-in dialing function, the target communication module may send an AT command for registration to the network device through the built-in dialing function, so as to send a second module registration request to the network device. The second module registration request may carry network information corresponding to the target communication module, where the network information may include at least one of a VPI (Virtual Path Identifier) or a VCI (Virtual Channel Identifier). The module registration information refers to information required for the target communication module to register to the network device. The module registration result refers to a registration result corresponding to the target communication module, and may be one of registered and unregistered. The target communication module may obtain corresponding module registration information according to the first module registration request, generate a second module registration request according to the module registration information, and transmit the second module registration request to the network device.
In some embodiments, the network device may obtain the module registration information in the second module registration request, verify the module registration information, and determine the module registration result of the target communication module according to the verification result. The verification result may be one of a verification pass and a verification fail. When the verification result is that the verification passes, the network device may determine that the module registration result is registered, and when the verification result is that the verification fails, the network device may determine that the module registration result is unregistered. The network device may store the module registration result in association with the identification of the target communication module.
S404, sending a registration result acquisition request corresponding to the target communication module to the network device, so that the network device returns a module registration result according to the registration result acquisition request.
Specifically, the registration result obtaining request is used to request obtaining of the module registration result. The registration result acquisition request may carry an identifier of the target communication module. The network device may obtain a corresponding module registration result according to the identifier of the target communication module, and transmit the obtained module registration result to the network device.
S406, acquiring a standard registration result corresponding to the module registration result, and comparing the module registration result with the standard registration result to obtain a registration comparison result.
S408, when the registration comparison result is that the comparison is consistent, the target communication module is determined to be successfully registered to the network equipment.
Specifically, the standard registration result refers to a registration result corresponding to successful registration, and may be, for example, registered. The registration comparison result is obtained by comparing the module registration result with the standard registration result. When the registration comparison result is consistent, the module registration result is consistent with the standard registration result, namely, the target communication module is successfully registered in the network equipment. And when the registration comparison result is inconsistent, the module registration result is inconsistent with the standard registration result, namely the target communication module fails to register, namely the target communication module is not registered in the network equipment.
In the above embodiment, the standard registration result corresponding to the module registration result is obtained, the module registration result is compared with the standard registration result to obtain the registration comparison result, and when the registration comparison result is consistent, the target communication module is determined to be successfully registered to the network device, so that the registration result of the target communication module is automatically determined, and the obtaining efficiency of the registration result is improved.
In some embodiments, as shown in fig. 5, the method further comprises:
s502, sending a module registration instruction to the target communication module so that the target communication module generates and returns a module registration request corresponding to the target communication module according to the module registration instruction; the module registration request carries module registration information.
Specifically, the module registration instruction is used to obtain module registration information corresponding to the target communication module. The module registration information is information required for registering the target communication module with the network device, and may include at least one of a name or an identifier of the target communication module. For example, may include an IMEI (International Mobile Equipment Identity) of the target communication module. The IMEI is used to identify each individual mobile communication module such as a mobile phone in a mobile phone network, and is used to uniquely identify the mobile communication module.
In some embodiments, the target communication module may obtain corresponding module registration information according to the module registration instruction, generate a module registration request according to the module registration information, and return the generated module registration request to the test device.
S504, extracting module registration information in the module registration request, transmitting the module registration information to the network equipment, so that the network equipment carries out authentication according to the module registration information, and generating a registration response result according to the authentication result.
Specifically, the test device may extract the module registration information in the module registration request, and write the module registration information into the network device. The registration response result may be one of registration success and registration failure. The network device may authenticate the written module registration information, and determine a registration response result according to the authentication result. The authentication result may be one of authentication pass and authentication failure. When the authentication result is authentication pass, the network device may store the module registration information, confirm that the target communication module registration is successful, and generate a registration response result indicating that the registration is successful. When the authentication result is authentication failure, the network device may confirm that the target communication module has failed in registration and generate a registration response result indicating that the registration has failed.
S506, sending a registration result obtaining request corresponding to the target communication module to the network device, so that the network device returns a registration response result according to the registration result obtaining request.
Specifically, the registration result obtaining request is used to request to obtain a registration response result, and may carry the identifier of the target communication module. The test device may call an interface for acquiring the registration response result in the network device, and send a registration result acquisition request corresponding to the target communication module to the network device through the interface for acquiring the registration response result. The network device may obtain a registration response result corresponding to the target communication module according to the registration result obtaining request, and return the registration response result corresponding to the target communication module to the test device.
The sending of the first module registration request to the target communication module in step S402 includes:
and S508, when the target communication module is determined to be successfully registered according to the registration response result, sending a first module registration request to the target communication module.
Specifically, the test device may determine whether to send the first module registration request to the target communication module according to the registration response result. For example, when the registration response result indicates that the target communication module is registered, i.e., the registration is successful, a first module registration request may be sent to the target communication module.
In the above embodiment, when the target communication module is determined to be successfully registered according to the registration response result, the first module registration request is sent to the target communication module, so that the invalid sending of the first module registration request can be avoided, the accuracy of the test result is affected, and the efficiency and accuracy of the test are improved.
In some embodiments, transmitting the module registration information to the network device in step S504 includes: acquiring registration address information, wherein the registration address information is address information corresponding to a page for module registration provided by the network equipment; acquiring a corresponding module registration page according to the registration address information, wherein the module registration page comprises a registration information filling area; and writing the module registration information into the registration information filling area.
Specifically, the registered address information is address information corresponding to a page provided by the network device and used for module registration. The module registration page is a page corresponding to the registration address information. The registration information padding area refers to an area for writing module registration information. The network test device may write the module registration information into the registration information padding area according to the registration address information acquisition module registration page.
In the above embodiment, the corresponding module registration page is acquired according to the registration address information, and the module registration information is written into the registration information filling area, so that the writing of the module registration information is automatically completed, and the registration efficiency of the module is improved.
In some embodiments, the step S208 of determining, according to the write comparison result, a service data write test result corresponding to the target communication module includes: and when the write-in comparison result is consistent, determining that the service data write-in test result corresponding to the target communication module is a test pass.
In the above embodiment, when the write-in comparison result is that the comparison is consistent, it is determined that the service data write-in test result corresponding to the target communication module passes the test, so that the test result is automatically determined, and the test efficiency is improved.
In some embodiments, a communication module testing method is provided, which may be applied in the application environment shown in fig. 6, where the third-party server may be a real-existing server, or may be a server passing through a testing software model, and the testing software is a script used for testing in a testing device, for example, a Python script. The device CoAP protocol layer can be defined as C (client), the NB-IoT (Narrow Band Internet of Things) access machine is S (server), and the application layer API is App.
Specifically, the southbound interface may be tested using AT commands, and the northbound interface may be tested using a standard interface (http messages) provided by the Onenet platform. The south-north direction message pull-through test of the Onet function can be realized through the test software of the test equipment, and the test is completely automated. May include the following steps: 1. starting the module, and registering relevant information such as an IMEI (international mobile equipment identity) and the like on an onent platform; 2. the module is internally provided with dialing, and registration is initiated on an Onenet platform through an AT command; 3. performing read-write execution and other operations on the Onenet platform through AT commands; 4. sending an Http message through a northbound interface, and sending data of the Onenet platform to a module end for interaction; 5. the module side responds to the northbound message by sending the AT.
In the embodiment, the automatic test of the communication module is realized, and the test efficiency is improved. And a standard interface of the Onenet platform is called, north and south interface information is opened, and test coverage is more comprehensive.
It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In some embodiments, as shown in fig. 7, there is provided a communication module testing apparatus including: a first service data write request sending module 702, a write result obtaining request sending module 704, a standard write result obtaining module 706, and a test result determining module 708, where:
a first service data write request sending module 702, configured to send a first service data write request for the network device to the target communication module when it is determined that the target communication module is successfully registered in the network device, so that the target communication module generates a second service data write request according to the first service data write request, and transmits the second service data write request to the network device, so as to instruct the network device to perform data write according to the second service data write request, and obtain a data write result.
A write result obtaining request sending module 704, configured to send a write result obtaining request corresponding to the target communication module to the network device, so that the network device returns a data write result according to the write result obtaining request.
And a standard writing result obtaining module 706, configured to obtain a standard writing result corresponding to the data writing result, and compare the data writing result with the standard writing result to obtain a writing comparison result.
And the test result determining module 708 is configured to determine, according to the write-in comparison result, that the service data corresponding to the target communication module is written in the test result.
In some embodiments, the standard write result acquisition module 706 includes:
and the standard writing result acquisition unit is used for acquiring a standard writing result corresponding to the data writing result, and the standard writing result is obtained according to the service data to be written corresponding to the first service data writing request.
And the writing comparison result obtaining unit is used for comparing the data writing result with the standard writing result to obtain a writing comparison result.
In some embodiments, the first service data write request sending module 702 includes:
the first module registration request sending unit is used for sending a first module registration request to the target communication module so that the target communication module generates a second module registration request according to the first module registration request, the second module registration request carries module registration information, and the second module registration request is transmitted to the network equipment so as to instruct the network equipment to register the target communication module according to the module registration information, and a module registration result is obtained.
And the registration result acquisition request sending unit is used for sending a registration result acquisition request corresponding to the target communication module to the network equipment so that the network equipment returns the module registration result according to the registration result acquisition request.
And the standard registration result acquisition unit is used for acquiring a standard registration result corresponding to the module registration result, and comparing the module registration result with the standard registration result to obtain a registration comparison result.
And the registration determining unit is used for determining that the target communication module is successfully registered to the network equipment when the registration comparison result is consistent.
In some embodiments, the apparatus further comprises:
the module registration instruction sending module is used for sending a module registration instruction to the target communication module so that the target communication module generates and returns a module registration request corresponding to the target communication module according to the module registration instruction; the module registration request carries module registration information.
And the module registration information extraction module is used for extracting the module registration information in the module registration request, transmitting the module registration information to the network equipment so that the network equipment carries out authentication according to the module registration information and generates a registration response result according to the authentication result.
And the registration result acquisition request sending module is used for sending a registration result acquisition request corresponding to the target communication module to the network equipment so that the network equipment returns a registration response result according to the registration result acquisition request.
And the first module registration request sending unit is also used for sending a first module registration request to the target communication module when the target communication module is determined to be successfully registered according to the registration response result.
In some embodiments, the module registration information extraction module comprises:
a registration address information acquisition unit, configured to acquire registration address information, where the registration address information is address information corresponding to a page provided by the network device and used for module registration;
a module registration page acquisition unit, configured to acquire a corresponding module registration page according to the registration address information, where the module registration page includes a registration information filling area;
and a module registration information writing unit for writing the module registration information into the registration information padding area.
In some embodiments, the test result determining module 708 is further configured to determine that the service data corresponding to the target communication module is written in the test result as a test pass when the write comparison result is that the comparison is consistent.
For the specific definition of the communication module testing device, reference may be made to the above definition of the communication module testing method, which is not described herein again. Each module in the communication module testing apparatus may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a communication module testing method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In some embodiments, a computer device is provided, comprising a memory in which a computer program is stored and a processor which, when executing the computer program, carries out the steps of the above-described communication module testing method.
In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned communication module testing method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for testing a communication module, the method comprising:
when the target communication module is successfully registered to the network equipment, sending a first service data writing request aiming at the network equipment to the target communication module, so that the target communication module generates a second service data writing request according to the first service data writing request, and transmitting the second service data writing request to the network equipment to instruct the network equipment to write data according to the second service data writing request, so as to obtain a data writing result;
sending a writing result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the data writing result according to the writing result acquisition request;
acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result;
and determining a service data write test result corresponding to the target communication module according to the write comparison result.
2. The method according to claim 1, wherein the obtaining of the standard writing result corresponding to the data writing result and the comparing of the data writing result with the standard writing result to obtain the writing comparison result comprises:
acquiring a standard writing result corresponding to the data writing result, wherein the standard writing result is obtained according to the service data to be written corresponding to the first service data writing request;
and comparing the data writing result with the standard writing result to obtain the writing comparison result.
3. The method of claim 1, wherein determining that the target communication module successfully registers with the network device comprises:
sending a first module registration request to the target communication module, so that the target communication module generates a second module registration request according to the first module registration request, wherein the second module registration request carries module registration information, and transmits the second module registration request to the network equipment, so as to instruct the network equipment to register the target communication module according to the module registration information, and obtain a module registration result;
sending a registration result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the module registration result according to the registration result acquisition request;
acquiring a standard registration result corresponding to the module registration result, and comparing the module registration result with the standard registration result to obtain a registration comparison result;
and when the registration comparison result is consistent, determining that the target communication module is successfully registered to the network equipment.
4. The method of claim 3, further comprising:
sending a module registration instruction to the target communication module so that the target communication module generates and returns a module registration request corresponding to the target communication module according to the module registration instruction; the module registration request carries module registration information;
extracting module registration information in the module registration request, transmitting the module registration information to the network equipment so that the network equipment carries out authentication according to the module registration information, and generating a registration response result according to an authentication result;
sending a registration result acquisition request corresponding to the target communication module to the network equipment, so that the network equipment returns the registration response result according to the registration result acquisition request;
said sending a first module registration request to the target communication module comprises:
and when the target communication module is determined to be successfully registered according to the registration response result, sending a first module registration request to the target communication module.
5. The method of claim 4, wherein transmitting the module registration information to the network device comprises:
acquiring registration address information, wherein the registration address information is address information corresponding to a page for module registration provided by the network equipment;
acquiring a corresponding module registration page according to the registration address information, wherein the module registration page comprises a registration information filling area;
writing the module registration information into the registration information padding area.
6. The method according to claim 1, wherein the determining a service data write test result corresponding to the target communication module according to the write comparison result comprises:
and when the write-in comparison result is consistent, determining that the service data write-in test result corresponding to the target communication module is a test pass.
7. A communication module testing apparatus, the apparatus comprising:
the first service data writing request sending module is used for sending a first service data writing request aiming at the network equipment to a target communication module when the target communication module is determined to be successfully registered to the network equipment, so that the target communication module generates a second service data writing request according to the first service data writing request and transmits the second service data writing request to the network equipment to indicate the network equipment to write data according to the second service data writing request, and a data writing result is obtained;
a write result obtaining request sending module, configured to send a write result obtaining request corresponding to the target communication module to the network device, so that the network device returns the data write result according to the write result obtaining request;
the standard writing result acquisition module is used for acquiring a standard writing result corresponding to the data writing result, and comparing the data writing result with the standard writing result to obtain a writing comparison result;
and the test result determining module is used for determining a service data write test result corresponding to the target communication module according to the write comparison result.
8. The apparatus of claim 7, wherein the standard write result obtaining module comprises:
a standard writing result obtaining unit, configured to obtain a standard writing result corresponding to the data writing result, where the standard writing result is obtained according to-be-written service data corresponding to the first service data writing request;
and the writing comparison result obtaining unit is used for comparing the data writing result with the standard writing result to obtain the writing comparison result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010834647.XA 2020-08-19 2020-08-19 Communication module testing method, device, computer equipment and storage medium Active CN112187561B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010834647.XA CN112187561B (en) 2020-08-19 2020-08-19 Communication module testing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010834647.XA CN112187561B (en) 2020-08-19 2020-08-19 Communication module testing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112187561A true CN112187561A (en) 2021-01-05
CN112187561B CN112187561B (en) 2022-05-27

Family

ID=73919438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010834647.XA Active CN112187561B (en) 2020-08-19 2020-08-19 Communication module testing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112187561B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094106A (en) * 2021-03-11 2021-07-09 深圳市广和通无线股份有限公司 Communication control method, communication control device, computer equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105027131A (en) * 2012-12-27 2015-11-04 罗文有限公司 System and method for secure login, and apparatus for same
CN105849688A (en) * 2014-12-01 2016-08-10 华为技术有限公司 Data write-in method, apparatus and device, and storage system
CN106656940A (en) * 2015-11-04 2017-05-10 阿里巴巴集团控股有限公司 Method and device for processing service accessing request
CN107483695A (en) * 2017-09-26 2017-12-15 努比亚技术有限公司 Terminal audio frequency calibration method, control device, measuring system and readable storage medium storing program for executing
CN108776640A (en) * 2018-05-07 2018-11-09 深圳壹账通智能科技有限公司 Distributed test method, device, computer equipment and storage medium
CN109889410A (en) * 2019-03-18 2019-06-14 北京达佳互联信息技术有限公司 Test method, apparatus, agent equipment and the readable storage medium storing program for executing of business function
CN110020521A (en) * 2017-09-09 2019-07-16 苹果公司 The realization of biometric authentication
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN110674027A (en) * 2019-08-16 2020-01-10 华东师范大学 SDN data plane software consistency test system and method oriented to P4 programming language
CN111343557A (en) * 2020-02-28 2020-06-26 西安广和通无线通信有限公司 Audio signal testing method, device and equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105027131A (en) * 2012-12-27 2015-11-04 罗文有限公司 System and method for secure login, and apparatus for same
CN105849688A (en) * 2014-12-01 2016-08-10 华为技术有限公司 Data write-in method, apparatus and device, and storage system
CN106656940A (en) * 2015-11-04 2017-05-10 阿里巴巴集团控股有限公司 Method and device for processing service accessing request
CN110020521A (en) * 2017-09-09 2019-07-16 苹果公司 The realization of biometric authentication
CN107483695A (en) * 2017-09-26 2017-12-15 努比亚技术有限公司 Terminal audio frequency calibration method, control device, measuring system and readable storage medium storing program for executing
CN108776640A (en) * 2018-05-07 2018-11-09 深圳壹账通智能科技有限公司 Distributed test method, device, computer equipment and storage medium
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN109889410A (en) * 2019-03-18 2019-06-14 北京达佳互联信息技术有限公司 Test method, apparatus, agent equipment and the readable storage medium storing program for executing of business function
CN110674027A (en) * 2019-08-16 2020-01-10 华东师范大学 SDN data plane software consistency test system and method oriented to P4 programming language
CN111343557A (en) * 2020-02-28 2020-06-26 西安广和通无线通信有限公司 Audio signal testing method, device and equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094106A (en) * 2021-03-11 2021-07-09 深圳市广和通无线股份有限公司 Communication control method, communication control device, computer equipment and storage medium
CN113094106B (en) * 2021-03-11 2024-03-15 深圳市广和通无线股份有限公司 Communication control method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112187561B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN111262759B (en) Internet of things platform testing method, device, equipment and storage medium
CN111488166B (en) Method and device for upgrading software of management unit of double-core intelligent ammeter and storage medium
CN109767240A (en) Cloud customer service distribution method, device, computer equipment and storage medium
CN108400978B (en) Vulnerability detection method and device, computer equipment and storage medium
CN111193768A (en) Network data processing method and device, computer equipment and storage medium
CN106658666B (en) Method and equipment for establishing wireless connection
CN113315943A (en) Conference information transmission method, system, computer equipment and storage medium
CN111045942A (en) Application testing method, system, storage medium and electronic equipment
CN112187561B (en) Communication module testing method, device, computer equipment and storage medium
CN113742250B (en) Automatic interface testing method and device
CN113672894A (en) Data processing method, device and equipment for identifying code request and storage medium
CN112181822A (en) Test method and test method for starting time consumption of application program
CN112580730A (en) Terminal type identification method and device
CN114429408B (en) Method, device, equipment and system for checking configuration file of intelligent substation
CN110752933A (en) Verification code input method and device, electronic equipment and storage medium
CN115004666A (en) Registration method, device, equipment and storage medium of Internet of things equipment
CN112446723A (en) Method, computer-readable storage medium, and apparatus for determining user invitation relationship
CN111328068A (en) Card writing method and device, computer equipment and storage medium
CN108959879A (en) Data capture method, device, electronic equipment and the server of application program
CN110532186B (en) Method, device, electronic equipment and storage medium for testing by using verification code
KR101862617B1 (en) System of testing iot sensor for power facility management
CN112817816B (en) Embedded point processing method and device, computer equipment and storage medium
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
US20110270970A1 (en) Network device testing system and method
CN110365627B (en) Application program synchronization method and device, computing equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant