CN115276844B - Communication module testing method and device, storage medium and electronic equipment - Google Patents
Communication module testing method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN115276844B CN115276844B CN202210922267.0A CN202210922267A CN115276844B CN 115276844 B CN115276844 B CN 115276844B CN 202210922267 A CN202210922267 A CN 202210922267A CN 115276844 B CN115276844 B CN 115276844B
- Authority
- CN
- China
- Prior art keywords
- communication module
- test
- tested
- instruction
- test script
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/10—Monitoring; Testing of transmitters
- H04B17/15—Performance testing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B17/00—Monitoring; Testing
- H04B17/20—Monitoring; Testing of receivers
- H04B17/29—Performance testing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a device for testing a communication module and electronic equipment. The method comprises the following steps: acquiring a plurality of test instructions for testing a communication module to be tested; determining a test script corresponding to each test instruction; and testing the communication module to be tested based on the plurality of test scripts to obtain a test result corresponding to each test script, wherein the test result is used for representing the communication state of the communication module to be tested. The invention solves the technical problem of low communication function test efficiency caused by the adoption of the local computer to test the related communication module in the prior art.
Description
Technical Field
The invention relates to the field of cloud processing, in particular to a testing method and device of a communication module, a storage medium and electronic equipment.
Background
A communication module generally refers to a module that is used on other devices to perform communication functions (particularly wireless communication functions such as GSM, 3G, 4G, 5G), and requires comprehensive performance testing before production is completed or installed on the other devices to ensure performance of the product.
In existing related tests, a single module under test is typically connected to a local computer, and then related functional tests are performed by a tester using an automated test framework. According to the test method, only one tester can test a certain function of the module to be tested at the same time, if the situation that the tester A needs to test the voice call function and the tester B needs to test the short message function occurs, two sets of computers are needed to be used simultaneously, and therefore the problem of low communication function test efficiency is caused.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing a communication module, a storage medium and electronic equipment, which at least solve the technical problem of low communication function test efficiency caused by adopting a local computer to test the related communication module in the prior art.
According to an aspect of the embodiment of the present invention, there is provided a method for testing a communication module, including: acquiring a plurality of test instructions for testing a communication module to be tested; determining a test script corresponding to each test instruction; and testing the communication module to be tested based on the plurality of test scripts to obtain a test result corresponding to each test script, wherein the test result is used for representing the communication state of the communication module to be tested.
Further, the testing method of the communication module further comprises the following steps: after testing the communication module to be tested based on a plurality of test scripts to obtain test results, determining a target test result based on the test results corresponding to each test script, wherein the test scripts comprise at least one of a first test script and a second test script, the first test script is used for performing call testing on the communication module to be tested, the second test script is used for performing short message testing on the communication module to be tested, and the target test result is used for representing whether the communication module to be tested can normally communicate.
Further, the testing method of the communication module further comprises the following steps: if the test script is a first test script, a first instruction is sent to the communication module to be tested based on the first test script, so that the communication module to be tested sends a call request to the target communication module based on the first instruction; if the communication module to be tested fails to send the feedback call request, a test result corresponding to the first test script is generated.
Further, the testing method of the communication module further comprises the following steps: after a first instruction is sent to the communication module to be tested based on the first test script, if the communication module to be tested feeds back a call request to be sent successfully, a second instruction is sent to the target communication module based on the first test script, so that the target communication module responds to the call request; if the feedback response of the target communication module fails to respond to the call request, a test result corresponding to the first test script is generated.
Further, the testing method of the communication module further comprises the following steps: after the second instruction is sent to the target communication module based on the first test script, if the target communication module feeds back a successful response call request, a third instruction is sent to the communication module to be tested based on the first test script, and a fourth instruction is sent to the target communication module based on the first test script, so that the communication module to be tested executes a call ending operation based on the third instruction, and the target communication module executes the call ending operation based on the fourth instruction; acquiring a first execution result fed back by the communication module to be tested and a second execution result fed back by the target communication module, wherein the first execution result represents whether the communication module to be tested has executed a call ending operation or not, and the second execution result represents whether the target communication module has executed a call ending operation or not; and determining a test result corresponding to the first test script based on the first execution result and the second execution result.
Further, the testing method of the communication module further comprises the following steps: if the test script is the second test script, a fifth instruction is sent to the communication module to be tested, so that the communication module to be tested sends a target short message to the target communication module based on the fifth instruction; if the communication module to be tested fails to feed back the target short message, determining a test result corresponding to the second test script.
Further, the testing method of the communication module further comprises the following steps: after the fifth instruction is sent to the communication module to be tested, if the communication module to be tested feeds back that the target short message is successfully sent, a sixth instruction is sent to the target communication module, so that the target communication module replies the target short message based on the sixth instruction; acquiring a first recovery result fed back by the communication module to be tested and a second recovery result fed back by the target communication module, wherein the first recovery result represents whether the communication module to be tested receives recovery content of the target communication module or not, and the second recovery result represents whether the target communication module is recovered or not; and determining a test result corresponding to the second test script based on the first reply result and the second reply result.
According to another aspect of the embodiment of the present invention, there is also provided a test device for a communication module, including: the acquisition module is used for acquiring a plurality of test instructions for testing the communication module to be tested; the determining module is used for determining a test script corresponding to each test instruction; the test module is used for testing the communication module to be tested based on a plurality of test scripts to obtain a test result, wherein the test result is used for representing whether the communication module to be tested can normally communicate.
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described test method of the communication module when running.
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the programs, wherein the programs are set to execute the testing method of the communication module when running.
In the embodiment of the invention, a mode of simultaneously testing a plurality of communication functions of a communication module to be tested based on a cloud server is adopted, a plurality of test instructions for testing the communication module to be tested are obtained, then a test script corresponding to each test instruction is determined, and therefore the communication module to be tested is tested based on the plurality of test scripts, and a test result corresponding to each test script is obtained, wherein the test result is used for representing the communication state of the communication module to be tested.
In the process, a plurality of test instructions are obtained based on the cloud server, so that on one hand, the problem that a test environment is limited because a relevant worker needs to be in the same space with the local computer when testing the communication module through the local computer is avoided, and on the other hand, the cloud server can respond to test instructions input by different users at the same time, and the problem that when the local computer is adopted to test the communication module, the local computer can only interact with one tester is avoided, so that the test efficiency of testing the communication module to be tested can be effectively improved. Further, by adopting the cloud server to test different communication functions of the communication module to be tested based on the test script corresponding to each test instruction, the test efficiency of the communication module to be tested is further improved.
Therefore, the scheme provided by the application achieves the aim of simultaneously testing a plurality of communication functions of the communication module to be tested based on the cloud server, so that the technical effect of improving the testing efficiency is achieved, and the technical problem of low testing efficiency of the communication functions caused by the fact that a local computer is adopted for testing the related communication module in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of an alternative method of testing a communication module according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an alternative method of testing a communication module according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an alternative testing apparatus for a communication module according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, there is provided an embodiment of a method of testing a communication module, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical sequence is shown in the flowchart, in some cases the steps shown or described may be performed in a different order than what is shown or described herein.
Fig. 1 is a schematic diagram of an alternative testing method of a communication module according to an embodiment of the present invention, as shown in fig. 1, the method is applied to a cloud server, and includes the following steps:
step S102, a plurality of test instructions for testing the communication module to be tested are obtained.
In step S102, a cloud server is used as an execution body of the present application, and a plurality of test instructions for testing a communication module to be tested are obtained through the cloud server, where the communication module to be tested may be a sim card or other communication modules.
Optionally, before the cloud server acquires the plurality of test instructions, the relevant staff may copy an automation test framework and a plurality of test scripts for testing the communication module to be tested in the cloud server. Then, as shown in fig. 1, the cloud server may respond to different test instructions for testing the communication module to be tested, which are input by different target objects (such as the user a and the user B shown in fig. 1), and call the automated test framework in the cloud server. The test instruction at least comprises information for representing a test type, and the test type can be a video test, a call test, a short message test or other test types.
It should be noted that, through obtaining a plurality of test instructions based on the cloud server, on one hand, avoided relevant staff to be in the limited problem of the test environment that produces with local computer in the same space when testing communication module through local computer, on the other hand, the cloud server can respond the test instruction of different user input simultaneously, when having avoided adopting local computer to test communication module, local computer can only interact with one tester to can effectively improve the test efficiency who treats the test communication module and test.
Step S104, determining a test script corresponding to each test instruction.
In step S104, the cloud server may determine a test type corresponding to each test instruction, thereby determining a corresponding test script based on the test type. And after determining the test script, the cloud server may parse the determined test script for subsequent use.
Step S106, testing the communication module to be tested based on a plurality of test scripts to obtain a test result, wherein the test result is used for representing whether the communication module to be tested can normally communicate.
In step S106, the cloud server may be connected to the communication module to be tested through the serial port, and the cloud server may simultaneously run a plurality of test scripts to test different communication functions of the communication module to be tested, so as to obtain test results corresponding to different communication functions, where the test results are used to represent a communication state of the communication module to be tested corresponding to a test type, for example, when the test type is a call test, the test results may be used to represent that the communication module to be tested is in a state of success/failure to call, success/failure to dial out a phone, success/failure to hang up a phone, and the like, and when the test type is a short message test, the test results may be used to represent that the communication module to be tested is in a state of success/failure to send a short message, success/failure to receive a short message, and the like. And then, the cloud server can feed back each test result to the target object inputting the test instruction corresponding to the test result so as to obtain the corresponding target object.
It should be noted that, by adopting the cloud server to test different communication functions of the communication module to be tested based on a plurality of test scripts at the same time, further improvement of the test efficiency of the communication module to be tested is realized.
Based on the above-mentioned schemes defined in step S102 to step S106, it can be known that in the embodiment of the present invention, a manner of simultaneously testing a plurality of communication functions of a communication module to be tested based on a cloud server is adopted, by acquiring a plurality of test instructions for testing the communication module to be tested, and then determining a test script corresponding to each test instruction, thereby testing the communication module to be tested based on the plurality of test scripts, and obtaining a test result corresponding to each test script, where the test result is used to characterize a communication state of the communication module to be tested.
It is easy to note that in the above-mentioned process, through obtaining a plurality of test instructions based on the cloud server, on one hand, avoided relevant staff when carrying out the test to the communication module through the local computer, need be in the restricted problem of the test environment that produces with local computer in the same space, on the other hand, the cloud server can respond the test instruction of different user inputs simultaneously, when having avoided adopting the local computer to carry out the test to the communication module, the local computer can only interact with a tester, thereby can effectively improve the test efficiency who treats the test of test communication module. Further, by adopting the cloud server to test different communication functions of the communication module to be tested based on the test script corresponding to each test instruction, the test efficiency of the communication module to be tested is further improved.
Therefore, the scheme provided by the application achieves the aim of simultaneously testing a plurality of communication functions of the communication module to be tested based on the cloud server, so that the technical effect of improving the testing efficiency is achieved, and the technical problem of low testing efficiency of the communication functions caused by the fact that a local computer is adopted for testing the related communication module in the prior art is solved.
In an optional embodiment, after testing the communication module to be tested based on a plurality of test scripts to obtain a test result, the cloud server may determine a target test result based on the test result corresponding to each test script, where the test script includes at least one of a first test script and a second test script, the first test script is used for performing a call test on the communication module to be tested, the second test script is used for performing a short message test on the communication module to be tested, and the target test result is used for characterizing whether the communication module to be tested can normally communicate.
The test script comprises at least one of a first test script and a second test script, the test script can also comprise a third test script or other test scripts, and the third test script can be used for carrying out video test on the communication module to be tested.
Optionally, the cloud server may determine whether the communication module to be tested can normally communicate based on communication states of the communication module to be tested corresponding to different communication functions. Specifically, when all communication states corresponding to the communication module to be tested are characterized by the corresponding communication functions being normal, the cloud server can determine that the target communication result is that the communication module to be tested can normally communicate, and when all communication states corresponding to the communication module to be tested are characterized by the communication states corresponding to the communication function abnormality, the cloud server can determine that the target communication result is that the communication module to be tested cannot normally communicate. And the determined target test result can be stored for the related staff to acquire.
It should be noted that, by determining the target test result based on the test result corresponding to each test script, accurate judgment of the communication function of the communication module to be tested is realized.
In an alternative embodiment, in the process of testing the communication module to be tested based on a plurality of test scripts to obtain the test result corresponding to each test script, if the test script is the first test script, the cloud server may send a first instruction to the communication module to be tested based on the first test script, so that the communication module to be tested sends a call request to the target communication module based on the first instruction, and if the communication module to be tested feeds back that the call request is failed to send, the cloud server may generate the test result corresponding to the first test script.
Specifically, as shown in fig. 2, when the test type corresponding to the test instruction input by the user a to the cloud server is a call test, the cloud server may execute the foregoing first test script, so that based on the first test script, a "call instruction to the target communication module (i.e. the foregoing first instruction)" is sent to the communication module to be tested through the serial port. The communication module to be tested can receive the instruction, call the target communication module based on the instruction, and then the execution result of the step is sent to the cloud server through the serial port, and the execution result of the step can represent that the call request is sent successfully or the call request is sent failed.
Further, when the cloud server obtains the execution result indicating that the call request is failed to send, the cloud server can directly generate a test result corresponding to the first test script based on the execution result, and the test result can indicate that the communication module to be tested is in a state that the call cannot be dialed.
It should be noted that, when the call request fails to send, the corresponding test result is determined based on the execution result fed back by the communication module to be tested, so that on one hand, accurate determination of the test result is realized, and on the other hand, invalid execution of subsequent call steps is avoided, thereby improving the test efficiency and simultaneously ensuring the accuracy of the test result.
In an alternative embodiment, after sending the first instruction to the communication module to be tested based on the first test script, if the communication module to be tested feeds back the call request to send successfully, the cloud server may send the second instruction to the target communication module based on the first test script, so that the target communication module responds to the call request, and if the target communication module feeds back the response call request fails, the cloud server may generate a test result corresponding to the first test script.
Optionally, when the cloud server obtains an execution result indicating that the call request is successfully sent, the cloud server may continue to execute the first test script, so as to send an instruction of "answer a call (i.e. the aforementioned second instruction)" to the target communication module through the serial port. The target communication module can receive the instruction, answer the call based on the instruction, and send the execution result of the step to the cloud server through the serial port, wherein the execution result of the step can represent success of responding to the call request or failure of responding to the call request. The target communication module can be connected with the cloud server through a serial port.
Further, when the cloud server obtains the execution result indicating that the response to the call request fails, the cloud server can directly generate a test result corresponding to the first test script based on the execution result, and the test result can indicate that the communication module to be tested is in a state that the call is successfully dialed but the call cannot be made.
It should be noted that, when the target communication module fails to respond to the call request, the corresponding test result is determined based on the execution result fed back by the target communication module, so that on one hand, the specific determination of the abnormal function is realized, and on the other hand, the invalid execution of the subsequent call step is avoided, thereby improving the test efficiency and simultaneously ensuring the accuracy of the test result.
In an alternative embodiment, after sending the second instruction to the target communication module based on the first test script, if the target communication module feeds back the call request successfully, the cloud server may send the third instruction to the communication module to be tested based on the first test script, and send the fourth instruction to the target communication module based on the first test script, so that the communication module to be tested performs the call ending operation based on the third instruction, and the target communication module performs the call ending operation based on the fourth instruction, and then obtains a first execution result fed back by the communication module to be tested and a second execution result fed back by the target communication module, so as to determine, based on the first execution result and the second execution result, a test result corresponding to the first test script, where the first execution result indicates whether the communication module to be tested has performed the call ending operation, and the second execution result indicates whether the target communication module has performed the call ending operation.
Optionally, when the cloud server obtains an execution result indicating that the response to the call request is successful, the cloud server may continue to execute the first test script, so that based on the first test script, a "hang-up instruction (i.e. the third instruction described above)" is sent to the communication module to be tested through the serial port, and after the third instruction is sent, an "hang-up instruction (i.e. the fourth instruction described above)" is sent to the target communication module in an nth second, where N is a numerical value greater than 1.
Further, the communication module to be tested may receive the third instruction and hang up the phone based on the instruction, and simultaneously send the execution result of the step (i.e. the first execution result) to the cloud server through the serial port, and when receiving the fourth instruction, the target communication module may hang up the phone based on the instruction and send the execution result of the step (i.e. the second execution result) to the cloud server through the serial port.
Still further, the communication module to be tested may determine a test result corresponding to the first test script based on the first execution result and the second execution result. For example, when the first execution result and the second execution result both represent that the hang-up is successful, it is determined that the test result corresponding to the first test script is that the communication module to be tested is in a state of successfully dialing out a phone call and successfully hanging up the phone call, when the first execution result represents that the hang-up is failed and the second execution result represents that the hang-up is successful, it is determined that the test result corresponding to the first test script is that the communication module to be tested is in a state of successfully dialing out the phone call and not hanging up the phone call, and when both the first execution result and the second execution result represent that the hang-up is failed, the hang-up operation can be controlled to be executed again by the communication module to be tested and the target communication module based on the first test script until the second execution result represents that the hang-up is successful, so that the test result is convenient to determine.
Further, as shown in fig. 2, after the cloud server acquires the test result corresponding to the first test script, the cloud server may generate a report based on the test result to feed back to the user a.
It should be noted that, by combining the execution results of the instruction by the communication module to be tested and the target communication module, the hang-up telephone function of the communication module to be tested is determined, so that accurate judgment of the function is realized, and inaccurate judgment caused by the influence of indistinguishable external factors is avoided.
In an optional embodiment, in a process of testing the communication module to be tested based on a plurality of test scripts to obtain a test result corresponding to each test script, if the test script is a second test script, the cloud server may send a fifth instruction to the communication module to be tested, so that the communication module to be tested sends a target short message to the target communication module based on the fifth instruction; if the communication module to be tested fails to feed back the target short message, the cloud server can determine a test result corresponding to the second test script.
Specifically, as shown in fig. 2, when the test type corresponding to the test instruction input by the user B to the cloud server is a short message test, the cloud server may execute the foregoing second test script, so that based on the second test script, the to-be-tested communication module sends a "send short message instruction to the target communication module (i.e. the foregoing fifth instruction)" through the serial port, the to-be-tested communication module may receive the instruction, send a target short message to the foregoing target communication module based on the instruction, and then send an execution result of the step to the cloud server through the serial port, where the execution result of the step may indicate that the target short message is sent successfully or that the target short message is sent fails.
Further, when the cloud server obtains the execution result representing the failure of sending the target short message, the cloud server can directly generate a test result corresponding to the second test script based on the execution result, and the test result can represent that the communication module to be tested is in a state that the short message cannot be sent.
It should be noted that, when the sending of the target short message fails, the corresponding test result is determined based on the execution result fed back by the communication module to be tested, so that on one hand, the accurate determination of the test result is realized, and on the other hand, the invalid execution of the subsequent steps is avoided, thereby improving the test efficiency and simultaneously ensuring the accuracy of the test result.
In an optional embodiment, after sending the fifth instruction to the to-be-tested communication module, if the to-be-tested communication module feeds back that the target short message is sent successfully, the cloud server may send a sixth instruction to the target communication module, so that the target communication module replies the target short message based on the sixth instruction, and then obtains a first reply result fed back by the to-be-tested communication module and a second reply result fed back by the target communication module, so as to determine a test result corresponding to the second test script based on the first reply result and the second reply result. The first reply result represents whether the communication module to be tested receives reply content of the target communication module or not, and the second reply result represents whether the target communication module is recovered or not.
Optionally, when the cloud server obtains an execution result indicating that the sending of the target short message is successful, the cloud server may continue to execute the second test script to send a "reply short message (i.e. the sixth instruction)" to the target communication module through the serial port, and the target communication module may receive the instruction, reply the short message based on the instruction, and send an execution result of the step (i.e. the second reply result) to the cloud server through the serial port. Meanwhile, after obtaining the mth second of the second reply result, the cloud server may send an inquiry request to the communication module to be tested to obtain the first reply result.
Still further, the communication module to be tested may determine a test result corresponding to the first test script based on the first reply result and the second reply result.
For example, when the second reply result indicates that the target communication module has replied and the first reply result indicates that the communication module to be tested receives the reply content of the target communication module, it is determined that the test result corresponding to the second test script is that the communication module to be tested is in a state of successfully sending a short message and successfully receiving the short message, when the second reply result indicates that the target communication module has replied and the first reply result indicates that the communication module to be tested does not receive the reply content of the target communication module, it is determined that the test result corresponding to the second test script is that the communication module to be tested is in a state of successfully sending a short message but not receiving the short message, and when the second reply result indicates that the target communication module does not reply and the first reply result indicates that the communication module to be tested does not receive the reply content of the target communication module, the target communication module can be controlled to be re-executed based on the second test script until the second reply result indicates that the reply content of the target communication module is replied, so that the test result is convenient to determine.
Further, as shown in fig. 2, after the cloud server acquires the test result corresponding to the second test script, the cloud server may generate a report based on the test result to feed back to the user B.
It should be noted that, by combining the reply results fed back by the communication module to be tested and the target communication module, the function of receiving the short message of the communication module to be tested is determined, so that accurate judgment of the function is realized, and inaccurate judgment caused by the influence of indistinguishable external factors is avoided.
Therefore, the scheme provided by the application achieves the aim of simultaneously testing a plurality of communication functions of the communication module to be tested based on the cloud server, so that the technical effect of improving the testing efficiency is achieved, and the technical problem of low testing efficiency of the communication functions caused by the fact that a local computer is adopted for testing the related communication module in the prior art is solved.
Example 2
According to an embodiment of the present invention, there is provided an embodiment of a testing apparatus for a communication module, where fig. 3 is a schematic diagram of an alternative testing apparatus for a communication module according to an embodiment of the present invention, as shown in fig. 3, and the apparatus includes:
the acquiring module 302 is configured to acquire a plurality of test instructions for testing the communication module to be tested;
A determining module 304, configured to determine a test script corresponding to each test instruction;
the test module 306 is configured to test the communication module to be tested based on a plurality of test scripts, and obtain a test result corresponding to each test script, where the test result is used to characterize a communication state of the communication module to be tested.
It should be noted that, the above-mentioned obtaining module 302, determining module 304 and testing module 306 correspond to steps S102 to S106 in the above-mentioned embodiment, and the three modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above-mentioned embodiment 1.
Optionally, the testing device of the communication module further includes: the first determining sub-module is used for determining a target test result based on the test result corresponding to each test script, wherein the test scripts comprise at least one of a first test script and a second test script, the first test script is used for performing call test on the communication module to be tested, the second test script is used for performing short message test on the communication module to be tested, and the target test result is used for representing whether the communication module to be tested can normally communicate.
Optionally, the test module further includes: the first sending module is used for sending a first instruction to the communication module to be tested based on the first test script if the test script is the first test script, so that the communication module to be tested sends a call request to the target communication module based on the first instruction; the first generation module is used for generating a test result corresponding to the first test script if the communication module to be tested fails to send the feedback call request.
Optionally, the testing device of the communication module further includes: the second sending module is used for sending a second instruction to the target communication module based on the first test script if the communication module to be tested feeds back the call request to be sent successfully, so that the target communication module responds to the call request; and the second generation module is used for generating a test result corresponding to the first test script if the feedback response of the target communication module fails to the call request.
Optionally, the testing device of the communication module further includes: the third sending module is used for sending a third instruction to the communication module to be tested based on the first test script and sending a fourth instruction to the target communication module based on the first test script if the target communication module feeds back the response call request successfully, so that the communication module to be tested executes the call ending operation based on the third instruction, and the target communication module executes the call ending operation based on the fourth instruction; the first acquisition sub-module is used for acquiring a first execution result fed back by the communication module to be tested and a second execution result fed back by the target communication module, wherein the first execution result represents whether the communication module to be tested has executed a call ending operation or not, and the second execution result represents whether the target communication module has executed a call ending operation or not; and the second determining sub-module is used for determining a test result corresponding to the first test script based on the first execution result and the second execution result.
Optionally, the test module further includes: the fourth sending module is used for sending a fifth instruction to the communication module to be tested if the test script is the second test script, so that the communication module to be tested sends a target short message to the target communication module based on the fifth instruction; and the third determining sub-module is used for determining a test result corresponding to the second test script if the communication module to be tested fails to send the feedback target short message.
Optionally, the testing device of the communication module further includes: the fifth sending module is used for sending a sixth instruction to the target communication module if the communication module to be tested feeds back that the target short message is sent successfully, so that the target communication module replies the target short message based on the sixth instruction; the second acquisition sub-module is used for acquiring a first recovery result fed back by the communication module to be tested and a second recovery result fed back by the target communication module, wherein the first recovery result represents whether the communication module to be tested receives recovery content of the target communication module or not, and the second recovery result represents whether the target communication module is recovered or not; and a fourth determining sub-module for determining a test result corresponding to the second test script based on the first and second reply results.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-described test method of the communication module when running.
Example 4
According to another aspect of an embodiment of the present invention, there is also provided an electronic device including one or more processors; and the memory is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the programs, wherein the programs are set to execute the testing method of the communication module when running.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of units may be a logic function division, and there may be another division manner in actual implementation, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.
Claims (7)
1. The testing method of the communication module is characterized by being applied to a cloud server and comprising the following steps:
acquiring a plurality of test instructions for testing a communication module to be tested;
determining a test script corresponding to each test instruction;
testing the communication module to be tested based on a plurality of test scripts to obtain a test result corresponding to each test script, wherein the test result is used for representing the communication state of the communication module to be tested;
the method for testing the communication module to be tested based on the test scripts to obtain a test result corresponding to each test script comprises the following steps:
if the test script is a first test script, a first instruction is sent to the communication module to be tested based on the first test script, so that the communication module to be tested sends a call request to a target communication module based on the first instruction, wherein the first test script is used for performing call test on the communication module to be tested;
If the communication module to be tested feeds back the call request to be failed to be sent, a test result corresponding to the first test script is generated;
after sending a first instruction to the communication module to be tested based on the first test script, the method further comprises:
if the communication module to be tested feeds back that the call request is successfully sent, a second instruction is sent to the target communication module based on the first test script, so that the target communication module responds to the call request;
if the feedback response of the target communication module fails to the call request, a test result corresponding to the first test script is generated;
wherein after sending a second instruction to the target communication module based on the first test script, the method further comprises:
if the target communication module feeds back the response to the call request successfully, a third instruction is sent to the communication module to be tested based on the first test script, and a fourth instruction is sent to the target communication module based on the first test script, so that the communication module to be tested executes the call ending operation based on the third instruction, and the target communication module executes the call ending operation based on the fourth instruction;
Acquiring a first execution result fed back by the communication module to be tested and a second execution result fed back by the target communication module, wherein the first execution result represents whether the communication module to be tested has executed a call ending operation or not, and the second execution result represents whether the target communication module has executed a call ending operation or not;
and determining a test result corresponding to the first test script based on the first execution result and the second execution result.
2. The method of claim 1, wherein after testing the communication module under test based on a plurality of test scripts to obtain test results, the method further comprises:
and determining a target test result based on the test result corresponding to each test script, wherein the test scripts comprise at least one of a first test script and a second test script, the second test script is used for carrying out short message test on the communication module to be tested, and the target test result is used for representing whether the communication module to be tested can normally communicate.
3. The method of claim 2, wherein testing the communication module under test based on the plurality of test scripts to obtain test results corresponding to each test script comprises:
If the test script is a second test script, a fifth instruction is sent to the communication module to be tested, so that the communication module to be tested sends a target short message to a target communication module based on the fifth instruction;
and if the communication module to be tested feeds back the failure of sending the target short message, determining a test result corresponding to the second test script.
4. A method according to claim 3, wherein after sending a fifth instruction to the communication module to be tested, the method further comprises:
if the communication module to be tested feeds back that the target short message is successfully sent, a sixth instruction is sent to the target communication module, so that the target communication module replies the target short message based on the sixth instruction;
acquiring a first recovery result fed back by the communication module to be tested and a second recovery result fed back by the target communication module, wherein the first recovery result represents whether the communication module to be tested receives recovery content of the target communication module or not, and the second recovery result represents whether the target communication module is recovered or not;
and determining a test result corresponding to the second test script based on the first reply result and the second reply result.
5. A test device for a communication module, comprising:
the acquisition module is used for acquiring a plurality of test instructions for testing the communication module to be tested;
the determining module is used for determining a test script corresponding to each test instruction;
the test module is used for testing the communication module to be tested based on a plurality of test scripts to obtain a test result corresponding to each test script, wherein the test result is used for representing whether the communication module to be tested can normally communicate or not;
wherein, the test module still includes:
the first sending module is used for sending a first instruction to the communication module to be tested based on the first test script if the test script is the first test script so that the communication module to be tested sends a call request to the target communication module based on the first instruction, wherein the first test script is used for carrying out call test on the communication module to be tested;
the first generation module is used for generating a test result corresponding to the first test script if the communication module to be tested feeds back that the call request is failed to be sent;
wherein, the testing arrangement of communication module still includes:
The second sending module is used for sending a second instruction to the target communication module based on the first test script if the communication module to be tested feeds back that the call request is sent successfully, so that the target communication module responds to the call request;
the second generation module is used for generating a test result corresponding to the first test script if the feedback response of the target communication module fails to the call request;
wherein, the testing arrangement of communication module still includes:
the third sending module is used for sending a third instruction to the communication module to be tested based on the first test script and sending a fourth instruction to the target communication module based on the first test script if the target communication module feeds back the response to the call request successfully, so that the communication module to be tested executes the call ending operation based on the third instruction, and the target communication module executes the call ending operation based on the fourth instruction;
the first acquisition sub-module is used for acquiring a first execution result fed back by the communication module to be tested and a second execution result fed back by the target communication module, wherein the first execution result represents whether the communication module to be tested has executed a call ending operation or not, and the second execution result represents whether the target communication module has executed a call ending operation or not;
And the second determining submodule is used for determining a test result corresponding to the first test script based on the first execution result and the second execution result.
6. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of testing a communication module according to any of the claims 1 to 4 at run-time.
7. An electronic device, the electronic device comprising one or more processors; a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a method for running a program, wherein the program is configured to perform the method of testing a communication module as claimed in any one of claims 1 to 4 when run.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210922267.0A CN115276844B (en) | 2022-08-02 | 2022-08-02 | Communication module testing method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210922267.0A CN115276844B (en) | 2022-08-02 | 2022-08-02 | Communication module testing method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115276844A CN115276844A (en) | 2022-11-01 |
CN115276844B true CN115276844B (en) | 2023-06-13 |
Family
ID=83747132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210922267.0A Active CN115276844B (en) | 2022-08-02 | 2022-08-02 | Communication module testing method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115276844B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115514680B (en) * | 2022-11-16 | 2023-03-21 | 紫光同芯微电子有限公司 | Method and device for verifying compatibility of module, electronic equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658545A (en) * | 2015-10-30 | 2017-05-10 | 中兴通讯股份有限公司 | Test method, mobile terminal and server |
CN105471680A (en) * | 2015-12-09 | 2016-04-06 | 上海斐讯数据通信技术有限公司 | Network voice communication testing system and method |
CN107122291A (en) * | 2016-02-25 | 2017-09-01 | 北京博酷科技有限公司 | Mobile terminal software stability test method and apparatus |
CN106547687A (en) * | 2016-10-14 | 2017-03-29 | 深圳前海微众银行股份有限公司 | Application testing method, device and system |
CN109144850B (en) * | 2018-07-23 | 2022-02-11 | 上海携程商务有限公司 | Method and system for testing interactive communication of mobile terminal |
CN112486818B (en) * | 2020-11-27 | 2024-06-25 | 合肥移瑞通信技术有限公司 | Testing system and testing method for module function |
CN112328495B (en) * | 2020-11-27 | 2024-04-26 | 上海移远通信技术股份有限公司 | Testing system and testing method for module function |
-
2022
- 2022-08-02 CN CN202210922267.0A patent/CN115276844B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN115276844A (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110262889B (en) | Link tracking method and device | |
CN110427324B (en) | Joint debugging system, joint debugging method, computer equipment and storage medium | |
CN108459850B (en) | Method, device and system for generating test script | |
CN110442502B (en) | Point burying method, device, equipment and storage medium | |
CN111597110B (en) | Page test method and device, electronic equipment and storage medium | |
CN109522181B (en) | Performance test method, device and equipment of distributed storage system | |
CN108287789A (en) | Batch-automated test method, device and electronic equipment | |
CN109041267B (en) | Network connection fault processing method and device and electronic equipment | |
CN115276844B (en) | Communication module testing method and device, storage medium and electronic equipment | |
CN114996103A (en) | Page abnormity detection method and device, electronic equipment and storage medium | |
CN108519935B (en) | Board card testing method and device, readable storage medium and computer equipment | |
CN112199281A (en) | Data processing method and device, terminal equipment and readable storage medium | |
CN110888800A (en) | Service interaction function test method, device, storage medium and test system | |
CN112817883A (en) | Method, device and system for adapting interface platform and computer readable storage medium | |
CN112416735B (en) | Application program detection method and device, terminal equipment and storage medium | |
CN114895879B (en) | Management system design scheme determining method, device, equipment and storage medium | |
CN115118646B (en) | Data interaction method and device for switch test system and electronic equipment | |
CN117499287A (en) | Web testing method, device, storage medium and proxy server | |
CN110704218B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN108845932B (en) | Unit testing method and device of network library, storage medium and terminal | |
CN110221958B (en) | Application testing method, device, computing equipment and computer readable storage medium | |
CN112948195A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN112199229A (en) | Data processing method, device, equipment and storage medium | |
CN112100077B (en) | Transaction testing method and device | |
CN113094290B (en) | Program testing system and method |
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 |