Script Automatic Batch Running Control Method, System, Medium and Electronic Device
Through the synchronous batch running and data clearing mechanism based on the scene storage model, the problem of low batch running efficiency of interface test scripts is solved, and faster batch running efficiency and higher processing efficiency are achieved.
Patent Information
- Application Number
- CN202210032757.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-01-12
AI Technical Summary
In the prior art, the batch running efficiency of interface test scripts is low, which affects the timeliness of software testing.
Each scene is identified by the horizontal axis based on the scene storage model and the batch is run synchronously based on the vertical axis. When a scene runs the batch successfully, the data is cleared, and when the scene runs the batch fails, the modified data is obtained and the batch is run again until it is successful.
It realizes that cases in different scenarios are reduced to the smallest set, ensuring that different cases can be executed simultaneously, improving batch running efficiency, and facilitating case review, management and adjustment through ladder models, reducing error changes, and further improving processing efficiency.
Smart Images

Figure CN114328266B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of batch running control, and particularly to a method, system, medium and electronic device for automatically controlling the batch running of scripts. Background Art
[0002] Interface testing is to test the interfaces between systems or components, mainly to verify data exchange, transmission, control management processes, and mutual logical dependencies.
[0003] Currently, for the batch execution of interface automation test scripts, the execution method is to execute in series according to the cases within the scenario and in parallel between scenarios; most cases are classified according to scenarios. When there are many cases, the total execution time also increases accordingly, affecting the timeliness of software testing. Summary of the Invention
[0004] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a method, system, medium and electronic device for automatically controlling the batch running of scripts, which is used to solve the problem of low batch running efficiency of interface test scripts in the prior art.
[0005] To achieve the above purpose and other related purposes, the present invention provides a method for automatically controlling the batch running of scripts, the method includes: identifying each scenario based on the horizontal axis of the scenario storage model, and performing synchronous batch running on each scenario based on the vertical axis of the scenario storage model; when it is recognized that the batch running job of any scenario in the scenario storage model is successful, empty the data in the corresponding position; when it is recognized that the batch running job of a certain scenario fails, stop the batch running job corresponding to the scenario, and obtain modified data for re-batch running until the batch running job corresponding to the scenario is successful.
[0006] In an embodiment of the present invention, based on the batch running feedback value, it is recognized whether the batch running job corresponding to the current scenario is successful or failed. Among them, when the batch running feedback value is a preset value, the corresponding batch running job is successful, otherwise the batch running job fails.
[0007] In an embodiment of the present invention, the scenario and the modified data are obtained based on the data packet uploaded by the user, and each scenario is independent of each other.
[0008] In an embodiment of the present invention, the method further includes:
[0009] Extracting each independent scenario to fill the scenario storage model, where the horizontal axis of the scenario storage model is sorted according to the order of magnitude of the scenarios, and the vertical axis of the scenario storage model is sorted according to the natural process of each scenario;
[0010] Extract the scenario storage model filled with the scenario to obtain the scenario storage model, and perform a batch operation on the scenario based on the preset order of the scenario storage model.
[0011] In an embodiment of the present invention, the scenario storage model is obtained based on a preset model library, wherein the scenario storage model includes a ladder model.
[0012] In an embodiment of the present invention, if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the ladder model, the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the ladder at the data clearing position until the data in the scenario storage model ladder is all cleared.
[0013] In an embodiment of the present invention, the method further includes visually displaying the scenario storage model.
[0014] To achieve the above and other related purposes, the present invention provides a script automated batch control system as described above, the system includes:
[0015] A batch module, configured to identify each scenario based on the horizontal axis of the scenario storage model, and perform synchronous batch processing on each scenario based on the vertical axis of the scenario storage model;
[0016] A clearing module, configured to clear the data in the corresponding position when it is recognized that the batch operation of any scenario in the scenario storage model is successful;
[0017] A modification module, configured to stop the batch operation corresponding to the scenario when it is recognized that the batch operation of a certain scenario fails, and obtain modified data for re-batch processing until the batch operation corresponding to the scenario is successful.
[0018] To achieve the above and other related purposes, the present invention provides a computer-readable storage medium as described above, on which a computer program is stored, and when the program is executed by a processor, it implements the script automated batch control method.
[0019] To achieve the above and other related purposes, the present invention provides an electronic device as described above, the electronic device includes: a processor and a memory; wherein, the memory is used to store a computer program, and the processor is used to load and execute the computer program so that the electronic device executes the script automated batch control method.
[0020] As described above, the script automated batch running control method, system, medium and electronic device of the present invention can narrow down the cases of different scenarios to a minimum set, and different sets do not affect each other, thus ensuring that different cases can be executed simultaneously, making the batch running more efficient; and different ladders are set for easy access, management and adjustment of cases. After identifying that the batch running of the cases in the upper ladder fails, the subsequent cases do not need to be executed, so as to reduce error iteration and further improve the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It shows the method step diagram of the script automated batch running control method of the present invention in an embodiment;
[0022] Figure 2 It shows the method step diagram of the script automated batch running control method of the present invention in another embodiment;
[0023] Figure 3 It shows the schematic diagram of the ladder model of the script automated batch running control method of the present invention in an embodiment;
[0024] Figure 4 It shows the structural schematic diagram of the script automated batch running control system of the present invention in an embodiment;
[0025] Figure 5 It shows the structural schematic diagram of the script automated batch running control system of the present invention in another embodiment;
[0026] Figure 6 It shows the structural schematic diagram of the electronic device in an embodiment of the script automated batch running control system of the present invention.
[0027] DESCRIPTION OF REFERENCE NUMERALS
[0028] Steps S11 - S13
[0029] Steps S31 - S32
[0030] 40 Script automated batch running control system
[0031] 41 Batch running module
[0032] 42 Clearing module
[0033] 43 Modifying module
[0034] 44 Extracting module DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0036] The script automated batch running control method described in the embodiments of the present invention is applied to one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0037] The electronic device can be any electronic product that can perform human-computer interaction with users. For example, a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an Internet Protocol Television (IPTV), a smart wearable device, etc.
[0038] The electronic device may further include a network device and / or a user device. Among them, the network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.
[0039] The network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0040] Specifically, please refer to Figure 1 , in an embodiment of the invention, the script automated batch running control method of the present invention includes the following steps:
[0041] Step S11: Identify each scenario based on the horizontal axis of the scenario storage model, and perform synchronous batch running on each of the scenarios based on the vertical axis of the scenario storage model;
[0042] Specifically, the scenario storage model includes a plurality of grids arranged in order. The grids contain case data corresponding to the scenarios. Among them, the horizontal axis of the scenario storage model represents the order of magnitude of the scenarios, and the vertical axis of the scenario storage model represents the case data corresponding to each scenario. Therefore, each scenario can be identified based on the order of magnitude of the horizontal axis of the scenario storage model, and synchronous batch running can be performed on each scenario based on the natural process order of the vertical axis of the scenario storage model.
[0043] Further, the scenarios are obtained based on the data packets uploaded by the user, and the scenarios are independent of each other.
[0044] It is worth mentioning that the scenarios are independent of each other because the user has done the classification when uploading. For example, the data packets uploaded by the user contain two scenarios. One is the user information reading process, and the other is the process of ordering phone bills. Correspondingly, the obtained scenarios are the user information reading scenario and the phone bill recharge scenario. Among them, the two scenarios are independent of each other, and the different case data within each scenario are also independent of each other. For example, the user information reading scenario has a total of four independent steps, which are: calling the interface to identify the user request - identifying the user name - identifying the user's mobile phone number - returning the user information; while the phone bill ordering scenario has a total of four independent steps, which are: calling the interface to identify the user's order command - judging the rechargeable amount - accepting the amount and placing an order - receiving the user's consumption amount to complete the recharge.
[0045] Further, the method further includes visualizing the scenario storage model, as Figure 2 shown, the ladder model is assembled by ladder grids. Creating or adding cases can be directly stored in the corresponding grids as needed. Visualize the scenario as a ladder view to facilitate viewing cases, adding cases, and adjusting the positions of cases. Among them, different buttons can be set on the visualization interface to correspond to different visualization functions. For example, set an add button to add cases or set an adjustment button to adjust cases, etc. Correspondingly, when viewing a case, when the mouse hovers over the corresponding grid, the attribute information and basic content of the case in the grid are displayed. Preferably, when viewing a case, a search bar can also be set on the visualization interface. When the position coordinates of different grids in the visualization interface are input, the cases in the corresponding grids can be displayed. For example, input B3 as the coordinate value, then the grid with the natural order of "3" in the B scenario is extracted, and the case stored therein is displayed. At this time, the displayed case content is the complete content.
[0046] Further, when performing the batch job on the scenario, start taking grids from the top of the ladder. If there are multiple grids in the same natural order on the vertical axis, for example Figure 2 the fourth row in, there are a total of four grids, namely A4, B4, C4, and D4. The cases in each grid are executed in parallel. After all the cases in the grid are executed and passed, the grid directly below can be taken to continue the execution. In this way, the cases are stored and classified in a sequential and non-interfering manner, which is convenient for finding the cases and also convenient for the scenario to be executed quickly.
[0047] Step S12: After identifying that the batch job of any of the scenarios in the scenario storage model is successful, clear the data in the corresponding position;
[0048] Specifically, after the batch job of a certain scenario in the scenario storage model is completed, clear the data in the corresponding position ladder. If the order of magnitude of the scenario is higher than the horizontal axis extreme value of the ladder model, then subtract the horizontal axis extreme value from the order of magnitude, and the remaining scenarios in number are sequentially supplemented into the ladder where the data is cleared until all the data in the scenario storage model ladder is cleared.
[0049] Furthermore, when the batch job of the scenario is running, every time the batch job of the scenario is successful, clear the data of the scenario in the ladder model to facilitate subsequent filling of the scenario. Preferably, if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the ladder model, then the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the ladder where the data is cleared until all the data in the ladder model is cleared. For example, take the horizontal axis extreme value as "4". If the order of magnitude of the scenario is "6", then during the batch running of the scenario, if a certain scenario finishes batch running, clear the data in its corresponding position to fill in the scenario with the order of magnitude of "5" of the scenario. As Figure 2 shown, for example, if scenario C finishes batch running first, then clear the data in scenario C to fill in the scenario with the order of magnitude of "5" of the scenario into column C to become the new scenario C; then, if scenario B finishes batch running second, then clear the data in scenario B to fill in the scenario with the order of magnitude of "6" of the scenario into column B to become the new scenario B; then, if scenario A finishes batch running third, then clear the data in scenario A until all the scenarios in the ladder model are cleared. Preferably, if a batch running failure case occurs when scenario D is batch running, then the batch job corresponding to scenario D stops, but the corresponding data is not cleared. Wait until the user adjusts and changes it, and then clear the data in scenario D after the batch running is successfully completed again, that is, the cleared data are all the data of successful batch running.
[0050] It should be noted that the horizontal axis of the step model increases as the number of scenarios increases, but is limited by the extreme value of the horizontal axis. That is, when the order of magnitude of the scenarios is lower than the extreme value of the horizontal axis, the actual value of the horizontal axis of the step model is equal to the order of magnitude of the scenarios; when the order of magnitude of the scenarios is greater than or equal to the extreme value of the horizontal axis, the actual value of the horizontal axis of the step model is equal to the extreme value of the horizontal axis. For the scenarios remaining after subtracting the extreme value of the horizontal axis from the order of magnitude, they are sequentially supplemented into the steps in the scenario storage model where the data has been cleared to perform the corresponding batch job. After all scenarios have completed the batch job, correspondingly, the data in the steps of the scenario storage model is also completely cleared.
[0051] Step S13: When it is recognized that the batch job of a certain scenario fails, stop the batch job corresponding to that scenario, obtain modified data, and perform the batch job again until the batch job corresponding to that scenario is successful.
[0052] Specifically, based on the batch feedback value, it is recognized whether the batch job corresponding to the current scenario is successful or failed. Among them, when the batch feedback value is a preset value, the corresponding batch job is successful; otherwise, the batch job fails. For example, when the batch feedback value is taken as "1", if the batch feedback value of a certain case data in a certain scenario during the batch process is "1", it indicates that the batch job corresponding to the case data in the current scenario is successful; if the batch feedback value is "0", it indicates that the current batch job fails.
[0053] It is worth mentioning that when it is recognized that the batch job of a certain scenario fails, the method further includes sending a reminder.
[0054] Specifically, when batch running a certain scenario, if the batch running of the case in that scenario fails, the corresponding batch running job is stopped, and at the same time, the position information corresponding to the failed case is extracted to send an exception reminder. For example, when batch running scenario B, when batch running reaches cell B6, it is recognized that the batch running of the case corresponding to cell B6 fails. Then, the position information of cell B6 is extracted, and "Batch running of B6 fails" is sent as the exception reminder. For example, the case in cell B6 corresponds to "Identify the user name and mobile phone number", but when performing the batch running job, the user name cannot be recognized, or the mobile phone number corresponding to the user cannot be recognized, or neither the user name nor the mobile phone number can be recognized. This indicates that the batch running job corresponding to the case in the current cell B6 fails. Accordingly, "Batch running of B6 fails" is sent as the exception reminder. Preferably, when the batch running of the case corresponding to cell B6 fails, the batch running job of the corresponding scenario B also stops, but it does not affect the batch running jobs corresponding to scenario A, scenario C, or scenario D that are being performed simultaneously. Therefore, when it is recognized that the batch running of a certain scenario fails, only the batch running job corresponding to that scenario is stopped, and it does not affect the batch running jobs corresponding to other scenarios.
[0055] It is worth mentioning that in an embodiment of the invention, as Figure 3 shown, the method further includes the following steps:
[0056] Step S31: Extract each of the independent scenarios and fill them into a preset model. Wherein, the horizontal axis of the preset model is sorted according to the order of magnitude of the scenarios, and the vertical axis of the preset model is sorted according to the natural process of each scenario;
[0057] Step S32: Extract the preset model filled with the scenarios to obtain the scenario storage model, and perform batch running operations on the scenarios based on the preset order of the scenario storage model.
[0058] It should be noted that based on the descriptions of steps S11 to S13, the steps for automatic batch running control are specifically described. In this embodiment, the steps for obtaining the scenario storage model are specifically described. Specifically, based on a preset model library, the preset model can be obtained, and then each of the independent scenarios is filled into the preset model to obtain the scenario storage model. Then, batch running operations can be performed on the scenarios based on the preset order of the scenario storage model. Among them, the scenario storage model includes a ladder model. Preferably, the scenario storage model can also be other data filling models, such as a grid model, etc.
[0059] It is worth mentioning that the preset order of the scenario storage model is the natural process order of the case data, that is, the batch job is carried out in the order of the natural process of the case data. It should be noted that starting from the top to the bottom of the vertical axis of the scenario storage model, the case data encountered first is executed, regardless of its position on the horizontal axis of the scenario storage model where the scenario is located.
[0060] Further, when the scenario specifically executes the batch job, taking Figure 2 the displayed interface as an example, the specific order is as follows:
[0061] (1) First, take the grid from the top layer, for example Figure 2 A1 in
[0062] (2) Execute all cases in the grid in parallel. After all are executed successfully, take the grid directly below it. For example, the grid directly below A1 is grid A2, the grid directly below A2 is grids A3, B3, and C3, and the grid directly below C3 is grids A4, B4, C4, and D4;.
[0063] (3) When the grid is taken, process the grid in parallel until it is completely processed. For example, when taking the D scenario and starting from grid D4, it is not completely processed until the batch job reaches grid D7.
[0064] (4) Summarize the processing results to obtain the batch job result corresponding to the scenario. For example, when taking the D scenario, the batch job result corresponding to the D scenario is not obtained until the batch job reaches grid D7.
[0065] Specifically, in an embodiment of the invention, referring to Figure 2 , taking the user information reading scenario as an example, fill the user information reading scenario into scenario A. Correspondingly, A1 corresponds to "call the interface to identify the user request", A2 corresponds to "identify the user name", A3 corresponds to "identify the user's mobile phone number", A4 corresponds to "return the user information", and then A5 - A7 are empty grids. When performing the batch job, take from A1 to A7 in sequence. When each grid is taken, perform a batch job on the cases in it until the batch job is completed. Among them, when performing a batch job on A3, if the corresponding user's mobile phone number cannot be identified, it means that the batch job of scenario A fails, and the position information of A3 is extracted, and "A3 batch job fails" is issued as the exception reminder to remind the user that the corresponding case "identify the user's mobile phone number" in grid A3 fails and needs to be adjusted. After adjustment, continue to perform the batch job on grid A3 until all the data in scenario A is successfully batch processed, and then clear the data in scenario A.
[0066] In another embodiment of the invention, referring toFigure 2 Taking the phone bill recharge scenario as an example, fill the order placement phone bill scenario into Scenario D. Accordingly, D4 corresponds to "call the interface to identify the user's order placement command", D5 corresponds to "judge the rechargeable amount", D6 corresponds to "accept the amount and place an order", and D7 corresponds to "receive the user's consumption amount to complete the recharge". When executing the batch job, cell A4 and cell D4 are carried out simultaneously. Based on Scenario D, perform batch processing in sequence for the cases in cells D4 - D7. When all the cases in Scenario D are successfully batch processed, clear the data in Scenario D.
[0067] Please refer to Figure 4 In one embodiment, a script automated batch processing control system 40 provided in this embodiment includes:
[0068] A batch processing module 41, configured to identify each scenario based on the horizontal axis of the scenario storage model, and perform synchronous batch processing on each of the scenarios based on the vertical axis of the scenario storage model;
[0069] An emptying module 42, configured to clear the data in the corresponding position when it is recognized that the batch job of any scenario in the scenario storage model is successful;
[0070] A modification module 43, configured to stop the batch job corresponding to a certain scenario when it is recognized that the batch job of a certain scenario fails, and obtain modified data for re - batch processing until the batch job corresponding to the scenario is successful.
[0071] Specifically, each module in the script automated batch processing control system 40, under the execution of the processor of the electronic device, implements the following method steps:
[0072] The batch processing module 41 is configured to identify each scenario based on the horizontal axis of the scenario storage model, and perform synchronous batch processing on each of the scenarios based on the vertical axis of the scenario storage model.
[0073] Specifically, the scenario storage model includes a plurality of cells arranged in sequence, and the cells contain the case data corresponding to the scenarios. Among them, the horizontal axis of the scenario storage model represents the order of magnitude of the scenarios, and the vertical axis of the scenario storage model represents the case data corresponding to each scenario. Therefore, each scenario can be identified based on the order of magnitude of the horizontal axis of the scenario storage model, and synchronous batch processing can be performed on each scenario based on the natural process order of the vertical axis of the scenario storage model.
[0074] Further, the scenarios are obtained based on the data packet uploaded by the user, and each of the scenarios is independent of each other.
[0075] It is worth mentioning that the scenarios are independent of each other because of the classification done by the user during upload. For example, the data packet uploaded by the user contains two scenarios. One is the user information reading process, and the other is the mobile phone bill ordering process. Accordingly, the obtained scenarios are the user information reading scenario and the mobile phone bill recharge scenario. Among them, the two scenarios are independent of each other, and the different case data within each scenario are also independent of each other. For example, the user information reading scenario has a total of four independent steps, which are: calling the interface to identify the user request - identifying the user name - identifying the user's mobile phone number - returning the user information; while the mobile phone bill ordering scenario has a total of four independent steps, which are: calling the interface to identify the user's order command - judging the rechargeable amount - accepting the amount and placing an order - receiving the user's consumption amount to complete the recharge.
[0076] Further, in an embodiment of the invention, it also includes visualizing the scenario storage model, such as Figure 2 shown, the ladder model is assembled by ladder grids. Creating or adding cases can be directly stored in the corresponding grids as needed. Visualize the scenario as a ladder view, which is convenient for viewing cases, adding cases, and adjusting the positions of cases. Among them, different buttons can be set on the visualization interface to correspond to different visualization functions. For example, set an add button to add cases or set an adjustment button to adjust cases, etc. Accordingly, when viewing a case, when the mouse hovers over the corresponding grid, the attribute information and basic content of the case in the grid are displayed. Preferably, when viewing a case, a search bar can also be set on the visualization interface. When the position coordinates of different grids in the visualization interface are input, the cases in the grids at the corresponding positions can be displayed. For example, input B3 as the coordinate value, then the grid with the natural order of "3" in the B scenario is extracted, and the case stored therein is displayed. At this time, the displayed case content is the complete content.
[0077] Further, when performing the batch job on the scenario, start taking grids from the top of the ladder. If there are multiple grids in the same natural order on the vertical axis, for example Figure 2 in the fourth row, there are a total of four grids, namely A4, B4, C4, and D4. The cases in each grid are executed in parallel. After all the cases in the grid are executed and passed, the grid directly below can be taken to continue the execution. In this way, the cases are classified and stored in a sequential and non-interfering manner, which is convenient for finding the cases and also convenient for the scenario to be executed quickly.
[0078] The clearing module 42 is used to clear the data at the corresponding position when it is recognized that the batch job of any scenario in the scenario storage model is successful.
[0079] Specifically, after the batch job of a certain scenario in the scenario storage model is completed, the data in the corresponding position step is cleared. Among them, if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the step model, the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the step where the data is cleared until all the data in the scenario storage model step is cleared.
[0080] Further, when the batch job is performed for the scenario, each time the batch job of the scenario is successfully run, the data of the scenario in the step model is cleared to facilitate subsequent filling of the scenario. Preferably, if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the step model, the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the step where the data is cleared until all the data in the step model is cleared. For example, taking the horizontal axis extreme value as "4", if the order of magnitude of the scenario is "6", then during the batch running of the scenario, if a certain scenario finishes batch running, the data in its corresponding position is cleared to fill in the scenario with the order of magnitude of "5" of the scenario. As Figure 2 shown, for example, if scenario C finishes batch running first, then the data in scenario C is cleared to fill in the scenario with the order of magnitude of "5" of the scenario into column C to become the new scenario C; then, scenario B finishes batch running second, then the data in scenario B is cleared to fill in the scenario with the order of magnitude of "6" of the scenario into column B to become the new scenario B; then, scenario A finishes batch running third, then the data in scenario A is cleared until all the scenarios in the step model are cleared. Preferably, if a batch running failure case occurs when scenario D is batch running, the batch job corresponding to scenario D stops, but the corresponding data is not cleared. After the user adjusts and changes it and the batch running is successfully completed again, the data in scenario D is cleared, that is, the cleared data are all the data of successful batch running.
[0081] It should be noted that the horizontal axis of the step model increases as the number of scenarios increases, but is limited by the horizontal axis extreme value. That is, when the order of magnitude of the scenario is lower than the horizontal axis extreme value, the actual value of the horizontal axis of the step model is equal to the order of magnitude of the scenario; when the order of magnitude of the scenario is greater than or equal to the horizontal axis extreme value, the actual value of the horizontal axis of the step model is equal to the horizontal axis extreme value, and the remaining scenarios after subtracting the horizontal axis extreme value from the order of magnitude are sequentially supplemented into the step in the scenario storage model where the data has been cleared to perform the corresponding batch job until all the scenarios have completed the batch job. Correspondingly, all the data in the scenario storage model step is also cleared.
[0082] When the modification module 43 recognizes that a certain scenario batch job fails, it stops the batch job corresponding to the scenario, obtains modification data for re-batch processing until the batch job corresponding to the scenario is successful.
[0083] Specifically, based on the batch processing feedback value, it is recognized whether the batch job corresponding to the current scenario is successful or failed. Among them, when the batch processing feedback value is a preset value, the corresponding batch job is successful; otherwise, the batch job fails. For example, when the batch processing feedback value is "1", if the batch processing feedback value fed back by a certain case data in a certain scenario during batch processing is "1", it indicates that the batch job corresponding to the case data in the current scenario is successful; if the batch processing feedback value is "0", it indicates that the current batch job fails.
[0084] It is worth mentioning that when it is recognized that a certain scenario batch job fails, the method further includes sending a reminder.
[0085] Specifically, when performing batch processing on a certain scenario, if there is a case batch failure within the scenario, the corresponding batch job is stopped, and at the same time, the position information corresponding to the failed case is extracted to send an exception reminder. For example, when performing batch processing on scenario B, when batch processing reaches cell B6 and it is recognized that the batch job corresponding to cell B6 fails, the position information of cell B6 is extracted, and "Batch processing of B6 fails" is sent as the exception reminder. For example, the case in cell B6 corresponds to "Identify the user name and mobile phone number", but during the batch job, the user name cannot be identified, or the mobile phone number corresponding to the user cannot be identified, or neither the user name nor the mobile phone number can be identified, then it indicates that the batch job corresponding to the case in the current cell B6 is a batch failure. Correspondingly, "Batch processing of B6 fails" is sent as the exception reminder. Preferably, when the batch job corresponding to cell B6 fails, the batch job of the corresponding scenario B also stops, but it will not affect the batch jobs corresponding to scenario A, scenario C, or scenario D that are being performed simultaneously. Therefore, when it is recognized that a certain scenario batch job fails, only the batch job corresponding to the scenario is stopped, and it will not affect the batch jobs corresponding to other scenarios.
[0086] It is worth mentioning that as Figure 5As shown, in another embodiment of the invention, the script automated batch running control system 40 further includes an extraction module 44. The extraction module 44 is used to extract each of the scenarios filled into a preset model independently. Wherein, the horizontal axis of the preset model is sorted according to the order of magnitude of the scenarios, and the vertical axis of the preset model is sorted according to the natural process of each of the scenarios; the extraction module 44 is further used to extract the preset model filled with the scenarios to obtain the scenario storage model, and perform batch running operations on the scenarios based on the preset order of the scenario storage model.
[0087] It should be noted that based on the descriptions of steps S11 to S13, the steps for automated batch running control are specifically described. In this embodiment, the steps for obtaining the scenario storage model are specifically described. Specifically, based on a preset model library, the preset model can be obtained, and then each of the independent scenarios is filled into the preset model to obtain the scenario storage model. Then, batch running operations can be performed on the scenarios based on the preset order of the scenario storage model. Among them, the scenario storage model includes a ladder model. Preferably, the scenario storage model can also be other data filling models, such as a grid model, etc.
[0088] It is worth mentioning that the preset order of the scenario storage model is the natural process order of the case data, that is, the batch running operations are performed in the order of the natural process of the case data. It should be noted that, from top to bottom along the vertical axis of the scenario storage model, the case data encountered first is executed, regardless of the position of the scenario on the horizontal axis of the scenario storage model.
[0089] Further, when the scenario specifically performs the batch running operation, taking Figure 2 the displayed interface as an example, the specific order is as follows:
[0090] (1) First, take the grid from the top layer, such as Figure 2 A1 in
[0091] (2) Execute all the cases in the grid in parallel. After all are executed successfully, take the grid directly below it. For example, directly below A1 is the grid A2, and directly below A2 are the grids A3, B3, and C3. Directly below C3 are the grids A4, B4, C4, and D4;.
[0092] (3) When the grid is taken, process the grid in parallel until it is completely processed. For example, when taking the D scenario and starting from the grid D4, it is not completely processed until batch running reaches the grid D7.
[0093] (4)Summarize the processing results to obtain the batch processing results corresponding to the described scenario. For example, take Scenario D, and the batch processing results corresponding to Scenario D are obtained only after batch processing reaches cell D7.
[0094] Specifically, in an embodiment of the invention, referring to Figure 2 , taking the user information reading scenario as an example, fill the user information reading scenario into Scenario A. Correspondingly, A1 corresponds to "call the interface to identify the user request", A2 corresponds to "identify the user name", A3 corresponds to "identify the user's mobile phone number", A4 corresponds to "return the user information", and then A5 - A7 are blank cells. When performing the batch processing operation, sequentially fetch from A1 to A7. When each cell is fetched, batch process the cases therein until the batch processing is complete. Among them, when batch processing A3, if the corresponding user's mobile phone number cannot be identified, it indicates that the batch processing operation of Scenario A fails, and extract the location information of A3, and issue "Batch processing of A3 fails" as the exception reminder to remind the user that the corresponding case "identify the user's mobile phone number" in cell A3 fails in batch processing and needs to be adjusted. After adjustment, continue to batch process cell A3 until the data in Scenario A are all successfully batch processed, and then clear the data in Scenario A.
[0095] In another embodiment of the invention, referring to Figure 2 , taking the phone bill recharge scenario as an example, fill the order phone bill scenario into Scenario D. Correspondingly, D4 corresponds to "call the interface to identify the user's order command", D5 corresponds to "judge the rechargeable amount", D6 corresponds to "accept the amount and place an order", D7 corresponds to "receive the user's consumption amount to complete the recharge". When performing the batch processing operation, cell A4 and cell D4 are carried out simultaneously. Based on Scenario D for batch processing, sequentially batch process the cases in cells D4 - D7. When all the cases in Scenario D are successfully batch processed, clear the data in Scenario D.
[0096] Those skilled in the art should also understand that Figure 4 and Figure 5 The division of each module in the embodiment is only a logical function division. In actual implementation, it can be fully or partially integrated into one or more physical entities, and these modules can all be implemented in the form of software called by processing elements, or all in the form of hardware, or some modules in the form of software called by processing elements and some modules in the form of hardware.
[0097] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements any one of the described script automated batch processing control methods.
[0098] Refer to Figure 6 , this embodiment provides an electronic device. Specifically, the electronic device at least includes: a memory and a processor connected via a bus. Among them, the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to execute all or part of the steps in the foregoing method embodiments.
[0099] Among them, the memory at least includes one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as: SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory can be an internal storage unit of the electronic device in some embodiments, such as the mobile hard disk of the electronic device. The memory can also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device. Further, the memory can also include both the internal storage unit and the external storage device of the electronic device. The memory can be used not only to store application software installed on the electronic device and various types of data, such as the code of the occupation label establishment program, etc., but also to temporarily store data that has been output or will be output.
[0100] The processor can be composed of integrated circuits in some embodiments. For example, it can be composed of a single packaged integrated circuit, or can also be composed of multiple integrated circuits with the same or different functions packaged, including a combination of one or more Central Processing Units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines, and by running or executing programs or modules (such as the occupation label establishment program, etc.) stored in the memory, and calling the data stored in the memory, to execute various functions of the electronic device and process data.
[0101] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is set to realize the connection and communication between the memory and at least one processor, etc.
[0102] Figure 6 Only an electronic device with components is shown. Those skilled in the art can understand that Figure 6 the shown structure does not constitute a limitation on the electronic device, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0103] For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the at least one processor through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The electronic device may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.
[0104] Furthermore, the electronic device may further include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between this electronic device and other electronic devices.
[0105] Optionally, the electronic device may further include a user interface. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device and to display a visual user interface.
[0106] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0107] The computer program stored in the memory of the electronic device is a combination of multiple instructions. When running in the processor, it can implement:
[0108] Obtain a scenario;
[0109] Fill a scenario storage model based on the scenario to obtain a scenario storage model;
[0110] Perform a batch operation on the scenario based on a preset order of the scenario storage model;
[0111] When it is recognized that the batch processing of a certain scenario fails, the batch processing job corresponding to the scenario is stopped, and an exception reminder is issued.
[0112] Specifically, for the specific implementation method of the above instructions by the processor, reference can be made to Figure 3 the description of the relevant steps in the corresponding embodiments, which will not be elaborated here.
[0113] Furthermore, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).
[0114] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0115] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
[0117] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0118] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, it is intended to cover all changes falling within the meaning and scope of the equivalent elements of the claims in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claimed rights.
[0119] In addition, it is obvious that the term "including" does not exclude other units or steps, and the singular form does not exclude the plural form. A plurality of units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The terms such as "second" are used to denote names and do not denote any particular order.
[0120] In summary, the present invention can reduce the cases of different scenarios to a minimum set, and different sets do not affect each other, thus ensuring that different cases can be executed simultaneously, making the batch running more efficient; and different levels are set to facilitate the access, management and adjustment of cases. After identifying that the cases in the upper level fail in batch running, the subsequent cases do not need to be executed, so as to reduce error propagation and further improve the processing efficiency.
[0121] The above embodiments are only illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A script automation batch running control method, characterized in that, Including: Identifying each scenario based on the horizontal axis of the scenario storage model, and performing synchronous batch processing on each of the scenarios based on the vertical axis of the scenario storage model; wherein, the scenario storage model includes a plurality of grids arranged in sequence, and the grids contain case data corresponding to the scenarios, and the scenario storage model includes a ladder model; When it is identified that the batch processing operation of any one of the scenarios in the scenario storage model is successful, the data in the corresponding position is cleared; When it is identified that the batch processing operation of a certain scenario fails, the batch processing operation corresponding to the scenario is stopped, and modified data is obtained for re-batch processing until the batch processing operation corresponding to the scenario is successful; And, the script automated batch processing control method further includes: Extracting each of the scenarios that are independent of each other to fill the scenario storage model, wherein the horizontal axis of the scenario storage model is sorted according to the order of magnitude of the scenarios, and the vertical axis of the scenario storage model is sorted according to the natural process of each of the scenarios; if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the ladder model, the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the ladder at the data clearing position until all the data in the ladder of the scenario storage model is cleared; Extracting the scenario storage model filled with the scenarios to obtain the scenario storage model, and performing batch processing operations on the scenarios based on the preset order of the scenario storage model.
2. The script automated batch running control method according to claim 1, wherein Identifying whether the batch processing operation corresponding to the current scenario is successful or failed based on the batch processing feedback value, wherein when the batch processing feedback value is a preset value, the corresponding batch processing operation is successful, otherwise the batch processing operation fails.
3. The script automated batch running control method according to claim 1, wherein Obtaining the scenarios and the modified data based on the data packet uploaded by the user, wherein the scenarios are independent of each other.
4. The script automated batch running control method according to claim 1, characterized in that The method further includes visually displaying the scenario storage model.
5. A script automated batch running control system, characterized in that, Including: A batch processing module for identifying each scenario based on the horizontal axis of the scenario storage model and performing synchronous batch processing on each of the scenarios based on the vertical axis of the scenario storage model; wherein, the scenario storage model includes a plurality of grids arranged in sequence, and the grids contain case data corresponding to the scenarios; the scenario storage model includes a ladder model; A clearing module for clearing the data in the corresponding position when it is identified that the batch processing operation of any one of the scenarios in the scenario storage model is successful; A modification module for stopping the batch processing operation corresponding to the scenario when it is identified that the batch processing operation of a certain scenario fails, and obtaining modified data for re-batch processing until the batch processing operation corresponding to the scenario is successful; A first extraction module for extracting each of the scenarios that are independent of each other to fill the scenario storage model, wherein the horizontal axis of the scenario storage model is sorted according to the order of magnitude of the scenarios, and the vertical axis of the scenario storage model is sorted according to the natural process of each of the scenarios; if the order of magnitude of the scenario is higher than the horizontal axis extreme value of the ladder model, the remaining scenarios after subtracting the horizontal axis extreme value are sequentially supplemented into the ladder at the data clearing position until all the data in the ladder of the scenario storage model is cleared; A second extraction module, configured to extract the scene storage model filled with the scene to obtain the scene storage model, and perform a batch operation on the scene based on a preset order of the scene storage model.
6. An electronic device, characterized in that, The electronic device includes: a processor and a memory; wherein, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the script automated batch control method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the script automated batch control method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Interface test method and device, computer equipment and storage medium
CN109597753A
Automatic testing method, device and equipment for multi-task scene and storage medium
CN112328481A