Test script processing method and device
Automatic verification of test scripts by configuring the script debugger solves the problems of insufficient efficiency and accuracy caused by manual configuration and manual operations in the existing technology, achieves high-precision and efficient test script verification, and meets the needs of automated testing. .
Patent Information
- Application Number
- CN202410620104.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The verification process of existing test scripts relies on manual configuration and manual operations, resulting in insufficient efficiency and accuracy, and cannot effectively meet the needs of automated testing.
By configuring the script debugger, obtain the recorded initial test script and import the pre-configured debugger, use the built-in debugging strategy and software development tool kit for script debugging, optimize the test script to achieve correctness verification, and output the optimized target test script .
It achieves high-precision and efficient test script verification, meets the requirements for automated testing based on test scripts, and improves test quality.
Smart Images

Figure CN118550822A
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing, and in particular to a method and device for processing a test script. Background Art
[0002] In the application service development work, the testing phase is one of the important links. Only through testing can we know whether the current application service meets the expected requirements. If not, it is obviously necessary to return for improvement. In the end, we can obtain a tested and relatively complete application service.
[0003] Today, test scripts are widely used. Test scripts automatically execute pre-configured automated test logic to perform automated testing on current application services to meet testing requirements. However, in this case, if the test script is to perform automated testing normally, it means that the test script itself must be normal, that is, the test script needs to be able to run normally. However, the inventors of the present application have discovered that test scripts are usually manually configured by staff, and the verification of test scripts is also manually performed by staff, which will obviously be accompanied by defects in processing efficiency and processing accuracy due to manual operation. Summary of the invention
[0004] The present application provides a test script processing method and device, which are used to achieve high-precision and efficient test script verification effect by configuring a script debugger under the goal of automated verification of the test script, thereby helping to meet the automated testing requirements based on the test script with high quality.
[0005] In a first aspect, the present application provides a method for processing a test script, the method comprising:
[0006] The processing device obtains the recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object, so as to test the system performance of the system under test under a corresponding test benchmark;
[0007] The processing device imports the initial test script into a pre-configured script debugger, so that the script debugger performs script debugging according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements component functions by calling a corresponding software development kit during the working process;
[0008] The processing device extracts the target test script output by the script debugger, after which the initial test script is optimized.
[0009] In combination with the first aspect of the present application, in a first possible implementation method of the first aspect of the present application, the debugging strategy built into the script debugger debugs the execution logic or script parameters of the input test script based on the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
[0010] In combination with the first possible implementation of the first aspect of the present application, in the second possible implementation of the first aspect of the present application, the expected operating parameters are specifically the expected operating parameters of the general test script pre-configured by the script debugger.
[0011] In combination with the first possible implementation method of the first aspect of the present application, in the third possible implementation method of the first aspect of the present application, the expected operating parameters are specifically matched by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters for different types of test scripts.
[0012] In combination with the first possible implementation of the first aspect of the present application, in a fourth possible implementation of the first aspect of the present application, the method further includes:
[0013] The processing device obtains the expected operating parameters corresponding to the initial test script;
[0014] The processing device imports the expected operating parameters into the pre-configured script debugger.
[0015] In a second aspect, the present application provides a test script processing device, the device comprising:
[0016] An acquisition unit is used to acquire a recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object, so as to test the system performance of the system under test under a corresponding test benchmark;
[0017] A debugging unit, used for importing the initial test script into a pre-configured script debugger, so that the script debugger debugs the script according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements the component function by calling the corresponding software development kit during the working process;
[0018] The extraction unit is used for extracting the target test script which is the result of optimizing the initial test script output by the script debugger.
[0019] In combination with the second aspect of the present application, in a first possible implementation method of the second aspect of the present application, the debugging strategy built into the script debugger debugs the execution logic or script parameters of the input test script based on the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
[0020] In combination with the first possible implementation of the second aspect of the present application, in the second possible implementation of the second aspect of the present application, the expected operating parameters are specifically the expected operating parameters of the general test script pre-configured by the script debugger.
[0021] In combination with the first possible implementation method of the second aspect of the present application, in the third possible implementation method of the second aspect of the present application, the expected operating parameters are specifically matched by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters for different types of test scripts.
[0022] In combination with the first possible implementation of the second aspect of the present application, in a fourth possible implementation of the second aspect of the present application, the acquiring unit is further configured to:
[0023] Obtain the expected running parameters corresponding to the initial test script;
[0024] Imports expected run parameters into a pre-configured script debugger.
[0025] In a third aspect, the present application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method provided in the first aspect of the present application or any possible implementation method of the first aspect of the present application is executed.
[0026] In a fourth aspect, the present application provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the method provided by the first aspect of the present application or any possible implementation of the first aspect of the present application.
[0027] From the above content, it can be concluded that the present application has the following beneficial effects:
[0028] Under the goal of automated verification of test scripts, this application obtains the recorded initial test script by the processing device, and then imports the initial test script into a pre-configured script debugger, so that the script debugger debugs the script according to the built-in debugging strategy to pass the correctness check. Then, the target test script that is optimized from the initial test script output by the script debugger can be extracted. In this processing process, by configuring a script debugger, a high-precision and efficient test script verification effect can be achieved, which helps to meet the automated testing requirements based on test scripts with high quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A schematic diagram of a scenario for processing a test script for this application;
[0031] Figure 2 A flowchart of a method for processing a test script for this application;
[0032] Figure 3 A schematic diagram of the structure of a processing device for the test script of this application;
[0033] Figure 4 A schematic diagram of the structure of the processing equipment of this application. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0035] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0036] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0037] Before introducing the test script processing method provided by the present application, the background content involved in the present application is first introduced.
[0038] The test script processing method, device and computer-readable storage medium provided in the present application can be applied to a processing device, and can be used to achieve high-precision and efficient test script verification effects by configuring a script debugger under the goal of automated verification of the test script, thereby helping to meet the automated testing requirements based on the test script with high quality.
[0039] The test script processing method mentioned in this application can be executed by a test script processing device, or a server, physical host or user equipment (UE) and other different types of processing devices integrated with the test script processing device. The test script processing device can be implemented in hardware or software, and the UE can be a terminal device such as a smart phone, tablet computer, laptop computer, desktop computer or personal digital assistant (PDA), and the processing device can be set in a device cluster.
[0040] Among them, it can be understood that the processing device that executes the processing method of the test script of the present application or the application service equipped with the processing method of the test script of the present application, considering that the focus of the present application scheme is on the secondary processing of existing / ready-made test scripts, therefore, it is only necessary to meet the requirements of the corresponding data processing capabilities, and there is no specific limitation on the specific device form. A typical example is the physical host at hand of the staff in the software development work. If it also involves recording test scripts or initiating specific test processing based on test scripts, the processing device needs to be more adaptively adjusted according to the actual situation to adapt to the specific application scenario. For example, the processing device can be a test device that takes into account initiating tests, recording test scripts and secondary processing of test scripts. For example, the processing device can be a device cluster of a first processing device that initiates tests and records test scripts and a second processing device that secondary processes test scripts.
[0041] Next, we will introduce the processing method of the test script provided by this application.
[0042] First, see Figure 1 A schematic diagram of a scenario of the processing method of the test script of the present application is shown. Figure 1 Based on this, continue to refer to Figure 2 , Figure 2 A flowchart of a method for processing a test script of the present application is shown. The method for processing a test script provided by the present application may specifically include the following steps S201 to S203:
[0043] Step S201, the processing device obtains a recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object, so as to test the system performance of the system under test under a corresponding test benchmark;
[0044] It can be understood that the test script involved in the present application is an execution script that initiates automated testing of the system under test under the corresponding test benchmark, by simulating different user operations that may be involved in the actual use of the system under test to observe the response of the system under test, so as to obtain the specific performance of the system under test.
[0045] Among them, the specific system types and test benchmarks involved can obviously be flexibly adjusted according to actual needs in specific operations. Therefore, this application does not make specific restrictions.
[0046] For the convenience of explanation, the test script obtained in step S201 here is recorded as the initial test script, wherein the acquisition process of the initial test script can, on the one hand, be completed by local retrieval. For example, the local processing device itself will perform the recording operation of the test script under the task arrangement, so that the previously recorded initial test script can be retrieved. For example, the initial test script has been received / retrieved from the outside of the device and stored, so that the initial test script previously recorded by other devices can be retrieved. On the other hand, the initial test script can be obtained by manual entry. On the other hand, the initial test script can be obtained by real-time reception / retrieval from other devices. The specific settings can be adaptive according to actual needs.
[0047] Step S202, the processing device imports the initial test script into a pre-configured script debugger, so that the script debugger performs script debugging according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements component functions by calling a corresponding software development kit during the working process;
[0048] It can be seen that, in order to realize the automatic verification of the test script, the present application specially configures a script debugger, which is pre-packaged as a software development kit by the corresponding application service.
[0049] Among them, the software development kit, namely Software Development Kit, SDK, the setting of the software development kit helps to implant corresponding, ready-made application services into different applications, and has the characteristics of convenient development and convenient application. Considering that the software development kit is a more common setting in software development work, it will not be explained in detail here. In this way, using the script debugger by calling the software development kit will help to apply the script debugger more flexibly and achieve the test script processing effect involved in this application.
[0050] As the name suggests, the function of the script debugger is to debug the input test script. During the debugging process, it is necessary to verify whether the input test script can pass the correctness check. If it cannot pass the correctness check content specified by the pre-configured correctness check rules, it is necessary to automatically debug the test script against the check results, so that the test script can finally pass the correctness check.
[0051] Among them, the correctness check may involve checking whether there are any anomalies in the file content of the input test script, whether the input test script can run normally, whether the test results of the input test script meet expectations, and other verification contents.
[0052] In this way, after obtaining the initial test script to be processed, it can be input into the script debugger designed in this application, so that the script debugger recognizes the initial test script as a debugging object and carries out specific debugging work to achieve the optimization goal of the initial test script.
[0053] Step S203, the processing device extracts the target test script output by the script debugger, which is the result of optimizing the initial test script.
[0054] After the initial test script has been debugged normally through the script debugger, the script debugger can output the test script obtained after one or more rounds of debugging.
[0055] For the convenience of explanation, the test script that has completed the debugging work or is finally output by the script debugger is recorded as the target test script.
[0056] In this case, the target test script output by the script debugger after the initial test script is optimized / debugged can be extracted, and at this time, the target test script can be stored locally.
[0057] It is understandable that, once the target test script is obtained, the data processing work involved in the target test script can be continued according to the corresponding processing requirements. For example, the target test script can be simply stored locally or remotely, or the corresponding automated system test tasks can be carried out based on the target test script. For example, reminder messages are pushed to the staff through the corresponding push channels to remind them that the debugging of the initial test script has been completed. Further, it can also remind whether to advance automated operations such as storing or executing automated test tasks based on the initial test script, thereby achieving the effect of user confirmation.
[0058] from Figure 1It can be seen from the illustrated embodiment that, under the goal of automated verification of the test script, after the processing device obtains the recorded initial test script, the application imports the initial test script into a pre-configured script debugger, so that the script debugger debugs the script according to the built-in debugging strategy so that it passes the correctness check. Then, the target test script output by the script debugger and optimized from the initial test script can be extracted. In this processing process, by configuring a script debugger, a high-precision and efficient test script verification effect can be achieved, which helps to meet the automated testing requirements based on test scripts with high quality.
[0059] Next, we will continue to Figure 1 Each step of the illustrated embodiment and possible implementation methods thereof in practical applications are described in detail.
[0060] Focusing on the script debugging specially configured in the present application, as an exemplary embodiment, the debugging strategy built into the script debugger of the present application can specifically debug the execution logic or script parameters of the input test script according to the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
[0061] It can be understood that in the embodiment here, it means that the script debugger designed by the present application will run the test script during the debugging process, so that the running parameters of the initial test script can be observed and the specific debugging processing can be carried out according to the running parameters of the initial test script.
[0062] In this case, the script debugger can be specifically configured with expected running parameters, which are obviously the results that the script debugger hopes to obtain after debugging the input test script. In this way, the script debugger can compare the running parameters of the currently input test script with the expected running parameters, and observe the differences between the two, so as to debug the execution logic or script parameters of the currently input test script according to the observed differences, thereby continuously iterating and optimizing the test script through multiple rounds of debugging, so that the running parameters of the test script are equal to the expected running parameters.
[0063] Among them, it should be noted that, in actual situations, after debugging, the running parameters of the test script usually continue to approach the expected running parameters, and may not completely meet the expected running parameters, so an equivalent strategy can be used to determine whether the debugging work is completed.
[0064] The operating parameters involved are easy to understand and can be quantified using corresponding operating indicators, such as reading efficiency, operating efficiency, code length, number of bugs, etc. Specific indicators can be flexibly configured.
[0065] The acquisition process of the running parameters of the currently input test script can be observed during the running process of the test script, or can be observed based on the running results left after the test script is run, which can be configured according to the actual situation.
[0066] Further, with respect to the expected operating parameters adopted by the present application for the initial test script in the above content, as another exemplary embodiment, the expected operating parameters adopted by the present application for the initial test script may specifically be the expected operating parameters of the general test script pre-configured by the script debugger.
[0067] It can be understood that configuring the expected operating parameters to be fixed can bring about a simpler processing effect in actual applications, which not only facilitates reducing configuration costs, but also helps to quickly debug different input test scripts towards the same standardized test script direction.
[0068] In addition, on the basis of implementing fixed, preset expected operating parameters, a matching mechanism can also be introduced to facilitate differentiated debugging effects for different types of test scripts in actual situations in order to obtain more adapted and better debugging effects.
[0069] Correspondingly, as another exemplary embodiment, the expected operating parameters adopted by the initial test script of the present application can also be specifically matched by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters of different types of test scripts.
[0070] It can be understood that the script type to which the test script belongs can be reflected in the type identifier carried by the script's description information. In specific operations, the type identifier can be identified by the script debugger itself when it receives the currently input test script, or it can be input into the script debugger together with the test script after extracting the type identifier of the test script to be processed. In this way, the script debugger also learns the corresponding type of the script when it receives the currently input test script.
[0071] In this way, the matching mechanism between different types of test scripts and different expected operating parameters can help the script debugger to carry out more matching debugging work and help achieve more accurate and efficient script debugging results.
[0072] At the same time, the expected operating parameters used by the initial test script may be pre-configured by the script debugger itself or may be imported into the script debugger along with the local test script debugging task. In this regard, as another exemplary embodiment, the method of the present application may further include:
[0073] The processing device obtains the expected operating parameters corresponding to the initial test script;
[0074] The processing device imports the expected operating parameters into the pre-configured script debugger.
[0075] Among them, it can be understood that the expected running parameters corresponding to the initial test script can be identified in the form of running parameter identification, similar to the setting of the type identification of the script type of the initial test script, so that it can be conveniently input into the script debugger together with the test script, so that the script debugger also learns the expected running parameters corresponding to the script when receiving the currently input test script.
[0076] Alternatively, the expected operating parameters involved in the present application can also be set using corresponding text descriptions, and the script debugger can involve keyword recognition processing, thereby determining the expected operating parameters corresponding to the currently input test script through keyword recognition, wherein the keywords involved are mainly related to specific operating indicators that reflect the operating parameters, or are directly the operating indicators themselves.
[0077] At the same time, the acquisition process of the expected operating parameters corresponding to the initial test script here can be to obtain the expected operating parameters together with the initial test script. That is to say, the expected operating parameters are obtained during the processing of the initial test script. When recording the initial test script, it is naturally possible to learn the real user operations, operation processes and operation results involved, and these can be organized into expected operating parameters for use in the debugging work of the script debugger. This forms a feature that meets the script recording situation (high adaptation), and compared with the conventional (general) setting of the expected operating parameters, it can also bring the advantage of higher precision.
[0078] In addition, under the idea of automated debugging of test scripts, the inventor of the present application also believes that the acquisition and processing of the expected operating parameters corresponding to the initial test script can also be completed by manual entry operations in real time. Compared with the above-mentioned automatic setting of recording the expected operating parameters when recording the initial test script, it is also helpful to fine-tune the expected operating parameters in details, such as appropriately lowering the corresponding values of individual operating indicators, or appropriately increasing the corresponding values of individual operating indicators. Compared with the conventional, preset, and relatively unchanged expected operating parameters, the debugging details of the script debugger can be more flexibly configured according to the real-time situation.
[0079] In this regard, as another exemplary embodiment, in the above embodiment, the processing device obtains the expected operating parameters corresponding to the initial test script, which may specifically include:
[0080] The processing device receives the expected operating parameters manually entered by the user for the initial test script.
[0081] Among them, the user (staff) can conveniently and intuitively enter the expected operating parameters corresponding to this initial test script through the input window or button of the visualization window, or the user (staff) can conveniently and intuitively enter the expected operating parameters corresponding to this initial test script by filling in the code / modifying the code.
[0082] At the same time, it is also worth adding that with the introduction of a mechanism for manually setting the expected operating parameters corresponding to the initial test script, compared to the conventional, preset, relatively unchanged expected operating parameters under the automated setting mechanism, during the debugging of the initial test script, it is also possible to manually adjust / update the expected operating parameters corresponding to the initial test script dynamically to meet the real-time needs of dynamically adapting to better debugging effects, which is obviously difficult to achieve with the automated setting mechanism.
[0083] The above is an introduction to the test script processing method provided by the present application. In order to better implement the test script processing method provided by the present application, the present application also provides a test script processing device from the perspective of functional modules.
[0084] See also Figure 3 , Figure 3 This is a schematic diagram of a structure of a test script processing device of the present application. In the present application, the test script processing device 300 may specifically include the following structure:
[0085] The acquisition unit 301 is used to acquire the recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object to test the system performance of the system under test under a corresponding test benchmark;
[0086] The debugging unit 302 is used to import the initial test script into a pre-configured script debugger, so that the script debugger performs script debugging according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements component functions by calling a corresponding software development kit during the working process;
[0087] The extraction unit 303 is used to extract the target test script output by the script debugger after the initial test script is optimized.
[0088] In an exemplary embodiment, the debugging strategy built into the script debugger debugs the execution logic or script parameters of the input test script based on the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
[0089] In yet another exemplary embodiment, the expected operating parameters are specifically expected operating parameters of a general test script preconfigured by the script debugger.
[0090] In another exemplary embodiment, the expected operating parameters are specifically obtained by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters of different types of test scripts.
[0091] In another exemplary embodiment, the acquiring unit 301 is further configured to:
[0092] Obtain the expected running parameters corresponding to the initial test script;
[0093] Imports expected run parameters into a pre-configured script debugger.
[0094] This application also provides a processing device from the perspective of hardware structure, see Figure 4 , Figure 4 401, a computer program stored in the memory 402, and an input / output device 403. The processor 401 is used to execute the computer program stored in the memory 402. Figure 1 The steps of the method for processing the test script in the corresponding embodiment; or, the processor 401 is used to execute the computer program stored in the memory 402 to implement the following Figure 3 Corresponding to the functions of each unit in the embodiment, the memory 402 is used to store the processor 401 executing the above Figure 1 The computer program required for the test script processing method in the corresponding embodiment.
[0095] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 402, and executed by the processor 401 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0096] The processing device may include, but is not limited to, a processor 401, a memory 402, and an input / output device 403. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include a network access device, a bus, etc., and the processor 401, the memory 402, the input / output device 403, etc. are connected via a bus.
[0097] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire device.
[0098] The memory 402 can be used to store computer programs and / or modules. The processor 401 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 402 and calling the data stored in the memory 402. The memory 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the processing device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0099] When the processor 401 is used to execute the computer program stored in the memory 402, the following functions can be implemented:
[0100] The processing device obtains the recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object, so as to test the system performance of the system under test under a corresponding test benchmark;
[0101] The processing device imports the initial test script into a pre-configured script debugger, so that the script debugger debugs the script according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements the component function by calling the corresponding software development kit during the working process;
[0102] The processing device extracts the target test script output by the script debugger, after which the initial test script is optimized.
[0103] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the test script processing device, processing equipment and corresponding units described above can refer to the following. Figure 1 The description of the processing method of the test script in the corresponding embodiment will not be repeated here.
[0104] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0105] To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 The steps of the method for processing the test script in the corresponding embodiment, the specific operations can refer to the following Figure 1 The description of the processing method of the test script in the corresponding embodiment will not be repeated here.
[0106] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0107] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 The steps of the method for processing the test script in the corresponding embodiment, therefore, the present application can be implemented as follows Figure 1 The beneficial effects that can be achieved by the test script processing method in the corresponding embodiment are detailed in the previous description and will not be repeated here.
[0108] The above is a detailed introduction to the test script processing method, apparatus, processing equipment and computer-readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing a test script, characterized in that: The method comprises: The processing device obtains a recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object to test the system performance of the system under test under a corresponding test benchmark; The processing device imports the initial test script into a pre-configured script debugger, so that the script debugger performs script debugging according to a built-in debugging strategy to pass the correctness check, wherein the script debugger implements component functions by calling a corresponding software development kit during the working process; The processing device extracts a target test script output by the script debugger and obtained by optimizing the initial test script.
2. The method according to claim 1, characterized in that The debugging strategy built into the script debugger debugs the execution logic or script parameters of the input test script based on the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
3. The method according to claim 2, characterized in that The expected operating parameters are specifically the expected operating parameters of the general test script pre-configured by the script debugger.
4. The method according to claim 2, characterized in that: The expected operating parameters are specifically obtained by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters of different types of test scripts.
5. The method according to claim 2, characterized in that: The method further comprises: The processing device obtains the expected operating parameters corresponding to the initial test script; The processing device imports the expected operating parameters into the pre-configured script debugger.
6. A test script processing device, characterized in that: The device comprises: An acquisition unit, used for acquiring a recorded initial test script, wherein the initial test script is used to initiate an automated test with a specific system under test as a test object, so as to test the system performance of the system under test under a corresponding test benchmark; A debugging unit, used for importing the initial test script into a pre-configured script debugger, so that the script debugger performs script debugging according to a built-in debugging strategy so as to pass the correctness check, wherein the script debugger implements component functions by calling a corresponding software development kit during the working process; The extraction unit is used to extract the target test script output by the script debugger after the initial test script is optimized.
7. The device according to claim 6, characterized in that The debugging strategy built into the script debugger debugs the execution logic or script parameters of the input test script based on the difference between the running parameters of the input test script and the expected running parameters, so that the running parameters of the debugged test script are equal to the expected running parameters.
8. The device according to claim 7, characterized in that The expected operating parameters are specifically the expected operating parameters of the general test script pre-configured by the script debugger.
9. The device according to claim 7, characterized in that The expected operating parameters are specifically obtained by the script debugger from a pre-configured operating parameter set according to the initial test script, and the operating parameter set includes expected operating parameters of different types of test scripts.
10. The device according to claim 7, characterized in that The acquisition unit is further used for: Obtaining the expected operating parameters corresponding to the initial test script; The expected running parameters are imported into the pre-configured script debugger.
Citation Information
Patent Citations
Method and device for testing webpage performances
CN106681926A
Automatic testing method and device for application program, computer equipment and storage medium
CN117056221A
Test script generation method and device based on coding template and processing equipment
CN117743145A
Method, apparatus, device, and storage medium for making test page script
WO2020233053A1
