Method and device for performing a probing task, storage medium, electronic device
By automatically executing dialing and testing tasks through a dual-queue mechanism, the inefficiency and accuracy problems caused by manual judgment are solved, and the dialing and testing results are determined efficiently.
Patent Information
- Application Number
- CN202210434757.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-24
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-04-24
AI Technical Summary
In existing technologies, the judgment of the execution results of probing tasks relies on manual analysis, which leads to low efficiency and difficulty in guaranteeing test accuracy.
A dual-queue mechanism is adopted. The first queue stores the header task of the probing task, and the probing steps are stored in the second queue when the execution time arrives. The target thread executes the probing steps in the second queue to determine the result and automatically judges success, failure or timeout.
It improves the efficiency of determining test results, reduces manual intervention, and enhances the accuracy and efficiency of testing.
Smart Images

Figure CN114756348B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and more specifically, to a method and apparatus for performing a dialing test task, a storage medium, and an electronic device. Background Technology
[0002] Currently, the evaluation of test results mainly relies on manual analysis to identify failure records and manually resend the tests. This approach is inefficient and makes it difficult to guarantee test accuracy. Summary of the Invention
[0003] This invention provides a method and apparatus for performing dialing tests, a storage medium, and an electronic device to at least solve the problem of low efficiency in determining dialing test results in related technologies.
[0004] According to an embodiment of the present invention, a method for executing a probing task is provided, comprising: determining the header tasks of N probing steps in a probing task to be executed, thereby obtaining N header tasks, wherein each header task includes identification information for identifying each probing step and an execution time for executing each probing step, wherein N is a natural number greater than or equal to 1; storing each header task in a first queue according to the execution time of each probing step; if the execution time of a target probing step is determined in the first queue, storing the target probing step in a second queue; and instructing a target thread to execute the target probing step in the second queue to determine the probing result.
[0005] According to another embodiment of the present invention, an execution apparatus for a probing task is provided, comprising: a first determining module, configured to determine the header tasks of N probing steps in a probing task to be executed, thereby obtaining N header tasks, wherein each header task includes identification information for identifying each probing step and an execution time for executing each probing step, wherein N is a natural number greater than or equal to 1; a first storage module, configured to store each header task in a first queue according to the execution time of each probing step; a second storage module, configured to store the target probing step in a second queue when the execution time of the target probing step is determined in the first queue; and a first indicating module, configured to instruct a target thread to execute the target probing step in the second queue to determine the probing result.
[0006] In an exemplary embodiment, the first determining module includes: a first receiving unit, configured to receive identification information of each of the aforementioned testing steps and execution time of each of the aforementioned testing steps sent by the first device, wherein the first device is configured to generate the aforementioned testing task according to the device function of the first device; and a first encapsulation unit, configured to encapsulate the identification information of each of the aforementioned testing steps and execution time of each of the aforementioned testing steps to obtain the aforementioned N header tasks.
[0007] In an exemplary embodiment, the second storage module includes: a first lookup unit for looking up a target head task that has reached its execution time from the first queue; and a first storage unit for storing the target probing steps associated with the target head task into the second queue.
[0008] In one exemplary embodiment, the first instruction module includes: a first instruction unit, configured to instruct the target thread to execute the target probing step according to the execution time of the target probing step; a first processing unit, configured to delete the target probing step from the second queue and delete the target head task of the target probing step from the first queue if the target probing step is executed successfully; and a second processing unit, configured to save the target probing step in the second queue and delete the target head task of the target probing step from the first queue if the target probing step fails to execute.
[0009] In an exemplary embodiment, the apparatus further includes a second determining module, configured to determine configuration information for the target dialing step, wherein the configuration information for the target dialing step includes at least one of the following: a preset number of executions for the target dialing step, device information for executing the target dialing step, the category of the target dialing step, and the execution time of the target dialing step.
[0010] In one exemplary embodiment, the apparatus further includes: a third storage module, configured to instruct the target thread to execute the target probing step in the second queue, and after determining the probing result, if the target probing step fails to execute and the preset execution count of the target probing step is greater than 1, to re-store the target header task of the target probing step in the first queue; a second instruction module, configured to instruct the target thread to execute the target probing step according to the re-execution time of the target probing step; and a first deletion module, configured to delete the target probing step from the second queue and delete the target header task from the first queue.
[0011] In an exemplary embodiment, the apparatus further includes: a first acquisition module, configured to determine the head task of N test steps in a test task to be executed, and after obtaining the N head tasks, to acquire each test step corresponding to each head task from the first queue according to a preset time period, so as to store each test step that has reached the execution time into the second queue.
[0012] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0013] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0014] This invention, after determining the header tasks of multiple testing steps in a testing task, stores these header tasks in a first queue. When the execution time of a testing step arrives, the testing step is stored in a second queue and executed within that queue. The testing result is determined based on the execution result in the second queue. Manual judgment of success is unnecessary. Therefore, this invention solves the problem of low efficiency in determining testing results in related technologies, thereby improving the efficiency of testing result determination. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a hardware structure block diagram of a mobile terminal for executing a dialing test task according to an embodiment of the present invention.
[0018] Figure 2 This is a flowchart of a method for executing a test task according to an embodiment of the present invention;
[0019] Figure 3 This is a schematic diagram of the task scheduling framework according to an embodiment of the present invention;
[0020] Figure 4 This is a schematic diagram illustrating configuration information according to an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram illustrating the dialing configuration according to an embodiment of the present invention;
[0022] Figure 6 This is a schematic diagram of the task scheduling framework according to an embodiment of the present invention;
[0023] Figure 7 This is a flowchart illustrating the determination of task execution results according to an embodiment of the present invention;
[0024] Figure 8 This is a structural block diagram of the device for executing a dialing test task according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] According to one aspect of the embodiments of this application, a method for executing a dial-up test task is provided. This method is widely applicable to whole-house intelligent digital control testing application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned method for executing a dial-up test task can be applied to scenarios such as... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0028] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0029] This embodiment provides a method for executing a dialing test task. Figure 2 This is a flowchart of the execution method of the dialing test task according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0030] Step S202: Determine the header tasks of N test steps in the test task to be executed, and obtain N header tasks. Each header task includes identification information for identifying each test step and the execution time for executing each test step. N is a natural number greater than or equal to 1.
[0031] In this embodiment, the testing task can be determined according to the device functions of the terminal device, such as a task to verify login information or a task to control the functions of home appliances. The value of N can be flexibly set based on the actual application scenario or testing requirements. For example, a testing task for logging into an application includes steps for inputting login information, verifying the legality of the login information, comparing the login information, etc.
[0032] Step S204: Store each head task in the first queue according to the execution time of each testing step;
[0033] In this embodiment, the execution order of the first tasks in the first queue can be first-in, first-out, or it can be set according to a set timeout period. For example, the timeout period for the dial-up test step of verifying login information can be set to 2 seconds.
[0034] Step S206: If the execution time of the target probing step is determined in the first queue, the target probing step is stored in the second queue.
[0035] In this embodiment, the second queue is used to execute timeout testing steps; if the execution is successful, it is deleted, and if the execution fails, it is saved.
[0036] Step S208 instructs the target thread to perform the target probing step in the second queue to determine the probing result.
[0037] In this embodiment, the test results include successful execution, failed execution, repeated execution, etc. After executing the test task, the test results can be used to provide alerts for different stages such as alarm occurrence, duration, recovery start, and recovery, allowing for real-time monitoring of the current test task status.
[0038] The entity performing the above steps may be a terminal, a server, a specific processor set in the terminal or server, or a processor or processing device set up relatively independently of the terminal or server, but is not limited to these.
[0039] Through the above steps, after determining the header tasks of multiple testing steps in the testing task, the header tasks are stored in a first queue. When the execution time of a testing step arrives, the testing step is stored in a second queue and executed in the second queue. The testing result of the testing step is determined based on the execution result in the second queue. Manual judgment of execution success is not required. Therefore, this solves the problem of low efficiency in determining testing results in related technologies, achieving the effect of improving the efficiency of determining testing results.
[0040] In an exemplary embodiment, the header tasks of N test steps in the test task to be executed are determined, resulting in N header tasks, including:
[0041] S11, receiving the identification information of each test step and the execution time of each test step sent by the first device, wherein the first device is used to generate a test task according to the device function of the first device;
[0042] In this embodiment, the first device can be a terminal device, such as a mobile phone or tablet computer. The first device can be used to log in to an application or send information. For example, if the first device is a mobile phone, the user can log in to the application using login information entered on the phone and then use the application to send control commands to control home appliances.
[0043] The execution time for each testing step can be a set timeout period, such as 2 seconds. For example, it can be 2 seconds to verify login information. If the verification is successful, the user will log in to the application; if it fails, the user will be prompted that the login timeout has occurred.
[0044] S11 encapsulates the identification information of each test step and the execution time of each test step to obtain N head tasks.
[0045] In this embodiment, the encapsulated header task is stored in the first queue.
[0046] In one exemplary embodiment, if the execution time to the target probing step is determined in the first queue, storing the target probing step in the second queue includes:
[0047] S21, find the target head task that has reached its execution time from the first queue;
[0048] S31, store the target probing steps associated with the target head task into the second queue.
[0049] In this embodiment, the target thread executes the target probing steps according to the execution time instruction in the target header task.
[0050] In one exemplary embodiment, instructing a target thread to perform a target probing step in a second queue to determine the probing result includes:
[0051] S41 instructs the target thread to execute the target probing steps according to the execution time of the target probing steps;
[0052] S42, if the target probing step is executed successfully, remove the target probing step from the second queue and remove the target head task of the target probing step from the first queue.
[0053] S43, if the target probing step fails to execute, save the target probing step in the second queue and delete the target head task of the target probing step from the first queue.
[0054] In this embodiment, if the second queue does not include the target probing step, it indicates that the target probing step was executed successfully; otherwise, it fails.
[0055] like Figure 3The diagram shows the execution sequence of each testing step in the testing task. This includes testing steps performed when a user account logs into the target application via a terminal device, such as the steps for the terminal device to access the user gateway, the login information entry step, the login information verification step, the target device to access the device gateway, and the steps for transmitting information between the target device and the terminal device, etc. Figure 4 The diagram illustrates the process of recording configuration information during the dial-up testing steps in this embodiment. During the execution of each dial-up testing step, the corresponding configuration information is loaded into the database.
[0056] In one exemplary embodiment, the above method further includes:
[0057] S51, determine the configuration information of the target dialing test step, wherein the configuration information of the target dialing test step includes at least one of the following: the preset number of times the target dialing test step is executed, the device information for executing the target dialing test step, the category of the target dialing test step, and the execution time of the target dialing test step.
[0058] In this embodiment, as Figure 5 As shown, the classes used for dial-up configuration parsing are defined. The `ConfigHelper` class is used to read configuration file information into local memory. The `SslUtil` class is used to ensure the secure transmission of dial-up tasks during the dial-up process using the Secure Sockets Layer (SSL) protocol (e.g., the encryption and decryption process of dial-up tasks). The `JsonUtil` class is used for JSON serialization and deserialization operations, i.e., performing data transformations, such as converting plaintext data into network data.
[0059] Furthermore, this embodiment includes a thread pool, with each probing step requiring one thread cycle to execute; different subsequent tasks are triggered for different execution results (success, failure, timeout). For example... Figure 6 The diagram shown is a framework diagram of task scheduling in this embodiment, in which various scheduling functions are used to schedule the dialing and testing steps.
[0060] In one exemplary embodiment, after instructing the target thread to perform a target probing step in a second queue to determine the probing result, the method further includes:
[0061] S61, if the target testing step fails to execute and the preset number of executions of the target testing step is greater than 1, the target head task of the target testing step is re-stored in the first queue.
[0062] S62 instructs the target thread to execute the target probing step according to the re-execution time of the target probing step;
[0063] S63, remove the target probing step from the second queue and remove the target head task from the first queue.
[0064] In this embodiment, the testing task is re-executed in the second queue by setting the repetition time of the testing steps. For example, if any testing step fails during the testing process, it is retried every 10 seconds. If all three retries fail, it is determined that a fault has started. The fault start time (first failure time) is recorded, and a notification is sent (fault occurred). After the fault starts, the testing task continues to be executed. If the testing task is executed successfully after the fault starts, a notification is sent (fault recovery has begun). If five consecutive tests fail after the fault starts (approximately 30 minutes), a notification is sent (fault still not recovered). After the fault starts, the fault ends when the complete process between the user and the device is tested successfully three times consecutively. The fault end time (first success time) is recorded, and a notification is sent (fault recovery).
[0065] Furthermore, even after a fault occurs during the dial-up testing task, other dial-up testing steps within the task must continue to be executed. Additionally, if a dial-up test is successful after the fault begins, a notification is sent (fault recovery begins). If five consecutive dial-up tests fail after the fault begins (e.g., within 30 minutes), a notification is sent (fault not yet recovered). If, after the fault begins, the entire dial-up testing process between the user gateway and the device gateway is completed with three consecutive successful dial-up tests, the fault is considered to have ended, the fault end time (first success time) is recorded, and a notification is sent (fault recovery).
[0066] This embodiment utilizes a second queue to determine the dialing test results, which can effectively improve the efficiency of dialing tests.
[0067] In an exemplary embodiment, after determining the header tasks of N test steps in the test task to be executed, and obtaining the N header tasks, the method further includes:
[0068] S71, retrieve each test step corresponding to each head task from the first queue according to the preset time period, and store each test step that has reached the execution time into the second queue.
[0069] like Figure 7 As shown, the steps for performing a probing task using a dual-queue approach include:
[0070] S1, after the testing system starts, stores all testing configuration information in the testing system's memory and constructs a collection of task Context objects.
[0071] S2, traverse the Context object collection and obtain the task probing configuration information from the Context object collection;
[0072] S3: Use the task probing configuration information to build a task list. Only the head task is displayed to the outside world. The head task is put into the timeout queue and a delay time is set. The timeout queue includes the execution result of the task, such as execution success, execution failure, timeout, and repeated execution.
[0073] S4, Queue 1 includes the task header and test configuration information; in this embodiment, the number of test configuration information pairs corresponds to the number of tasks thrown into Queue 1 during initialization.
[0074] S5 starts a thread in the processor;
[0075] S6 sets the delay time for the task, for example, 5 seconds;
[0076] S7, check if any tasks in queue 1 have expired;
[0077] S8, if there are expired tasks in queue 1, retrieve the expired tasks from queue 1;
[0078] S9, the test configuration information for tasks that are about to expire;
[0079] S10, use a thread to start executing the expired task;
[0080] S11, determine whether the task was executed successfully;
[0081] S12, if the execution is successful, remove the executed task from queue 1;
[0082] S13, retrieve the other tasks from queue 1 and proceed to S9;
[0083] S14, If a task fails to execute by the due date, determine whether the task needs to be executed again;
[0084] S15, the process ends if there is no need to repeat the failed task;
[0085] S16, In the case that a failed task needs to be executed repeatedly, delete the head task stored in the timeout queue;
[0086] S17: Retrieve the failed task and proceed to S9 to re-execute it;
[0087] S19, starts another thread in the processor;
[0088] S20, set the delay time for task execution;
[0089] S21, Determine if there are any expired head tasks stored in the timeout queue;
[0090] S22, if the timeout queue includes an expired head task, queue 1 retrieves the task corresponding to the expired head task;
[0091] S23, queue 1 interrupts the execution of the task and handles the timeout result;
[0092] S24, determine whether the execution needs to be repeated;
[0093] S25, hibernates for a certain period of time;
[0094] S18, repeat the task after ending the hibernation, and then proceed to S9.
[0095] This embodiment uses two queues to handle test failures, successes, or timeouts, increasing the accuracy of task processing.
[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0097] This embodiment also provides an execution device for a dialing test task, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0098] Figure 8 This is a structural block diagram of the execution device for the dialing test task according to an embodiment of the present invention, such as... Figure 8 As shown, the device includes:
[0099] The first determining module 82 is used to determine the head task of N testing steps in the testing task to be executed, and obtain N head tasks. Each head task includes identification information for identifying each testing step and the execution time for executing each testing step. N is a natural number greater than or equal to 1.
[0100] The first storage module 84 is used to store each head task into the first queue according to the execution time of each testing step;
[0101] The second storage module 86 is used to store the target testing step into the second queue when the execution time of the target testing step is determined in the first queue.
[0102] The first instruction module 88 is used to instruct the target thread to perform the target probing step in the second queue in order to determine the probing result.
[0103] In one exemplary embodiment, the first determining module described above includes:
[0104] The first receiving unit is configured to receive the identification information of each of the aforementioned testing steps and the execution time of each of the aforementioned testing steps sent by the first device, wherein the first device is configured to generate the aforementioned testing task according to the device function of the first device.
[0105] The first encapsulation unit is used to encapsulate the identification information of each of the above-mentioned test steps and the execution time of each of the above-mentioned test steps, so as to obtain the above-mentioned N head tasks.
[0106] In one exemplary embodiment, the second storage module described above includes:
[0107] The first search unit is used to search for the target head task that has reached its execution time from the first queue mentioned above;
[0108] The first storage unit is used to store the target probing steps associated with the target head task into the second queue.
[0109] In one exemplary embodiment, the first indicating module described above includes:
[0110] The first instruction unit is used to instruct the target thread to execute the target testing steps according to the execution time of the target testing steps.
[0111] The first processing unit is used to delete the target testing step from the second queue and delete the target head task of the target testing step from the first queue if the target testing step is successfully executed.
[0112] The second processing unit is used to save the target testing step in the second queue and delete the target head task of the target testing step from the first queue if the target testing step fails to execute.
[0113] In one exemplary embodiment, the above-described apparatus further includes:
[0114] The second determining module is used to determine the configuration information of the target dialing test step, wherein the configuration information of the target dialing test step includes at least one of the following: the preset number of times the target dialing test step is executed, the device information for executing the target dialing test step, the category of the target dialing test step, and the execution time of the target dialing test step.
[0115] In one exemplary embodiment, the above-described apparatus further includes:
[0116] The third storage module is used to instruct the target thread to execute the target probing step in the second queue to determine the probing result. If the target probing step fails to execute and the preset execution number of the target probing step is greater than 1, the target head task of the target probing step is re-stored in the first queue.
[0117] The second instruction module is used to instruct the target thread to execute the target probing step according to the re-execution time of the target probing step.
[0118] The first deletion module is used to delete the target probing step from the second queue and the target head task from the first queue.
[0119] In one exemplary embodiment, the above-described apparatus further includes:
[0120] The first acquisition module is used to determine the head task of N test steps in the test task to be executed. After obtaining the N head tasks, it retrieves each test step corresponding to each head task from the first queue according to a preset time period, and stores each test step that has reached the execution time into the second queue.
[0121] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0122] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0123] In this embodiment, the computer-readable storage medium described above may be configured to store a computer program for performing the above steps.
[0124] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0125] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0126] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0127] In one exemplary embodiment, the processor described above may be configured to perform the above steps via a computer program.
[0128] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0129] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for executing a test task, characterized in that, include: Determine the header tasks of N test steps in the test task to be executed, and obtain N header tasks. Each header task includes identification information for identifying each test step and the execution time for executing each test step, where N is a natural number greater than or equal to 1. Each head task is stored in the first queue according to the execution time of each of the aforementioned testing steps; If the execution time of the target probing step is determined in the first queue, the target probing step is stored in the second queue; The target thread is instructed to perform the target probing step in the second queue to determine the probing result; Specifically, the header tasks of N testing steps in the test task to be executed are determined to obtain N header tasks, including: receiving the identification information of each testing step and the execution time of each testing step sent by the first device, wherein the first device is used to generate the test task according to the device function of the first device; and encapsulating the identification information of each testing step and the execution time of each testing step to obtain the N header tasks. If the execution time of the target probing step is determined in the first queue, the target probing step is stored in the second queue, which includes: finding the target head task that has reached the execution time in the first queue; and storing the target probing step associated with the target head task in the second queue.
2. The method according to claim 1, characterized in that, Instruct the target thread to perform the target probing step in the second queue to determine the probing result, including: The target thread is instructed to execute the target probing step according to the execution time of the target probing step; If the target probing step is executed successfully, the target probing step is deleted from the second queue, and the target head task of the target probing step is deleted from the first queue. If the target probing step fails, the target probing step is saved in the second queue, and the target header task of the target probing step is deleted from the first queue.
3. The method according to any one of claims 1-2, characterized in that, The method further includes: The configuration information of the target dialing test step is determined, wherein the configuration information of the target dialing test step includes at least one of the following: the preset number of times the target dialing test step is executed, the device information for executing the target dialing test step, the category of the target dialing test step, and the execution time of the target dialing test step.
4. The method according to claim 3, characterized in that, After instructing the target thread to perform the target probing step in the second queue to determine the probing result, the method further includes: If the target probing step fails and the preset number of executions for the target probing step is greater than 1, the target head task of the target probing step will be stored again in the first queue. Instruct the target thread to execute the target probing step according to the re-execution time of the target probing step; Remove the target probing step from the second queue and remove the target head task from the first queue.
5. The method according to claim 1, characterized in that, After determining the header tasks of the N test steps in the test task to be executed, and obtaining the N header tasks, the method further includes: According to a preset time period, each test step corresponding to each head task is retrieved from the first queue, and each test step that has reached its execution time is stored in the second queue.
6. A device for executing a dialing test task, characterized in that, include: The first determining module is used to determine the head task of N testing steps in the testing task to be executed, and obtain N head tasks, wherein each head task includes identification information for identifying each testing step and the execution time for executing each testing step, and N is a natural number greater than or equal to 1. The first storage module is used to store each of the head tasks into a first queue according to the execution time of each of the testing steps; The second storage module is used to store the target testing step into the second queue when the execution time of the target testing step is determined in the first queue. The first instruction module is used to instruct the target thread to perform the target probing step in the second queue in order to determine the probing result; The first determining module is further configured to receive the identification information of each of the testing steps and the execution time of each testing step sent by the first device, wherein the first device is configured to generate the testing task according to the device function of the first device; encapsulate the identification information of each of the testing steps and the execution time of each testing step to obtain the N header tasks; The second storage module is further configured to retrieve the target head task that has reached its execution time from the first queue; and store the target probing step associated with the target head task into the second queue.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the method described in any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
A response method and a system for dial test
CN109471706A
Task execution method and device, storage medium and electronic device
CN110968407A
Task processing method and device
CN113760522A