CN112925713B - Service testing method, device, system, storage medium and computer equipment - Google Patents

Service testing method, device, system, storage medium and computer equipment Download PDF

Info

Publication number
CN112925713B
CN112925713B CN202110234947.9A CN202110234947A CN112925713B CN 112925713 B CN112925713 B CN 112925713B CN 202110234947 A CN202110234947 A CN 202110234947A CN 112925713 B CN112925713 B CN 112925713B
Authority
CN
China
Prior art keywords
user equipment
server
target
target message
test
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
Application number
CN202110234947.9A
Other languages
Chinese (zh)
Other versions
CN112925713A (en
Inventor
李胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Tianjin Co Ltd
Original Assignee
Spreadtrum Communications Tianjin 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 Tianjin Co Ltd filed Critical Spreadtrum Communications Tianjin Co Ltd
Priority to CN202110234947.9A priority Critical patent/CN112925713B/en
Publication of CN112925713A publication Critical patent/CN112925713A/en
Application granted granted Critical
Publication of CN112925713B publication Critical patent/CN112925713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides a service testing method, a service testing device, a service testing system, a storage medium and computer equipment. In the technical scheme provided by the embodiment of the invention, a target topic is subscribed to a server, so that the server pushes a target message corresponding to the target topic to at least one piece of user equipment; judging whether the target message is received or not; if the target message is judged to be received, executing business operation corresponding to the target message according to the target message; and after the service operation is finished, sending the generated test result to the server. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.

Description

Service test method, device, system, storage medium and computer equipment
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, a storage medium, and a computer device for testing a service.
[ background of the invention ]
When testing a plurality of User Equipments (UEs), dozens or even hundreds of UEs are required to initiate services at the same time, which is very demanding on the start-up time, and generally all UEs need to initiate services within several seconds. The existing test scheme is mainly started by manual starting and starting in a script according to system time.
However, the time difference of service initiation by a plurality of user equipment is too large to achieve the test effect by manually starting the task; the tasks are started according to the system time in the scripts, so that the test is invalid due to inconsistent system time of different user equipment, the time for starting the tasks each time is not fixed, the starting time of each script needs to be manually modified, and great inconvenience is brought.
Therefore, the prior art can test a plurality of user equipments with inconsistent time and inconvenient operation.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a service testing method, apparatus, system, storage medium, and computer device, which can simultaneously push messages to all user devices, and start a task immediately after the user devices receive the messages, thereby avoiding the problems of inconsistent time and inconvenient operation in testing a plurality of user devices in the prior art.
In a first aspect, an embodiment of the present invention provides a service testing method, where the method includes:
subscribing a target topic to a server so that the server pushes a target message corresponding to the target topic to at least one user device;
judging whether the target message is received or not;
if the target message is judged to be received, executing business operation corresponding to the target message according to the target message;
and after the service operation is finished, sending the generated test result to the server.
Optionally, before subscribing to the target topic from the server, the method further includes:
setting a prefabricating condition for the user equipment;
and establishing connection with the server according to the preset condition setting.
Optionally, the performing the preset condition setting on the user equipment specifically includes:
opening automatic mounting, locking frequency points, successfully residing in the network again and activating the PDP.
Optionally, the server comprises an MQTT server.
Optionally, the test result includes a receiving time of receiving the target message, an opening time of the service operation, a completion time of the service operation, and a service test result of the service operation.
In a second aspect, an embodiment of the present invention provides a service testing method, where the method includes:
according to a target theme subscribed by at least one user equipment to be tested, pushing a target message corresponding to the target theme to the user equipment so that the user equipment executes a service operation corresponding to the target message according to the target message, and generating a test result after the service operation is completed;
judging whether test results sent by all the user equipment are received;
if the test results sent by all the user equipment are judged to be received, whether the test ending condition is met is judged;
and if the test ending condition is judged to be reached, the test is finished.
Optionally, before pushing, to the user equipment, a target message corresponding to the target topic according to a target topic subscribed to the server by at least one user equipment to be tested, the method further includes:
and establishing connection with the user equipment.
Optionally, if it is determined that the test results sent by all the user equipment are received, after determining whether a test end condition is met, the method further includes:
and if the condition that the test is not finished is judged, continuing to execute the step of pushing a target message corresponding to the target theme to the user equipment according to the target theme subscribed by the at least one user equipment to be tested to the server.
Optionally, the test end condition includes:
when the test times are equal to the preset times, the test is finished; or when the test time is equal to the preset time, the test is finished.
Optionally, the server comprises an MQTT server.
Optionally, the test result includes a receiving time when the user equipment receives the target message, an opening time of the service operation, a completion time of the service operation, and a service test result of the service operation.
In a third aspect, an embodiment of the present invention provides a service testing apparatus, where the apparatus includes:
the subscription module is used for subscribing a target topic to a server so as to enable the server to push a target message corresponding to the target topic to at least one user device;
the first judgment module is used for judging whether the target message is received or not;
the service execution module is used for executing service operation corresponding to the target message according to the target message if the first judgment module judges that the target message is received;
and the first transceiver module is used for sending the generated test result to the server after the service operation is finished.
In a fourth aspect, an embodiment of the present invention provides a service testing apparatus, where the apparatus includes:
the second transceiving module is used for pushing a target message corresponding to a target theme to the user equipment according to the target theme subscribed by at least one user equipment to be tested so that the user equipment executes service operation corresponding to the target message according to the target message and generates a test result after the service operation is finished;
the second judgment module is used for judging whether the test results sent by all the user equipment are received or not;
a third judging module, configured to judge whether a test end condition is met if the second judging module judges that the test results sent by all the user equipment are received;
the third judging module is further configured to complete the test if the third judging module judges that the test end condition is met.
In a fifth aspect, an embodiment of the present invention provides a service testing system, where the system includes: a server and at least one user equipment;
the user equipment is used for subscribing a target theme to the server; judging whether a target message which is sent by the server and corresponds to the target theme is received or not; if the target message which is pushed by the server and corresponds to the target subject is judged to be received, executing business operation corresponding to the target message according to the target message; after the business operation is completed, sending the generated test result to the server;
the server is used for pushing a target message corresponding to a target topic to the user equipment according to the target topic subscribed by at least one user equipment; judging whether test results sent by all the user equipment are received; if the test results sent by all the user equipment are judged to be received, whether the test ending condition is met is judged; and if the test ending condition is judged to be reached, the test is finished.
In a sixth aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device on which the storage medium is located is controlled to execute the service testing method according to the first aspect.
In a seventh aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device on which the storage medium is located is controlled to execute the service testing method according to the second aspect.
In an eighth aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory is used to store information including program instructions, and the processor is used to control execution of the program instructions, where the program instructions are loaded by the processor and executed to implement the steps of the service testing method according to the first aspect.
In a ninth aspect, an embodiment of the present invention provides a server, including a memory and a processor, where the memory is used for storing information including program instructions, and the processor is used for controlling execution of the program instructions, where the program instructions are loaded by the processor and executed to implement the steps of the service testing method according to the second aspect.
In the technical scheme of the service testing method, the device, the system, the storage medium and the computer equipment provided by the embodiment of the invention, a target theme is subscribed to a server, so that the server pushes a target message corresponding to the target theme to at least one piece of user equipment; judging whether the target message is received or not; if the target message is judged to be received, executing business operation corresponding to the target message according to the target message; and after the service operation is finished, sending the generated test result to the server. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a service testing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a service testing method according to another embodiment of the present invention;
fig. 3 is a flowchart of a service testing method according to another embodiment of the present invention;
fig. 4 is a flowchart of a service testing method according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a service testing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a service testing apparatus according to another embodiment of the present invention;
fig. 7 is a schematic structural diagram of a service testing system according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a computer device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a server according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all 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 invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the description of the invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a flowchart of a service testing method according to an embodiment of the present invention, which is applied to a user equipment, and as shown in fig. 1, the method includes:
step 101, subscribing a target topic to a server, so that the server pushes a target message corresponding to the target topic to at least one user equipment.
Step 102, judging whether a target message is received.
And 103, if the target message is judged to be received, executing the business operation corresponding to the target message according to the target message.
And step 104, after the business operation is finished, sending the generated test result to a server.
In the technical scheme of the service testing method provided by the embodiment of the invention, a target theme is subscribed to a server, so that the server pushes a target message corresponding to the target theme to at least one user equipment; judging whether a target message is received or not; if the target message is judged to be received, executing business operation corresponding to the target message according to the target message; and after the business operation is finished, sending the generated test result to the server. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.
Fig. 2 is a flowchart of a service testing method according to another embodiment of the present invention, which is applied to a user equipment, and as shown in fig. 2, the method includes:
step 201, setting the preset condition for the user equipment.
In the embodiment of the present invention, step 201 specifically includes: opening automatic mounting, locking frequency points, successfully re-establishing the network and activating a Packet Data Protocol (PDP).
It should be noted that before the preset condition is set for the user equipment, the Python script of each user equipment needs to be controlled to start running.
Step 202, establishing connection with the server according to the preset condition setting.
In the embodiment of the present invention, the server includes a Message Queue Telemetry Transport (MQTT) server.
Specifically, a plurality of user equipment and an MQTT server establish wireless network connection.
Step 203, subscribing the target topic to the server, so that the server pushes the target message corresponding to the target topic to at least one user equipment.
In the embodiment of the invention, the server simultaneously pushes the target message to all the user equipment by using the MQTT protocol subscription push function, and the user equipment initiates the service at the same time according to the received target message.
Step 204, judging whether a target message is received, if so, executing step 205; if not, go to step 204.
In the embodiment of the invention, if the user equipment does not receive the target message pushed by the server, whether the target message is received or not is continuously judged so as to wait for the server to push the target message.
And step 205, executing the business operation corresponding to the target message according to the target message.
In the embodiment of the invention, if the user equipment receives the target message pushed by the server at the same time, all the user equipment simultaneously initiates the service. Therefore, the embodiment of the invention does not need to pay attention to the time difference problem of single user equipment and scripts, is controlled by one server, simultaneously pushes the target message to all the user equipment, and immediately starts the task after the user equipment receives the target message, thereby avoiding the problems of inconsistency in time and inconvenient operation.
For example, the business operation includes File Transfer Protocol (FTP) download or HyperText Transfer Protocol (HTTP) access.
And step 206, after the business operation is finished, sending the generated test result to a server.
In the embodiment of the invention, the test result comprises the receiving time of the received target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
According to the embodiment of the invention, the target message is uniformly pushed by the MQTT server, so that all user equipment can simultaneously carry out multi-UE testing, the possibility of complex manual operation or error is saved, and uniform management is facilitated.
In the technical scheme of the service testing method provided by the embodiment of the invention, a target theme is subscribed to a server, so that the server pushes a target message corresponding to the target theme to at least one user equipment; judging whether a target message is received or not; if the target message is judged to be received, executing business operation corresponding to the target message according to the target message; and after the business operation is finished, sending the generated test result to the server. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation in the prior art for testing a plurality of user equipment.
Fig. 3 is a flowchart of a service testing method according to another embodiment of the present invention, applied to a server, as shown in fig. 3, the method includes:
step 301, pushing a target message corresponding to a target topic to the user equipment according to the target topic subscribed by at least one user equipment to be tested, so that the user equipment executes a service operation corresponding to the target message according to the target message, and generating a test result after the service operation is completed.
Step 302, judging whether the test results sent by all the user equipment are received.
Step 303, if it is determined that the test results sent by all the user equipments are received, determining whether a test end condition is met.
And step 304, if the test ending condition is judged to be reached, the test is finished.
In the technical scheme of the service testing method provided in the embodiment of the present invention, according to a target topic subscribed by at least one user equipment to be tested, a target message corresponding to the target topic is pushed to the user equipment, so that the user equipment executes a service operation corresponding to the target message according to the target message, generates a test result after the service operation is completed, determines whether test results sent by all the user equipment are received, and if it is determined that the test results sent by all the user equipment are received, determines whether a test completion condition is reached, and if it is determined that the test completion condition is reached, completes the test. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.
Fig. 4 is a flowchart of a service testing method according to another embodiment of the present invention, applied to a server, as shown in fig. 3, the method includes:
step 401, establishing a connection with a user equipment.
In the embodiment of the invention, the server comprises an MQTT server.
Specifically, one server simultaneously establishes wireless network connections with a plurality of user equipments.
Step 402, according to a target topic subscribed by at least one user equipment to be tested, pushing a target message corresponding to the target topic to the user equipment, so that the user equipment executes a service operation corresponding to the target message according to the target message, and generating a test result after the service operation is completed.
The server simultaneously pushes the target message to at least one user device, and the user device simultaneously receives the target message and simultaneously starts service operation. And after the service operation is finished, each user equipment generates a corresponding test result.
In the embodiment of the invention, the test result comprises the receiving time of the user equipment receiving the target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
Step 403, judging whether test results sent by all user equipment are received, if so, executing step 404; if not, go to step 403.
In the embodiment of the invention, if the test results sent by all the user equipment are not received, the server continuously judges whether the test results sent by all the user equipment are received or not so as to wait for all the user equipment to send the test results to the server.
Step 404, judging whether a test ending condition is reached, if so, executing step 405; if not, go to step 402.
In the embodiment of the present invention, the number of times of testing or the testing time may be used as the test termination condition. The test end conditions include: when the test times are equal to the preset times, the test is finished; and when the test times are less than the preset times, continuing the test. Or when the test time is equal to the preset time, the test is finished; and when the testing time is less than the preset time, continuing the test.
And step 405, completing the test.
In the embodiment of the invention, the server simultaneously pushes the target message to all the user equipment by using the MQTT protocol subscription push function, and the user equipment initiates the service at the same time according to the received target message. Therefore, the embodiment of the invention does not need to pay attention to the time difference problem of single user equipment and scripts, is controlled by one server, simultaneously pushes the target message to all the user equipment, and immediately starts the task after the user equipment receives the target message, thereby avoiding the problems of inconsistency in time and inconvenient operation. The embodiment of the invention can simultaneously carry out multi-UE test by all user equipment by uniformly pushing the target message through the MQTT server, thereby saving the possibility of complicated manual operation or error and facilitating uniform management.
In the technical scheme of the service testing method provided by the embodiment of the invention, according to a target theme subscribed by at least one user equipment to be tested, a target message corresponding to the target theme is pushed to the user equipment, so that the user equipment executes service operation corresponding to the target message according to the target message, generates a test result after the service operation is completed, judges whether the test results sent by all the user equipment are received, judges whether a test end condition is reached if the test results sent by all the user equipment are judged to be received, and finishes the test if the test end condition is judged to be reached. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.
Fig. 5 is a schematic structural diagram of a service testing apparatus according to an embodiment of the present invention, which is applied to a user equipment, and as shown in fig. 5, the apparatus includes: the system comprises a setting module 51, a first connecting module 52, a subscription module 53, a first judging module 54, a service executing module 55 and a first transceiving module 56.
And the setting module 51 is used for setting the prefabrication conditions of the user equipment.
In the embodiment of the present invention, the setting module 51 is specifically configured to open an automatic mount, lock a frequency point, successfully resume a network, and activate a PDP.
And a first connection module 52, configured to establish a connection with the server according to the preset condition setting.
And the subscribing module 53 is configured to subscribe the target topic to the server, so that the server pushes the target message corresponding to the target topic to at least one user equipment.
In the embodiment of the invention, the server comprises an MQTT server.
A first judging module 54, configured to judge whether the target message is received.
And a service executing module 55, configured to execute a service operation corresponding to the target message according to the target message if the first determining module 54 determines that the target message is received.
The first determining module 54 is further configured to, if the first determining module 54 determines that the target message is not received, continue to perform an operation of determining whether the target message is received.
And the first transceiver module 56 is configured to send the generated test result to the server after the service operation is completed.
In the embodiment of the invention, the test result comprises the receiving time of the received target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
The service testing apparatus provided in the embodiment of the present invention may be used to implement the service testing method in fig. 1 to fig. 2, and for specific description, reference may be made to the embodiment of the service testing method, and a description thereof is not repeated here.
The service test device may be, for example: a chip, a chip module or a part of a chip module.
In the technical scheme of the service testing device provided by the embodiment of the invention, a target theme is subscribed to a server, so that the server pushes a target message corresponding to the target theme to at least one user equipment; judging whether a target message is received or not; if the target message is judged to be received, executing business operation corresponding to the target message according to the target message; and after the business operation is finished, sending the generated test result to the server. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation when testing a plurality of user equipment in the prior art.
Fig. 6 is a schematic structural diagram of a service testing apparatus according to an embodiment of the present invention, which is applied to a server, and as shown in fig. 6, the apparatus includes: a second connection module 61, a second transceiver module 62, a second judgment module 63 and a third judgment module 64.
And a second connection module 61, configured to establish a connection with the user equipment.
In the embodiment of the invention, the server comprises an MQTT server.
The second transceiver module 62 is configured to push a target message corresponding to a target topic to the user equipment according to the target topic subscribed by at least one user equipment to be tested, so that the user equipment executes a service operation corresponding to the target message according to the target message, and generates a test result after the service operation is completed.
In the embodiment of the invention, the test result comprises the receiving time of the user equipment receiving the target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
And a second judging module 63, configured to judge whether the test results sent by all the ue are received.
A third determining module 64, configured to determine whether a test end condition is met if the second determining module 63 determines that the test results sent by all the user equipment are received.
In the embodiment of the present invention, the test termination condition includes: when the test times are equal to the preset times, the test is finished; or when the test time is equal to the preset time, the test is finished.
The second determining module 63 is further configured to, if the second determining module 63 determines that the test results sent by all the user equipments are not received, continue to perform an operation of determining whether the test results sent by all the user equipments are received.
The third determining module 64 is further configured to complete the test if the third determining module 64 determines that the test ending condition is met.
The third determining module 64 is further configured to, if the third determining module 64 determines that the test end condition is not met, continue to execute an operation of pushing a target message corresponding to a target topic to the user equipment according to the target topic subscribed by at least one user equipment to be tested.
The service testing apparatus provided in the embodiment of the present invention may be used to implement the service testing method in fig. 3 to fig. 4, and for specific description, reference may be made to the embodiment of the service testing method, and a description thereof is not repeated here.
The service test device may be, for example: a chip, a chip module, or a portion of a chip module.
In the technical scheme of the service testing apparatus provided in the embodiment of the present invention, according to a target topic subscribed by at least one user equipment to be tested, a target message corresponding to the target topic is pushed to the user equipment, so that the user equipment executes a service operation corresponding to the target message according to the target message, generates a test result after the service operation is completed, determines whether the test results sent by all the user equipments are received, determines whether a test end condition is reached if it is determined that the test results sent by all the user equipments are received, and completes the test if it is determined that the test end condition is reached. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation in the prior art for testing a plurality of user equipment.
Each of the apparatuses and products described above in the embodiments of fig. 5 to 6 includes a module/unit, which may be a software module/unit, a hardware module/unit, or a part of the software module/unit and a part of the hardware module/unit. For example, for each device or product of an application or integrated chip, each module/unit included in the device or product may be implemented by hardware such as a circuit, or at least a part of the modules/units may be implemented by a software program, which runs on an integrated processor inside the chip, and the remaining (if any) part of the modules/units may be implemented by hardware such as a circuit; for each device and product corresponding to or integrating a chip module, each module/unit included in the device and product may be implemented by using hardware such as a circuit, different modules/units may be located in the same piece (for example, a chip, a circuit module, etc.) or different components of the chip module, and at least part of/unit may be implemented by using a software program, where the software program runs on the remaining (if any) part of the modules/units of an integrated processor inside the chip module and may be implemented by using hardware such as a circuit; for each device or product corresponding to or integrating the terminal, the modules/units included in the terminal may all be implemented by using hardware such as circuits, different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components in the terminal, or at least part of the modules/units may be implemented by using a software program, where the program runs on a processor integrated in the terminal, and the remaining (if any) sub-modules/units may be implemented by using hardware such as circuits.
Fig. 7 is a schematic structural diagram of a service testing system according to an embodiment of the present invention, and as shown in fig. 7, the system includes: a server 71 and at least one user device 72.
The server 71 is configured to push, to the user equipment 72, a target message corresponding to a target topic according to the target topic subscribed by at least one user equipment 72; judging whether the test results sent by all the user equipment 72 are received; if the test results sent by all the user equipment 72 are judged to be received, whether the test ending condition is met is judged; and if the test ending condition is judged to be reached, the test is finished.
In the embodiment of the present invention, the server 71 includes an MQTT server.
In the embodiment of the invention, the test result comprises the receiving time of the received target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
In the embodiment of the present invention, the server 71 is further configured to establish a connection with the user equipment 72.
In this embodiment of the present invention, the server 71 is further configured to, if it is determined that the test results sent by all the user equipment 72 are not received, continue to perform an operation of determining whether the test results sent by all the user equipment 72 are received.
In the embodiment of the present invention, the test termination condition includes: when the test times are equal to the preset times, the test is finished; or when the test time is equal to the preset time, the test is finished.
In this embodiment of the present invention, the server 71 is further configured to, if it is determined that the test end condition is not met, continue to perform an operation of pushing, to the user equipment 72, a target message corresponding to a target topic according to the target topic subscribed to the server 71 by at least one user equipment 72 to be tested.
A user device 72 for subscribing to a target topic from the server; judging whether a target message which is sent by the server 71 and corresponds to a target theme is received or not; if the target message which is pushed by the server 71 and corresponds to the target theme is judged to be received, executing the business operation corresponding to the target message according to the target message; after the business operation is completed, the generated test result is sent to the server 71.
In this embodiment of the present invention, the user equipment 72 is further configured to perform preset condition setting on the user equipment 72; a connection is established with the server 71 according to the pre-condition settings.
In this embodiment of the present invention, the user equipment 72 is further configured to, if it is determined that the target message corresponding to the target topic and pushed by the server 71 is not received, continue to perform an operation of determining whether the target message corresponding to the target topic and sent by the server 71 is received.
The service testing system provided in the embodiment of the present invention may be used to implement the service testing method in fig. 1 to fig. 4, and for specific description, reference may be made to the embodiment of the service testing method, and a description thereof is not repeated here.
In the technical scheme of the service test system provided by the embodiment of the invention, user equipment subscribes a target theme to a server, judges whether a target message which is sent by the server and corresponds to the target theme is received, executes service operation corresponding to the target message according to the target message if the target message which is pushed by the server and corresponds to the target theme is judged to be received, and sends a generated test result to the server after the service operation is finished; the server pushes a target message corresponding to a target theme to the user equipment according to the target theme subscribed by the at least one user equipment, judges whether test results sent by all the user equipment are received, judges whether a test finishing condition is met if the test results sent by all the user equipment are received, and finishes the test if the test finishing condition is met. The embodiment of the invention can simultaneously push the message to all the user equipment, and the user equipment starts the task immediately after receiving the message, thereby avoiding the problems of inconsistent time and inconvenient operation in the prior art for testing a plurality of user equipment.
Fig. 8 is a schematic diagram of a computer device according to an embodiment of the present invention. As shown in fig. 8, the computer device 20 of this embodiment includes: the processor 21, the memory 22, and the computer program 23 stored in the memory 22 and capable of running on the processor 21, where the computer program 23 is executed by the processor 21 to implement the service testing method applied in the embodiment, and in order to avoid repetition, details are not repeated herein. Alternatively, the computer program is executed by the processor 21 to implement the functions of each model/unit applied in the service test apparatus in the embodiment, which are not described herein again to avoid repetition.
The computer device 20 includes, but is not limited to, a processor 21, a memory 22. Those skilled in the art will appreciate that fig. 8 is merely an example of a computer device 20 and is not intended to limit the computer device 20 and that it may include more or fewer components than shown, or some of the components may be combined, or different components, e.g., the computer device may also include input output devices, network access devices, buses, etc.
The Processor 21 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 22 may be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20. The memory 22 may also be an external storage device of the computer device 20, such as a plug-in hard disk provided on the computer device 20, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 22 may also include both internal storage units of the computer device 20 and external storage devices. The memory 22 is used for storing computer programs and other programs and data required by the computer device. The memory 22 may also be used to temporarily store data that has been output or is to be output.
Fig. 9 is a schematic diagram of a server according to an embodiment of the present invention. As shown in fig. 9, the server 30 of this embodiment includes: the processor 31, the memory 32, and the computer program 33 stored in the memory 32 and capable of running on the processor 31, where the computer program 33 is executed by the processor 31 to implement the method applied to the service test in the embodiment, and in order to avoid repetition, details are not repeated herein. Alternatively, the computer program is executed by the processor 31 to implement the functions of each model/unit applied in the service test apparatus in the embodiments, which are not repeated herein to avoid repetition.
The server 30 includes, but is not limited to, a processor 31, a memory 32. Those skilled in the art will appreciate that fig. 9 is merely an example of a server 30 and does not constitute a limitation on server 30 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., a computer device may also include input output devices, network access devices, buses, etc.
The Processor 31 may be a Central Processing Unit (CPU), or other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 32 may be an internal storage unit of the server 30, such as a hard disk or a memory of the server 30. The memory 32 may also be an external storage device of the server 30, such as a plug-in hard disk provided on the server 30, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 32 may also include both an internal storage unit of the server 30 and an external storage device. The memory 32 is used for storing computer programs and other programs and data required by the computer device. The memory 32 may also be used to temporarily store data that has been output or is to be output.
An embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, and when the program runs, the device on which the storage medium is located is controlled to execute the service testing method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components 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 units, and may be in an electrical, mechanical or other form.
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 position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing 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 method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (16)

1. A service testing method is applied to user equipment, and the method comprises the following steps:
subscribing a target topic to a server so that the server pushes a target message corresponding to the target topic to at least one user device;
judging whether the target message is received or not;
if the target message is judged to be received, executing business operation corresponding to the target message according to the target message;
after the business operation is completed, sending the generated test result to the server;
the test result comprises the receiving time of the target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
2. The traffic testing method of claim 1, wherein before subscribing to the target topic from the server, the method further comprises:
setting a prefabrication condition for the user equipment;
and establishing connection with the server according to the preset condition setting.
3. The service testing method according to claim 2, wherein the setting of the pre-made condition for the user equipment specifically includes:
and opening the automatic mounting, locking the frequency point, successfully re-establishing the network and activating the PDP.
4. The traffic testing method according to claim 1, wherein said server comprises an MQTT server.
5. A service testing method is applied to a server, and the method comprises the following steps:
according to a target theme subscribed by at least one user equipment to be tested, pushing a target message corresponding to the target theme to the user equipment so that the user equipment executes a service operation corresponding to the target message according to the target message, and generating a test result after the service operation is completed;
judging whether test results sent by all the user equipment are received;
if the test results sent by all the user equipment are judged to be received, whether a test ending condition is met is judged;
if the test ending condition is judged to be met, the test is finished;
the test result comprises the receiving time of the target message received by the user equipment, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
6. The traffic testing method according to claim 5, wherein before pushing the target message corresponding to the target topic to the user equipment according to the target topic subscribed by the at least one user equipment to be tested to the server, the method further comprises:
and establishing connection with the user equipment.
7. The service testing method according to claim 5, wherein after determining whether the test end condition is reached if it is determined that the test results sent by all the user equipments are received, the method further comprises:
and if the test ending condition is judged not to be met, continuing to execute the step of pushing the target message corresponding to the target theme to the user equipment according to the target theme subscribed to the server by at least one user equipment to be tested.
8. The traffic testing method according to claim 5, wherein the test end condition comprises:
when the test times are equal to the preset times, the test is finished; or when the test time is equal to the preset time, the test is finished.
9. The traffic testing method according to claim 5, wherein said server comprises an MQTT server.
10. A service testing apparatus, the apparatus comprising:
the subscription module is used for subscribing a target theme to a server so that the server pushes a target message corresponding to the target theme to at least one user device;
the first judgment module is used for judging whether the target message is received or not;
the service execution module is used for executing service operation corresponding to the target message according to the target message if the first judgment module judges that the target message is received;
the first transceiver module is used for sending the generated test result to the server after the service operation is finished;
the test result comprises the receiving time of the target message, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
11. A traffic testing apparatus, characterized in that the apparatus comprises:
the second transceiver module is used for pushing a target message corresponding to a target theme to the user equipment according to the target theme subscribed by at least one user equipment to be tested, so that the user equipment executes a service operation corresponding to the target message according to the target message, and generates a test result after the service operation is completed;
the second judgment module is used for judging whether the test results sent by all the user equipment are received or not;
a third determining module, configured to determine whether a test end condition is met if the second determining module determines that the test results sent by all the ue are received;
the third judging module is further used for finishing the test if the third judging module judges that the test finishing condition is reached;
the test result comprises the receiving time of the target message received by the user equipment, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
12. A business testing system, the system comprising: a server and at least one user equipment;
the user equipment is used for subscribing a target theme to the server; judging whether a target message which is sent by the server and corresponds to the target theme is received or not; if the target message which is pushed by the server and corresponds to the target subject is judged to be received, executing business operation corresponding to the target message according to the target message; after the business operation is completed, sending the generated test result to the server;
the server is used for pushing a target message corresponding to a target topic to the user equipment according to the target topic subscribed by at least one user equipment; judging whether test results sent by all the user equipment are received; if the test results sent by all the user equipment are judged to be received, whether the test ending condition is met is judged; if the test finishing condition is judged to be reached, the test is finished;
the test result comprises the receiving time of the target message received by the user equipment, the starting time of the service operation, the finishing time of the service operation and the service test result of the service operation.
13. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program is run, a device in which the storage medium is located is controlled to execute the service testing method according to any one of claims 1-4.
14. A storage medium, characterized in that the storage medium comprises a stored program, wherein the apparatus on which the storage medium is located is controlled to execute the service testing method according to any one of claims 5-9 when the program runs.
15. A computer device comprising a memory for storing information comprising program instructions and a processor for controlling the execution of the program instructions, characterized in that the program instructions are loaded and executed by the processor to implement the steps of the traffic testing method according to any of claims 1-4.
16. A server comprising a memory for storing information including program instructions and a processor for controlling the execution of the program instructions, characterized in that the program instructions are loaded and executed by the processor to implement the steps of the traffic testing method according to any of the claims 5-9.
CN202110234947.9A 2021-03-03 2021-03-03 Service testing method, device, system, storage medium and computer equipment Active CN112925713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110234947.9A CN112925713B (en) 2021-03-03 2021-03-03 Service testing method, device, system, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110234947.9A CN112925713B (en) 2021-03-03 2021-03-03 Service testing method, device, system, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN112925713A CN112925713A (en) 2021-06-08
CN112925713B true CN112925713B (en) 2023-03-10

Family

ID=76173164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110234947.9A Active CN112925713B (en) 2021-03-03 2021-03-03 Service testing method, device, system, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN112925713B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115118955B (en) * 2022-05-25 2024-04-26 海南乾唐视联信息技术有限公司 Service testing method and device and storable medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412101A (en) * 2016-10-28 2017-02-15 浪潮软件集团有限公司 MQTT protocol-based user-oriented message pushing method
CN107092555A (en) * 2016-08-05 2017-08-25 北京小度信息科技有限公司 A kind of method and system of test application program
CN107949004A (en) * 2017-10-25 2018-04-20 北京空间技术研制试验中心 Data handling system and method for manned spacecraft
CN108052451A (en) * 2017-12-26 2018-05-18 网易(杭州)网络有限公司 Test method, system, test server, test terminal and storage medium
CN108932193A (en) * 2018-06-01 2018-12-04 四川斐讯全智信息技术有限公司 A kind of MQTT server interface test method and system
CN109101373A (en) * 2017-06-20 2018-12-28 北京航空航天大学 General-utility test platform based on subscription/publication mode
CN110674039A (en) * 2019-09-20 2020-01-10 广州虎牙科技有限公司 Multi-device synchronous testing method and device, server and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107092555A (en) * 2016-08-05 2017-08-25 北京小度信息科技有限公司 A kind of method and system of test application program
CN106412101A (en) * 2016-10-28 2017-02-15 浪潮软件集团有限公司 MQTT protocol-based user-oriented message pushing method
CN109101373A (en) * 2017-06-20 2018-12-28 北京航空航天大学 General-utility test platform based on subscription/publication mode
CN107949004A (en) * 2017-10-25 2018-04-20 北京空间技术研制试验中心 Data handling system and method for manned spacecraft
CN108052451A (en) * 2017-12-26 2018-05-18 网易(杭州)网络有限公司 Test method, system, test server, test terminal and storage medium
CN108932193A (en) * 2018-06-01 2018-12-04 四川斐讯全智信息技术有限公司 A kind of MQTT server interface test method and system
CN110674039A (en) * 2019-09-20 2020-01-10 广州虎牙科技有限公司 Multi-device synchronous testing method and device, server and storage medium

Also Published As

Publication number Publication date
CN112925713A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN111885115B (en) Device binding changing method and device
WO2017049550A1 (en) Adapter and adapter upgrade method
CN115426646A (en) Method and system for using remote subscriber identity module at device
CN112925713B (en) Service testing method, device, system, storage medium and computer equipment
CN112596768B (en) Updating method and device of equipment, storage medium and electronic device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN113543281A (en) Voice communication method and voice communication device
CN112351471A (en) Method for accessing device to gateway, gateway device and computer readable storage medium
CN108022126A (en) Definite method, apparatus, server and the storage medium of prize drawing qualification
CN104918296A (en) Network connection assistance system and method
CN112637221B (en) Equipment control method and device
CN114172803A (en) Multi-FPGA version control and configuration system and method based on Ethernet switching technology
EP2445171A1 (en) File transfer protocol client and implementing method thereof
CN108021643A (en) Information-pushing method, device, server and storage medium
CN112416617A (en) Control method and device of Bluetooth equipment, storage medium and electronic device
CN109617988B (en) Request retry method and related product
CN111596942A (en) Method and device for forcibly triggering software upgrading and software upgrading system
CN107548121A (en) It is determined that the method and device of access network
CN107517493A (en) Connection method, device and the terminal of radio resource control RRC
CN115484158A (en) Communication configuration method and device of vehicle-mounted equipment based on eSIM card
CN115103359A (en) Network distribution method and device, network to be distributed equipment, electronic device and readable storage medium
CN112968951B (en) Service node connection method and device, storage medium and electronic device
CN107466018A (en) The data transferring method and terminal device of a kind of terminal device
CN107528714B (en) Script processing method, device and system and router
CN114205888B (en) Equipment network distribution method and device, storage medium and electronic device

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