CN114222320A - Method, device, apparatus, storage medium, and program for testing communication device - Google Patents

Method, device, apparatus, storage medium, and program for testing communication device Download PDF

Info

Publication number
CN114222320A
CN114222320A CN202111546331.1A CN202111546331A CN114222320A CN 114222320 A CN114222320 A CN 114222320A CN 202111546331 A CN202111546331 A CN 202111546331A CN 114222320 A CN114222320 A CN 114222320A
Authority
CN
China
Prior art keywords
test
communication
equipment
communication devices
packet
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.)
Pending
Application number
CN202111546331.1A
Other languages
Chinese (zh)
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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202111546331.1A priority Critical patent/CN114222320A/en
Publication of CN114222320A publication Critical patent/CN114222320A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application provides a test method, a test device, equipment, a storage medium and a program of communication equipment, wherein second equipment receives a test task from first equipment, and the test task comprises a test case and configuration information of at least two pieces of communication equipment to be tested; and configuring the at least two communication devices according to the configuration information, testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, and sending the test result to the first device. Through the process, the first equipment can remotely control the second equipment, so that the second equipment can automatically test the wireless communication process between at least two pieces of communication equipment, and the test efficiency is improved.

Description

Method, device, apparatus, storage medium, and program for testing communication device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program for testing a communication device.
Background
With the development of communication technology, more and more electronic devices support bluetooth communication, such as smart phones, bluetooth headsets, bluetooth speakers, and the like. An electronic device supporting a bluetooth communication function is called a bluetooth device.
In order to ensure the stability of bluetooth communication, during the development process of bluetooth devices, the stability of bluetooth communication of bluetooth devices needs to be tested. Typically, the device under test is manually tested in a laboratory by a tester. Thus, it takes much labor and time, and the testing efficiency is low.
Disclosure of Invention
The application provides a test method, a test device, equipment, a storage medium and a program of communication equipment, which are used for improving the test efficiency of the communication equipment.
In a first aspect, the present application provides a method for testing a communication device, including:
receiving a test task from first equipment, wherein the test task comprises a test case and configuration information of at least two communication equipment to be tested, and the at least two communication equipment are in wireless communication;
configuring the at least two communication devices according to the configuration information;
and testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, and sending the test result to the first device.
In a possible implementation manner, the test task further includes packet capture indication information; testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, including:
sending a packet capturing instruction to packet capturing equipment according to the packet capturing indication information, wherein the packet capturing instruction is used for indicating the packet capturing equipment to capture the data packet transmitted between the at least two communication equipment;
and testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case.
In a possible implementation manner, sending a packet capturing instruction to a packet capturing device according to the packet capturing instruction information includes:
sending a scanning request to the packet capturing device according to the packet capturing indication information, wherein the scanning request is used for indicating the packet capturing device to scan communication devices within a preset range so as to obtain identifiers of a plurality of devices to be selected;
receiving the identifiers of the multiple devices to be selected, which are sent by the packet capturing device;
and when determining that the identifiers of the at least two communication devices exist in the identifiers of the multiple devices to be selected, sending the packet capturing instruction to the packet capturing device, wherein the packet capturing instruction comprises the identifiers of the at least two communication devices.
In a possible implementation manner, after sending the packet grabbing command to the packet grabbing device, the method further includes:
receiving a data packet sent by the packet capturing equipment;
and storing the data packet in a storage space corresponding to the test case.
In a possible implementation manner, after the testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, the method further includes:
if the test result indicates that the wireless communication between the at least two communication devices is abnormal, the data packet is sent to the first device;
alternatively, the first and second electrodes may be,
and if the test result indicates that the wireless communication between the at least two communication devices is normal, deleting the data packet in a storage space corresponding to the test case.
In a possible implementation manner, the configuration information includes version information and file information corresponding to the at least two communication devices; configuring the at least two communication devices according to the configuration information, including:
updating the versions of the application programs in the at least two communication devices according to the version information corresponding to the at least two communication devices;
and storing corresponding test files in the at least two communication devices according to file information corresponding to the at least two communication devices, wherein the file information comprises the test files.
In one possible implementation, the method is performed for any one of the at least two communication devices; updating the version of the application program in the communication equipment according to the version information corresponding to the communication equipment, wherein the updating comprises the following steps:
determining an identifier of a first application program and a target version number of the first application program in version information corresponding to the communication equipment;
judging whether the current version number of the first application program in the communication equipment is the same as the target version number;
and if not, updating the first application program in the communication equipment according to the target version number.
In one possible implementation manner, updating the first application program in the communication device according to the target version number includes:
acquiring an update package according to the target version number and the identifier of the first application program;
and sending a version updating instruction to the communication equipment, wherein the version updating instruction comprises the identification of the first application program and the updating package.
In one possible implementation, the method is performed for any one of the at least two communication devices; storing a corresponding test file in the communication equipment according to the file information corresponding to the communication equipment, wherein the method comprises the following steps:
acquiring the test file and a storage path corresponding to the test file in the file information;
and sending the test file and the storage path to the communication equipment so that the communication equipment stores the test file under the storage path.
In a possible implementation, the at least two communication devices communicate with each other via bluetooth or Wi-Fi communication.
In a second aspect, the present application provides a testing apparatus for a communication device, comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a test task from first equipment, the test task comprises a test case and configuration information of at least two communication equipment to be tested, and the at least two communication equipment are in wireless communication;
the configuration processing module is used for configuring the at least two communication devices according to the configuration information;
the test processing module is used for testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case;
and the sending module is used for sending the test result to the first equipment.
In a third aspect, the present application provides an electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program for execution by the at least one processor to implement the method of any of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executable by the at least one processor to implement the method according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the first aspect.
According to the test method, the test device, the test equipment, the storage medium and the program of the communication equipment, the second equipment receives a test task from the first equipment, and the test task comprises a test case and configuration information of at least two pieces of communication equipment to be tested; and configuring the at least two communication devices according to the configuration information, testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, and sending the test result to the first device. Through the process, the first equipment can remotely control the second equipment, so that the second equipment can automatically test the wireless communication process between at least two pieces of communication equipment, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic diagram of a test system of a communication device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a testing method of a communication device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another testing method for a communication device according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a method for testing a communication device according to an embodiment of the present application;
fig. 5 is a schematic diagram illustrating an interaction process between a second device and a packet capturing device according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a method for configuring a communication device by a second device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a testing apparatus of a communication device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. 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.
To facilitate understanding of the technical solutions provided in the present application, an application scenario of the embodiment of the present application is first described with reference to fig. 1.
Fig. 1 is a schematic diagram of a test system of a communication device according to an embodiment of the present disclosure. As shown in fig. 1, the test system 100 provided in this embodiment includes: a first device 10 and a remote subsystem 30. A second device 31 and a communication device to be tested 32 may be included in the remote subsystem 30.
In the embodiment of the present application, the first device 10 is connected to the second device 31. In an example, referring to fig. 1, the test system 100 provided in this embodiment may further include a cloud server 20, and the first device 10 and the second device 31 may further be connected through the cloud server 20 in a communication manner. Thus, the communication between the first device 10 and the second device 31 needs to be forwarded through the cloud server 20. In another example, the first device 10 and the second device 31 may also be connected in direct communication, i.e. without forwarding through the cloud server 20. The first device 10 and the second device 31 may be electronic devices with certain data processing capabilities, including but not limited to: desktop computers, notebook computers, and the like.
With continued reference to fig. 1, the second device 31 is connected to the communication device 32. For example, the second device 31 and the communication device 32 may be connected by a data line or by a wireless connection. Wherein the number of communication devices 32 to which the second device 31 is connected is at least two. Under the control of the second device 31, wireless communication, such as bluetooth communication, Wi-Fi communication, or the like, can be performed between at least two communication devices 32 to which it is connected. The communication device 32 may be a bluetooth device supporting a bluetooth communication function, or a Wi-Fi device supporting a Wi-Fi communication function, or the like.
In this embodiment, the second device 31 may test a wireless communication process between at least two communication devices 32 connected thereto, so as to obtain a test result. For example, the second device 31 may execute a test script written in advance to control wireless communication between at least two communication devices 32, and detect a wireless communication process to obtain a test result. Through the automatic test process, the communication equipment is not required to be manually tested by a tester, so that the test efficiency can be improved.
Further, the first device 10 may be located in the office of a tester. The remote subsystem 30 may be located in a laboratory. The first device 10 may issue a test task to the second device. The second device 31 may perform an automated test on the wireless communication process between the at least two communication devices 32 connected thereto according to the test task, so as to obtain a test result. Further, the second device 31 may send the test result to the first device 10.
Thus, the tester can automatically test the wireless communication process between the communication devices 32 only by operating the first device 10 in the office and issuing a test task to the second device 31 through the first device 10. The test efficiency can be further improved.
In some implementations of embodiments of the present application, as shown in fig. 1, the test system 100 may further include a bale plucking apparatus 33. The bale plucking device 33 is connected to the second device 31. Illustratively, the bale plucking device 33 and the second device 31 may be connected through a data line or through a wireless connection. The test device 32 may capture a data packet transmitted between any two communication devices 32 and upload the data packet to the second device 31 during the process of automatically testing the wireless communication process between the communication devices 32 by the packet capture device 33. The second device 31 stores the data packet.
Therefore, when the test is abnormal, the fault can be positioned by analyzing the data packet captured in the test process, and the fault does not need to be reproduced. The problem of the recurring difficulty of the occasional faults in the stability test is solved.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic flowchart of a method for testing a communication device according to an embodiment of the present disclosure. As shown in fig. 2, the method of an embodiment includes:
s201: the method comprises the steps that a first device sends a test task to a second device, the test task comprises a test case and configuration information of at least two communication devices to be tested, and the at least two communication devices are in wireless communication.
The embodiment of the application can be applied to a test scenario as shown in fig. 1, and can test a wireless communication process between at least two communication devices. Optionally, at least two communication devices communicate with each other via bluetooth or Wi-Fi.
In the embodiment of the present application, the first device may also be referred to as a local device, for example, the first device may be an electronic device in an office of a tester. The second device may also be referred to as a remote device, for example, the second device may be an electronic device of a test person laboratory. The first device may send a test task to the second device to cause the second device to perform the test task. That is to say, in the embodiment of the present application, a tester may remotely control the second device through the first device, so that the second device performs a test task.
The test task comprises a test case and configuration information of at least two communication devices. The number of test cases included in the test task may be one or more. Each test case may correspond to a test script. The configuration information of one communication device is used for configuring the communication device so that the communication device meets the execution condition corresponding to the test case.
S202: and the second equipment configures the at least two communication equipments according to the configuration information.
S203: and the second equipment tests the wireless communication process between the at least two communication equipment according to the test case to obtain a test result corresponding to the test case.
In the embodiment of the application, after receiving the test task sent by the first device, the second device configures at least two communication devices according to the configuration information, so that the at least two communication devices meet the condition of executing the test case. And then, the second device tests the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case.
Each test case may include one or more test steps and an expected result corresponding to each test step. For example, assume that the second device is connected to two communication devices, namely a mobile phone a and a sound box B. A test case may include the contents shown in Table 1:
TABLE 1
Figure BDA0003415873530000081
The second device can control at least two communication devices to carry out wireless communication according to each test step, monitors the wireless communication process to obtain an actual result corresponding to each test step, and determines a test result corresponding to the test case by comparing the actual result with an expected result. Specifically, if the actual result of at least one test step in the test case does not match the expected result, the test result corresponding to the test case is determined to be a failure. And if the actual results of all the test steps in the test case are matched with the expected results, determining that the test result corresponding to the test case is successful.
S204: and the second equipment sends the test result to the first equipment.
And after the second equipment obtains the test result corresponding to the test case, the test result is sent to the first equipment, so that a tester can check the test result corresponding to the test case through the first equipment.
When the test task includes a plurality of test cases, the second device may send the test result corresponding to each test case to the first device in time after obtaining the test result corresponding to the test case. Or, the second device may send the test results corresponding to all the test cases to the first device after all the test cases are executed.
Correspondingly, after receiving the test result corresponding to the test case, the first device may display the test result, or generate a test report according to the test result, and send the test report to the tester through an email. Therefore, the testing personnel can know the testing result in time.
The method for testing the communication equipment provided by the embodiment comprises the following steps: the second equipment receives a test task from the first equipment, wherein the test task comprises a test case and configuration information of at least two communication equipment to be tested; and configuring the at least two communication devices according to the configuration information, testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, and sending the test result to the first device. Through the process, the first equipment can remotely control the second equipment, so that the second equipment can automatically test the wireless communication process between at least two pieces of communication equipment, and the test efficiency is improved.
Fig. 3 is a schematic flowchart of another testing method for a communication device according to an embodiment of the present application. As shown in fig. 3, the method of the present embodiment includes:
s301: the method comprises the following steps that a first device sends a test task and an identification of a second device to a cloud server, wherein the test task comprises the following steps: the test method comprises the steps of testing a case and configuration information of at least two communication devices to be tested, wherein the at least two communication devices are in wireless communication.
Correspondingly, the cloud server receives the test task sent by the first device and the identification of the second device.
S302: and the cloud server sends the test task to the second equipment according to the identifier of the second equipment.
Correspondingly, the second device receives the test task sent by the cloud server.
S303: and the second equipment configures at least two communication equipments according to the configuration information.
S304: and the second equipment tests the wireless communication process between at least two communication equipment according to the test case to obtain a test result corresponding to the test case.
It should be understood that the execution process of the test task by the second device is similar to the embodiment shown in fig. 2, and is not described herein again.
S305: and the second equipment sends the test result to the cloud server.
Correspondingly, the cloud server receives the test result sent by the second device.
S306: and the cloud server sends the test result to the first equipment.
Correspondingly, the first device receives the test result forwarded by the cloud server.
This embodiment is similar to the embodiment shown in fig. 2, except that the interaction process between the first device and the second device needs to be forwarded through the cloud server. The implementation principle and technical effect are similar to those of the embodiment shown in fig. 2, and are not described herein.
The above-mentioned embodiments shown in fig. 2 and fig. 3 mainly describe the control process of the first device to the second device. The execution process of the test task by the second device is described in detail below with reference to the embodiment shown in fig. 4.
Fig. 4 is a flowchart illustrating a method for testing a communication device according to an embodiment of the present application. The method of this embodiment may be performed after the second device receives the test task. As shown in fig. 4, the method of the present embodiment includes:
s401: the second equipment receives a test task from the first equipment, wherein the test task comprises the following steps: the method comprises the steps of packet capturing indication information, test cases and configuration information of at least two communication devices to be tested.
In this embodiment, the specific implementation manner of S401 is similar to that in the above embodiment, and the second device may directly receive the test task from the first device, and the second device may also receive the test task from the first device through the cloud server.
Unlike the embodiments shown in fig. 2 and fig. 3, in this embodiment, the test task may include the packet capture indication information. And the packet capturing indication information is used for indicating that the wireless communication process between at least two communication devices is captured in the execution process of the test task.
S402: and the second equipment configures the at least two communication equipments according to the configuration information.
S403: and the second equipment sends a packet grabbing command to the packet grabbing equipment according to the packet grabbing indication information, wherein the packet grabbing command is used for indicating the packet grabbing equipment to grab the data packets transmitted between the at least two communication equipment.
The packet grabbing process of the embodiment can be realized by a packet grabbing device. After receiving the test task, the second device may send a packet capturing instruction to the packet capturing device according to packet capturing instruction information carried in the test task, so that the packet capturing device captures an air interface data packet transmitted between the at least two communication devices in a process of performing wireless communication between the at least two communication devices.
In this embodiment, the packet capturing device may capture a data packet transmitted within a preset range near the packet capturing device. In some possible test scenarios, a plurality of second devices may be deployed in the laboratory, and each second device is connected with a packet capture tool and at least two communication devices. Taking two second devices as an example, the second device 1 is connected with a packet capturing device 1, a communication device a and a communication device B, and the second device 2 is connected with a packet capturing device 2, a communication device C and a communication device D. When the distances between the communication devices are short, in the process of executing the test task by the second device 1, the data packets captured by the packet capturing device 1 may include both the data packets transmitted between the communication device a and the communication device B and the data packets transmitted between the communication device C and the communication device D. Similarly, during the process of executing the test task by the second device 2, the data packets captured by the packet capturing device 2 may include both the data packets transmitted between the communication device C and the communication device D and the data packets transmitted between the communication device a and the communication device B. Therefore, invalid data packets exist in the data packets captured in the test process, and the subsequent analysis efficiency and accuracy of the data packets are influenced.
In a possible implementation manner, the second device may carry the identifiers of the at least two communication devices in the packet capture instruction. Therefore, the packet capturing device can capture the data packets transmitted between the at least two communication devices according to the packet capturing instruction without capturing the data packets transmitted between other communication devices. And ensuring that the captured data packet is an effective data packet really generated in the test process.
In another possible implementation manner, fig. 5 is a schematic view of an interaction process between the second device and the packet capturing device provided in the embodiment of the present application, and as shown in fig. 5, the second device may control the packet capturing device to capture a packet in the following manner.
S501: and the second equipment sends a scanning request to the packet capturing equipment according to the packet capturing indication information.
The scanning request is used for instructing the packet capturing device to scan the communication devices within the preset range so as to determine which communication devices can capture the data packets.
S502: and the packet capturing device scans the communication devices within the preset range according to the scanning request to obtain the identifiers of the multiple devices to be selected.
The device to be selected is the communication device scanned by the packet capturing device.
S503: and the packet capturing equipment sends the identifiers of the multiple devices to be selected to the second device.
Correspondingly, the second device receives the identifiers of the multiple devices to be selected, which are sent by the packet capturing device.
S504: and if the second equipment determines that the identifiers of the at least two communication equipment exist in the identifiers of the plurality of equipment to be selected, sending a packet capturing instruction to the packet capturing equipment, wherein the packet capturing instruction comprises the identifiers of the at least two communication equipment.
S505: and the packet capturing device captures the data packets transmitted between the at least two communication devices according to the packet capturing instruction.
That is to say, after receiving the packet capturing instruction, the packet capturing device captures the data packet between the at least two communication devices according to the identifiers of the at least two communication devices carried in the packet capturing instruction.
S506: and the packet capturing equipment sends the data packet to the second equipment.
It can be understood that, in the implementation manner shown in fig. 5, the second device sends the packet capturing instruction to the packet capturing device only when determining that the identifiers of at least two communication devices exist in the identifiers of the multiple devices to be selected, which can ensure that, in the process of executing the test task by the second device, the data packets transmitted between the at least two communication devices can be captured by the packet capturing device, and avoid the situation of missing the data packets.
S404: and the second equipment tests the wireless communication process between the at least two communication equipment according to the test case, receives the data packet sent by the packet capturing equipment in the test process and stores the data packet in the storage space corresponding to the test case.
It should be understood that the manner in which the second device tests the wireless communication process between at least two communication devices according to the test case is similar to the embodiment shown in fig. 2 and fig. 3, and is not described herein again.
In this embodiment, in the test process, the packet capturing device may automatically capture the data packet transmitted between the at least two communication devices, and send the captured data packet to the second device. In this way, the second device receives the data packet sent by the packet capturing device, and stores the data packet in the storage space corresponding to the test case. It should be noted that the packet capturing device may send each captured data packet to the second device in real time, or the packet capturing device may send all data packets captured in the execution process of each test case to the second device in a packet packaging manner, which is not limited in this embodiment.
S405: and the second equipment determines a test result corresponding to the test case.
S406: and if the test result indicates that the wireless communication between the at least two communication devices is abnormal, the second device sends the test result to the first device or sends the test result and the data packet.
S407: and if the test result indicates that the wireless communication between the at least two communication devices is normal, the second device sends the test result to the first device, and deletes the data packet in the storage space corresponding to the test case.
Considering that the duration of the stability test is long, the packet capturing device can continuously capture the data packets transmitted between the at least two communication devices in the whole stability test process. With the increase of the test duration, more and more data packets are stored in the second device, and occupy more disk space, thereby affecting the processing performance of the second device.
Therefore, in this embodiment, after the second device determines the test result corresponding to each test case, if the test result indicates that the wireless communication between the at least two communication devices is normal, it indicates that the test result of the test case is a test pass, and the data packet corresponding to the test case is a useless data packet, so that the data packet corresponding to the test case can be deleted to avoid occupying storage resources. If the test result indicates that the wireless communication between the at least two communication devices is abnormal, the test result of the test case is that the test fails, and the data packet corresponding to the test case in the storage space is reserved, so that subsequent testers can analyze the failure reason of the test case conveniently.
In the testing method of the communication device provided in this embodiment, after receiving the testing task, the second device may control the packet capturing device to capture the data packet transmitted between the at least two communication devices in the testing process in real time. Therefore, under the condition that accidental faults occur in the test process, fault location analysis can be carried out through the data packet, a large amount of manpower and time are not needed to be spent for recurrence of the accidental faults, and the problem that the accidental faults are difficult to recur is solved.
On the basis of any of the above embodiments, the following describes in detail a process of configuring the at least two communication devices by the second device with reference to a specific embodiment. This embodiment may be implemented as one possible implementation manner of S202, S303, and S404.
In this embodiment, the configuration information carried by the test task received by the second device includes: and the version information and the file information corresponding to the at least two communication devices.
The version information refers to the version of the application program corresponding to the communication function to be tested of the communication equipment. For example, assume that it is necessary to test the bluetooth communication functions of the communication apparatus a and the communication apparatus B, and for the communication apparatus a, the bluetooth communication function thereof is implemented by the operating system of the communication apparatus a; for the communication device B, its bluetooth communication function is implemented by the application M of the communication device B. The configuration information carried by the test task received by the second device includes: version information of the operating system of communication device a and version information of application M of communication device B.
The file information refers to relevant information of a test file needed by at least two communication devices to be tested in wireless communication in the process of executing the test task. For example, the current test task is to test the bluetooth communication function between the communication device a and the communication device B. During the test, some test files need to be transferred between the communication device a and the communication device B. The configuration information carried by the test task received by the second device further includes: the communication device a needs a test file stored in advance, and the communication device B needs a test file stored in advance.
It can be understood that the configuration information is used to inform the second device of the execution conditions that need to be satisfied by at least two communication devices to be tested before executing the test case. In this way, the second device can configure each communication device so that each communication device satisfies the execution condition according to the configuration information.
Fig. 6 is a flowchart illustrating a method for configuring a communication device by a second device according to an embodiment of the present application. As shown in fig. 6, the method of the present embodiment includes:
s601: and the second equipment updates the versions of the application programs in the at least two communication equipment according to the version information corresponding to the at least two communication equipment.
For any one of the at least two communication devices, the version of the application program thereof may be updated as follows:
(1) the second device determines the identifier of the first application program and the target version number of the first application program in the version information corresponding to the communication device.
The first application program is an application program for realizing a communication function to be tested. For example, assume that the bluetooth communication functions of the communication device a and the communication device B need to be tested. For the communication device a, assuming that the bluetooth communication function is implemented by the operating system, when the communication device a is updated, the first application program is the operating system. For the communication device B, assuming that the bluetooth communication function is implemented by the application M, the first application program is the application M.
(2) And the second equipment judges whether the current version number of the first application program in the communication equipment is the same as the target version number.
For example, since the second device is connected with the communication device, the second device may obtain the current version number of the first application program in the communication device through interaction with the communication device.
(3) And if not, the second equipment updates the first application program in the communication equipment according to the target version number.
For example, the second device may obtain the update package according to the target version number and the identifier of the first application program. And the second equipment sends a version updating instruction to the communication equipment, wherein the version updating instruction comprises the identification of the first application program and the updating package. In this way, after receiving the version update instruction, the communication device updates the first application program to update the version of the first application program to the target version number.
S602: and the second equipment stores corresponding test files in the at least two communication equipment according to file information corresponding to the at least two communication equipment, wherein the file information comprises the test files.
And for any one of the at least two communication devices, the second device stores the corresponding test file in the communication device according to the file information corresponding to the communication device.
Optionally, the file information corresponding to each communication device may include the test file and a storage path of the test file in the communication device. For example, assume that the current testing task is to test the communication between handset a and box B. In the testing process, the mobile phone a needs to be controlled to transmit a preset audio file (i.e., a test file) to the audio B. When the first device issues the test task to the second device, the configuration information carried in the test task needs to include the preset audio file and a storage path of the preset audio file in the mobile phone a. In this way, the second device may send the test file and the storage path to the mobile phone a, so that the mobile phone a stores the test file in the storage path. Therefore, in the subsequent process of executing the test case, the mobile phone A can acquire the preset audio file in the storage path, and the subsequent automatic test can be normally carried out.
In this embodiment, after receiving the test task, the second device configures each communication device according to the configuration information corresponding to each communication device carried in the test task, so that each communication device meets the execution condition corresponding to the test case, thereby ensuring that the subsequent automated test process can be performed normally.
Further, after the second device executes the test task, the communication devices may be controlled to release resources. For example, the version of the application program in the communication device is restored, and the test file is deleted from the communication device. Therefore, the communication equipment can be kept in a clean state, and the subsequent automatic test can be conveniently executed.
Fig. 7 is a schematic structural diagram of a testing apparatus of a communication device according to an embodiment of the present application. The testing device of the communication device provided by the embodiment can be in the form of software and/or hardware. For example, the testing apparatus of the communication device provided in this embodiment may be the second device, or a processor, a chip, a module, or a unit in the second device.
As shown in fig. 7, the testing apparatus 700 of the communication device provided in this embodiment includes: a receiving module 701, a configuration processing module 702, a test processing module 703 and a sending module 704. Wherein the content of the first and second substances,
a receiving module 701, configured to receive a test task from a first device, where the test task includes a test case and configuration information of at least two communication devices to be tested, and the at least two communication devices wirelessly communicate with each other;
a configuration processing module 702, configured to configure the at least two communication devices according to the configuration information;
the test processing module 703 is configured to test a wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case;
a sending module 704, configured to send the test result to the first device.
In a possible implementation manner, the test task further includes packet capture indication information; the test processing module 703 is specifically configured to:
sending a packet capturing instruction to packet capturing equipment according to the packet capturing indication information, wherein the packet capturing instruction is used for indicating the packet capturing equipment to capture the data packet transmitted between the at least two communication equipment;
and testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case.
In a possible implementation manner, the test processing module 703 is specifically configured to:
sending a scanning request to the packet capturing device according to the packet capturing indication information, wherein the scanning request is used for indicating the packet capturing device to scan communication devices within a preset range so as to obtain identifiers of a plurality of devices to be selected;
receiving the identifiers of the multiple devices to be selected, which are sent by the packet capturing device;
and when determining that the identifiers of the at least two communication devices exist in the identifiers of the multiple devices to be selected, sending the packet capturing instruction to the packet capturing device, wherein the packet capturing instruction comprises the identifiers of the at least two communication devices.
In a possible implementation manner, the receiving module 701 is further configured to receive a data packet sent by the packet capturing device;
the test processing module 703 is further configured to store the data packet in a storage space corresponding to the test case.
In a possible implementation manner, the sending module 704 is further configured to send the data packet to the first device if the test result indicates that the wireless communication between the at least two communication devices is abnormal;
alternatively, the first and second electrodes may be,
the test processing module 703 is further configured to delete the data packet in the storage space corresponding to the test case if the test result indicates that the wireless communication between the at least two communication devices is normal.
In a possible implementation manner, the configuration information includes version information and file information corresponding to the at least two communication devices; the configuration processing module 702 is specifically configured to:
updating the versions of the application programs in the at least two communication devices according to the version information corresponding to the at least two communication devices;
and storing corresponding test files in the at least two communication devices according to file information corresponding to the at least two communication devices, wherein the file information comprises the test files.
In one possible implementation, the method is performed for any one of the at least two communication devices; the configuration processing module 702 is specifically configured to:
determining an identifier of a first application program and a target version number of the first application program in version information corresponding to the communication equipment;
judging whether the current version number of the first application program in the communication equipment is the same as the target version number;
and if not, updating the first application program in the communication equipment according to the target version number.
In a possible implementation manner, the configuration processing module 702 is specifically configured to:
acquiring an update package according to the target version number and the identifier of the first application program;
and sending a version updating instruction to the communication equipment, wherein the version updating instruction comprises the identification of the first application program and the updating package.
In one possible implementation, the method is performed for any one of the at least two communication devices; the configuration processing module 702 is specifically configured to:
acquiring the test file and a storage path corresponding to the test file in the file information;
and sending the test file and the storage path to the communication equipment so that the communication equipment stores the test file under the storage path.
In a possible implementation, the at least two communication devices communicate with each other via bluetooth or Wi-Fi communication.
The testing apparatus for communication devices provided in this embodiment may be used to implement the technical solutions provided in any of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device provided by the present embodiment may be used as the second device in the above embodiments. As shown in fig. 8, the electronic device 800 provided in this embodiment includes: at least one processor 801 and a memory 802. The processor 801 and the memory 802 may be connected by a bus 803, for example.
The memory 802 is used to store computer programs;
the at least one processor 801 is configured to execute the computer program stored in the memory, so that the electronic device 800 executes the method for testing a communication device provided in any of the above embodiments, which achieves similar principles and technical effects, and is not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for testing a communication device according to any of the above method embodiments is implemented, and the implementation principle and the technical effect of the method are similar, and are not described herein again.
An embodiment of the present application further provides a chip, including: the memory stores a computer program, and the processor runs the computer program to implement the method for testing the communication device according to any one of the above method embodiments, which is similar in implementation principle and technical effect and is not described herein again.
The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for testing a communication device according to any of the above method embodiments is implemented, and the implementation principle and the technical effect are similar, which are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in the incorporated application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (14)

1. A method for testing a communication device, comprising:
receiving a test task from first equipment, wherein the test task comprises a test case and configuration information of at least two communication equipment to be tested, and the at least two communication equipment are in wireless communication;
configuring the at least two communication devices according to the configuration information;
and testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, and sending the test result to the first device.
2. The method according to claim 1, wherein the test task further comprises packet capture indication information; testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case, including:
sending a packet capturing instruction to packet capturing equipment according to the packet capturing indication information, wherein the packet capturing instruction is used for indicating the packet capturing equipment to capture the data packet transmitted between the at least two communication equipment;
and testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case.
3. The method according to claim 2, wherein sending a packet grabbing command to a packet grabbing device according to the packet grabbing indication information comprises:
sending a scanning request to the packet capturing device according to the packet capturing indication information, wherein the scanning request is used for indicating the packet capturing device to scan communication devices within a preset range so as to obtain identifiers of a plurality of devices to be selected;
receiving the identifiers of the multiple devices to be selected, which are sent by the packet capturing device;
and when determining that the identifiers of the at least two communication devices exist in the identifiers of the multiple devices to be selected, sending the packet capturing instruction to the packet capturing device, wherein the packet capturing instruction comprises the identifiers of the at least two communication devices.
4. The method according to claim 2 or 3, wherein after sending the packet grabbing command to the packet grabbing device, the method further comprises:
receiving a data packet sent by the packet capturing equipment;
and storing the data packet in a storage space corresponding to the test case.
5. The method according to claim 4, wherein after testing the wireless communication process between the at least two communication devices according to the test case and obtaining a test result corresponding to the test case, the method further comprises:
if the test result indicates that the wireless communication between the at least two communication devices is abnormal, the data packet is sent to the first device;
alternatively, the first and second electrodes may be,
and if the test result indicates that the wireless communication between the at least two communication devices is normal, deleting the data packet in a storage space corresponding to the test case.
6. The method according to any one of claims 1 to 5, wherein the configuration information includes version information and file information corresponding to the at least two communication devices; configuring the at least two communication devices according to the configuration information, including:
updating the versions of the application programs in the at least two communication devices according to the version information corresponding to the at least two communication devices;
and storing corresponding test files in the at least two communication devices according to file information corresponding to the at least two communication devices, wherein the file information comprises the test files.
7. The method of claim 6, wherein for any one of the at least two communication devices; updating the version of the application program in the communication equipment according to the version information corresponding to the communication equipment, wherein the updating comprises the following steps:
determining an identifier of a first application program and a target version number of the first application program in version information corresponding to the communication equipment;
judging whether the current version number of the first application program in the communication equipment is the same as the target version number;
and if not, updating the first application program in the communication equipment according to the target version number.
8. The method of claim 7, wherein updating the first application in the communication device according to the target version number comprises:
acquiring an update package according to the target version number and the identifier of the first application program;
and sending a version updating instruction to the communication equipment, wherein the version updating instruction comprises the identification of the first application program and the updating package.
9. The method according to any of claims 6 to 8, characterized by, for any of said at least two communication devices; storing a corresponding test file in the communication equipment according to the file information corresponding to the communication equipment, wherein the method comprises the following steps:
acquiring the test file and a storage path corresponding to the test file in the file information;
and sending the test file and the storage path to the communication equipment so that the communication equipment stores the test file under the storage path.
10. The method according to any one of claims 1 to 9, wherein the at least two communication devices communicate with each other via bluetooth or Wi-Fi communication.
11. A test apparatus for a communication device, comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a test task from first equipment, the test task comprises a test case and configuration information of at least two communication equipment to be tested, and the at least two communication equipment are in wireless communication;
the configuration processing module is used for configuring the at least two communication devices according to the configuration information;
the test processing module is used for testing the wireless communication process between the at least two communication devices according to the test case to obtain a test result corresponding to the test case;
and the sending module is used for sending the test result to the first equipment.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program for execution by the at least one processor to implement the method of any one of claims 1 to 10.
13. A computer-readable storage medium, in which a computer program is stored which, when being executed by at least one processor, is adapted to carry out the method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program which, when executed by a processor, carries out the method of any one of claims 1 to 10.
CN202111546331.1A 2021-12-16 2021-12-16 Method, device, apparatus, storage medium, and program for testing communication device Pending CN114222320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111546331.1A CN114222320A (en) 2021-12-16 2021-12-16 Method, device, apparatus, storage medium, and program for testing communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111546331.1A CN114222320A (en) 2021-12-16 2021-12-16 Method, device, apparatus, storage medium, and program for testing communication device

Publications (1)

Publication Number Publication Date
CN114222320A true CN114222320A (en) 2022-03-22

Family

ID=80703211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111546331.1A Pending CN114222320A (en) 2021-12-16 2021-12-16 Method, device, apparatus, storage medium, and program for testing communication device

Country Status (1)

Country Link
CN (1) CN114222320A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840672A (en) * 2023-02-22 2023-03-24 江苏华存电子科技有限公司 Method for determining position of multi-PCI/PCIE storage device on mainboard based on windows system
CN116708632A (en) * 2022-09-22 2023-09-05 荣耀终端有限公司 Test method and electronic equipment
CN117240552A (en) * 2023-09-19 2023-12-15 中国人民解放军32039部队 Cross-field data transmission automatic verification method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495870A (en) * 2018-07-24 2019-03-19 华为机器有限公司 The method and apparatus of bluetooth test
CN111371638A (en) * 2020-02-18 2020-07-03 深圳市晨北科技有限公司 Intelligent equipment testing method and device, server and storage medium
CN112486753A (en) * 2020-12-18 2021-03-12 展讯半导体(成都)有限公司 WiFi equipment automatic test method and system and readable storage medium
CN112822073A (en) * 2020-12-30 2021-05-18 广东乐心医疗电子股份有限公司 Test method, device, system, electronic equipment and readable storage medium
CN112996020A (en) * 2021-03-30 2021-06-18 深圳市优必选科技股份有限公司 Bluetooth-based automatic testing method and device and Bluetooth testing terminal
CN113742236A (en) * 2021-09-13 2021-12-03 展讯半导体(成都)有限公司 Test configuration method, electronic device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495870A (en) * 2018-07-24 2019-03-19 华为机器有限公司 The method and apparatus of bluetooth test
CN111371638A (en) * 2020-02-18 2020-07-03 深圳市晨北科技有限公司 Intelligent equipment testing method and device, server and storage medium
CN112486753A (en) * 2020-12-18 2021-03-12 展讯半导体(成都)有限公司 WiFi equipment automatic test method and system and readable storage medium
CN112822073A (en) * 2020-12-30 2021-05-18 广东乐心医疗电子股份有限公司 Test method, device, system, electronic equipment and readable storage medium
CN112996020A (en) * 2021-03-30 2021-06-18 深圳市优必选科技股份有限公司 Bluetooth-based automatic testing method and device and Bluetooth testing terminal
CN113742236A (en) * 2021-09-13 2021-12-03 展讯半导体(成都)有限公司 Test configuration method, electronic device and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708632A (en) * 2022-09-22 2023-09-05 荣耀终端有限公司 Test method and electronic equipment
CN116708632B (en) * 2022-09-22 2024-04-05 荣耀终端有限公司 Test method and electronic equipment
CN115840672A (en) * 2023-02-22 2023-03-24 江苏华存电子科技有限公司 Method for determining position of multi-PCI/PCIE storage device on mainboard based on windows system
CN117240552A (en) * 2023-09-19 2023-12-15 中国人民解放军32039部队 Cross-field data transmission automatic verification method and device
CN117240552B (en) * 2023-09-19 2024-06-11 中国人民解放军32039部队 Cross-field data transfer automatic verification method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN114222320A (en) Method, device, apparatus, storage medium, and program for testing communication device
US11652918B2 (en) Using automatically collected device problem information to route and guide users' requests
US11507450B2 (en) Systems and methods to reprogram mobile devices via a cross-matrix controller to port connection
CN109683997B (en) Method for accessing application program interface through sandbox, sandbox and sandbox equipment
CN108519935B (en) Board card testing method and device, readable storage medium and computer equipment
CN110618853B (en) Detection method, device and equipment for zombie container
CN109600257B (en) Tool deployment method, device and storage medium
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN114500348B (en) CDN gateway testing method and system
US9294865B2 (en) Enhanced system and method for custom programming of large groups of phones without requiring additional equipment
US10405223B1 (en) System and methods for intelligent reset delay for cell sites in a network
CN112596750B (en) Application testing method and device, electronic equipment and computer readable storage medium
CN102053862B (en) Method and device for inspecting material files in instant messenger
CN104679625A (en) Computer system and method for testing computer system
CN113282516A (en) Method and device for processing test case result
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN107634851B (en) Method for dynamically configuring server by mobile terminal
CN104850551A (en) Data processing method, data processing apparatus and mobile terminal
CN112749078A (en) Buried point testing method and device
US20110246827A1 (en) Testing Device and Testing Method
CN107438259B (en) Method for positioning network management system performance module fault
US11836063B2 (en) System, control device, log extraction method, and computer-readable medium
CN116156051A (en) Call testing method, device, electronic equipment and storage medium
CN115129580A (en) Application program test data acquisition method and device, electronic equipment and storage medium
CN115622911A (en) Performance test method of network security detection equipment

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