Flow escape automatic testing method, device, storage medium and program product
Patent Information
- Application Number
- CN202211183362.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-09-27
AI Technical Summary
[0004]然而,实现本申请过程中,发明人发现现有技术中至少存在如下问题:现有的测试方式效率较低
[0032]本实施例提供的流程逃逸自动测试方法、设备、存储介质及程序产品,该方法包括获取关联接口的报文,所述关联接口为与其他接口存在关联关系的接口,修改所述报文的参数,并根据修改的参数设置所述关联接口对应的变量,若所述关联接口设置有逃逸环节,则获取所述关联接口对应的待跳转的目标接口,并根据所述变量和所述目标接口设置条件控制器,以基于所述条件控制器跳转至所述目标接口,执行所述目标接口的测试用例,获得响应结果,以根据所述响应结果确定是否逃逸成功。本申请实施例提供的流程逃逸自动测试方法,通过采用变量传参的方式解决接口依赖的问题,进而通过设置条件控制器来实现接口的自由跳转,从而可以实现流程逃逸的自动测试,相对于手工渗透的方式,提高了测试效率。
Smart Images

Figure CN115617654B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to an automatic testing method, device, storage medium, and program product for process escape. Background Technology
[0002] To ensure the security of business processes, it is necessary to test for process escape during security testing.
[0003] In related technologies, manual penetration testing can be used to test whether there is a process escape by capturing the interface to be escaped and trying to modify the parameter values.
[0004] However, in the process of developing this application, the inventors discovered at least the following problems in the prior art: the existing testing methods are inefficient. Summary of the Invention
[0005] This application provides an automated process escape testing method, device, storage medium, and program product to improve the efficiency of process escape testing.
[0006] In a first aspect, embodiments of this application provide an automated process escape testing method, including:
[0007] Obtain the message from the associated interface; the associated interface is an interface that has a relationship with other interfaces.
[0008] Modify the parameters of the message, and set the variables corresponding to the associated interface according to the modified parameters;
[0009] If the associated interface has an escape mechanism, the target interface to be jumped to corresponding to the associated interface is obtained, and a condition controller is set according to the variable and the target interface to jump to the target interface based on the condition controller; the test case of the target interface is executed to obtain the response result, and the escape is determined based on the response result.
[0010] In one possible design, the method further includes:
[0011] Retrieve associated files;
[0012] The associated interface is determined based on the associated file.
[0013] In one possible design, modifying the parameters of the message includes:
[0014] If the message is a modifiable message, then modify the parameters of the message.
[0015] In one possible design, modifying the parameters of the message if it is a modifiable message includes:
[0016] Determine whether the message exists in the pre-selected set of modifiable messages; the set of modifiable messages is determined based on test requirements.
[0017] If it exists, the message is determined to be a modifiable message, and the parameters of the message are modified.
[0018] In one possible design, the method further includes:
[0019] If the associated interface does not have an escape mechanism, then the parent associated interface of the associated interface is determined based on the variable; the variable value is determined based on the parent associated interface; and the test cases of the associated interface are executed based on the variable value to obtain the response result.
[0020] In one possible design, the method further includes:
[0021] Determine whether the next-level associated interface of the associated interface is an interface to be escaped;
[0022] If so, it is determined that the associated interface has an escape mechanism.
[0023] Secondly, embodiments of this application provide an automated process escape testing device, comprising:
[0024] The acquisition module is used to acquire messages from associated interfaces; the associated interfaces are interfaces that have a relationship with other interfaces.
[0025] The modification module is used to modify the parameters of the message and set the variables corresponding to the associated interface according to the modified parameters;
[0026] The jump module is used to, if the associated interface has an escape mechanism, obtain the target interface to be jumped to corresponding to the associated interface, set a condition controller according to the variable and the target interface, and jump to the target interface based on the condition controller; execute the test case of the target interface, obtain the response result, and determine whether the escape was successful based on the response result.
[0027] Thirdly, embodiments of this application provide an automated process escape testing device, comprising: at least one processor and a memory;
[0028] The memory stores computer-executed instructions;
[0029] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the method described in the first aspect above and various possible designs of the first aspect.
[0030] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in the first aspect and various possible designs of the first aspect.
[0031] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect and various possible designs of the first aspect.
[0032] This embodiment provides an automated process escape testing method, device, storage medium, and program product. The method includes obtaining a message from an associated interface (an interface that is related to other interfaces), modifying parameters of the message, and setting variables corresponding to the associated interface based on the modified parameters. If the associated interface has an escape mechanism, the method obtains the target interface to be jumped to, sets a condition controller based on the variables and the target interface, jumps to the target interface based on the condition controller, executes test cases on the target interface, obtains a response result, and determines whether the escape was successful based on the response result. This automated process escape testing method solves the interface dependency problem by using variable parameter passing, and then achieves free interface jumping by setting a condition controller, thereby enabling automated testing of process escape. Compared to manual penetration testing, this method improves testing efficiency. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A schematic diagram illustrating the principle of the automated process escape testing method provided in this application embodiment;
[0035] Figure 2 This is a schematic diagram of the variable parameter passing process provided in the embodiments of this application;
[0036] Figure 3 A flowchart illustrating the automated test method for process escape provided in this application embodiment. Figure 1 ;
[0037] Figure 4 A flowchart illustrating the automated test method for process escape provided in this application embodiment. Figure 2 ;
[0038] Figure 5 A schematic diagram of the structure of the automated process escape testing device provided in the embodiments of this application;
[0039] Figure 6 This is a structural block diagram of the automated process escape testing device provided in an embodiment of this application. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] Explanation of relevant terms:
[0042] Combination: A whole formed by combining several parts or individuals.
[0043] Dependence: One situation is relying on others or things and being unable to be independent or self-sufficient; another situation refers to various things or phenomena being interdependent and inseparable.
[0044] Passing parameters: Passing parameters can include passing by value, passing by address, and passing by reference.
[0045] A variable is an abstract concept in computer languages that stores calculation results or represents values. Variables can be accessed through their names. In imperative languages, variables are usually mutable; however, in purely functional languages, variables may be immutable.
[0046] Escape: During the execution of a business process, some steps are skipped.
[0047] For a software system to implement certain functions, it needs specific business scenarios. These business scenarios are implemented in the backend through a series of functional interfaces. These interfaces, through dependencies and constraints, form different business scenarios within the software system. These different business scenarios, in turn, form the system's business processes through interfaces, thus ensuring the implementation of the software's functions. To ensure the security of these business processes, security testing requires testing for process escape. For example, a query business process includes steps such as login, verification, and query. Each step corresponds to a different interface. Normally, each step must be executed for a query to proceed correctly. If a step, such as verification, is skipped but the query can still be performed (i.e., verification is an escape process), then this indicates a security vulnerability in the business process.
[0048] In related technologies, manual penetration testing can be used to test whether a process escape occurs by capturing the interface to be escaped and attempting to modify parameter values. For example, continuing with a query business process consisting of login, verification, and inquiry, one can enter a username and password on the login interface to access the verification interface. Modifying parameters on the verification interface allows access to the query interface. If access is successful, it indicates that the verification process has escaped, and the query business process has a vulnerability.
[0049] However, among the methods described above, manual testing is less efficient.
[0050] To address the aforementioned technical problems, the inventors of this application discovered that automated testing can be performed using test cases. Furthermore, considering that an obstacle to automated testing of process escape is the requirement to execute closely related interfaces step-by-step, without skipping intermediate business steps, the inventors found that interface dependencies can be resolved by using variable parameter passing. This allows for free interface navigation by setting condition controllers, bypassing intermediate business steps. Based on this, the automated process escape testing method provided in this application resolves interface dependencies by using variable parameter passing and then enables free interface navigation by setting condition controllers, thereby achieving automated testing of process escape. Compared to manual penetration testing, this method improves testing efficiency.
[0051] Figure 1 This is a schematic diagram illustrating the principle of the automated process escape testing method provided in this application embodiment. Figure 1 As shown, the business process includes interfaces A, B, and C. Interfaces A, B, and C are executed sequentially. Parameters can be passed between interfaces A and B via variable passing, and vice versa. Based on this, a condition controller can be designed according to the variables involved in interface B. By setting a condition controller between interfaces A and C, escape testing of interface B can be implemented. Specifically, if interface A can sequentially execute to interface C based on the condition controller, it indicates that interface B has successfully escaped, and the software has a security vulnerability. If execution fails, it indicates that the escape was unsuccessful, and the software has high security.
[0052] Before testing the interfaces involved in the business scenarios within the business process, a preliminary review can be conducted:
[0053] To clearly explain the principle of variable parameter passing, the following will combine... Figure 2 The process of passing parameters to variables is illustrated with an example.
[0054] First, you can analyze the business logic based on the testing requirements and draw a business process diagram.
[0055] Secondly, the various business scenarios for each business process can be organized based on the business process diagram.
[0056] Finally, based on the associated files (including information about each interface), we analyze the function of each interface and compile a list of the dependent interfaces (next-level associated interfaces), the interfaces that are depended upon (previous-level associated interfaces), and the dependency conditions for each interface.
[0057] When performing interface testing based on variable parameter passing:
[0058] Interface test cases extract parameters from the dependent interface, set them as variables, and pass these variables to the dependent interface's methods, thus making the output parameters of the dependent interface become the input parameters of the dependent interface. Figure 2 This is a schematic diagram of the variable parameter passing process provided in an embodiment of this application. For example... Figure 2 As shown, when testing interface 1, it can be determined whether interface 1 has any dependent interfaces. If interface 1 does not have any dependent interfaces, the test cases for interface 1 can be executed. If interface 1 has dependent interfaces, the dependent interface, interface 2, is obtained, its information (such as messages) is extracted, and the variables corresponding to interface 2 are set. Then, the test cases for interface 1 can be executed by referencing variable 2.
[0059] When testing interface 2, we can determine if it has any dependent interfaces. If interface 2 has no dependent interfaces, we execute the test cases for interface 2. If interface 2 has dependent interfaces, we obtain the dependent interface, interface 3, extract its information (e.g., message), set the corresponding variables for interface 3, and then execute the test cases for interface 2 by referencing variable 3. This process can be repeated for testing other interfaces in the business process.
[0060] In this embodiment, the interface dependency problem is solved by passing parameters using variables, which provides a prerequisite for automated testing.
[0061] The technical solutions of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0062] Figure 3 A flowchart illustrating the automated test method for process escape provided in this application embodiment. Figure 1 .like Figure 3 As shown, the method includes:
[0063] 301. Obtain the message of the associated interface; the associated interface is an interface that has an association relationship with other interfaces.
[0064] In this embodiment, an associated interface refers to an interface that has a dependency relationship with other interfaces. For example, if the output of interface 1 is the input of interface 2, then interface 1 and interface 2 are both associated interfaces. Interface 3 is independent and has no association relationship with other interfaces, so interface 3 is a non-associated interface.
[0065] The message may include information such as request headers (request URL, request method, status code, etc.) and request payload (various parameters, such as date, query entries, etc.).
[0066] In some embodiments, step 301 may be preceded by: obtaining an associated file; and determining an associated interface based on the associated file.
[0067] Specifically, each business process has a corresponding associated file, which includes multiple interfaces involved in the business process and the dependencies between these interfaces. By reviewing each interface in the associated file, the dependencies between the interfaces can be determined, and it can be identified which interfaces are independent (i.e., non-associated) and which are associated.
[0068] 302. Modify the parameters of the message, and set the variables corresponding to the associated interface according to the modified parameters.
[0069] Specifically, after obtaining the message from the associated interface, the parameters in the message can be modified, and variables can be set for the parameters. For example, taking the associated interface as a shopping order interface, its message includes parameters such as the purchased items, their corresponding quantities, and amounts. Taking the amount as an example, the parameter amount can be modified, and variables can be set for this parameter.
[0070] In some embodiments, modifying the parameters of the message may include: if the message is a modifiable message, then modifying the parameters of the message.
[0071] In some embodiments, modifying the parameters of a message if it is a modifiable message includes: determining whether the message exists in a pre-obtained set of modifiable messages; the set of modifiable messages is determined according to test requirements; if it exists, the message is determined to be a modifiable message, and the parameters of the message are modified.
[0072] 303. If the associated interface has an escape mechanism, obtain the target interface to be jumped to corresponding to the associated interface, and set a condition controller according to the variable and the target interface to jump to the target interface based on the condition controller; execute the test case of the target interface to obtain the response result, and determine whether the escape was successful based on the response result.
[0073] Specifically, during the interface analysis process, it can be determined which interfaces need to be tested for escapability, i.e., escapability steps can be set. For example, considering interfaces 1, 2, and 3 connected sequentially in a business process, if interface 2 is the interface to be tested for escapability, then after modifying the message of interface 1, it can be determined whether the next interface after interface 1, interface 2, is the interface to be tested for escapability. If so, it is determined that interface 1 has an escapability step. Therefore, the target jump interface of this escapability step can be further determined, i.e., interface 3. Of course, an escapability step can also include multiple interfaces. Taking interfaces 1 to 4 as an example, interfaces 2 and 3 can both be set as escapability steps, and in this case, the target interface is interface 4.
[0074] Once the target interface is determined, condition controllers can be set based on the variables of the target interface and related interfaces. Taking the business process from interface 1 to interface 3, with interface 2 as an escape stage, as an example, you can refer to... Figure 1 Based on the variable parameter passing between interface 1 and interface 2, and the variable parameter passing between interface 2 and interface 3, a condition controller is used to jump from interface 1 to interface 3.
[0075] In some embodiments, the method may further include: if the associated interface does not have an escape mechanism, determining the parent associated interface of the associated interface based on the variable; determining the variable value based on the parent associated interface; and executing test cases of the associated interface based on the variable value to obtain a response result.
[0076] In some embodiments, the method may further include: determining whether the next-level associated interface of the associated interface is an interface to be escaped; if so, determining that the associated interface is equipped with an escape mechanism.
[0077] The automated process escape testing method provided in this embodiment solves the interface dependency problem by using variable parameter passing, and then realizes free interface jump by setting condition controllers, thereby achieving automated testing of process escape. Compared with manual penetration testing, this method improves testing efficiency.
[0078] Figure 4 A flowchart illustrating the automated test method for process escape provided in this application embodiment. Figure 2 .like Figure 4 As shown, the method includes:
[0079] 401. Obtain the associated file.
[0080] 402. Determine the associated interface based on the associated file.
[0081] 403. Obtain the message of the associated interface; the associated interface is an interface that has an association relationship with other interfaces.
[0082] 404. Determine whether the message is a modifiable message. If yes, proceed to step 405; otherwise, proceed to step 409.
[0083] 405. Modify the parameters of the message, and set the variables corresponding to the associated interface according to the modified parameters.
[0084] 406. Determine if the associated interface has an escape mechanism. If yes, proceed to step 407; otherwise, proceed to step 408.
[0085] 407. Obtain the target interface to be jumped to corresponding to the associated interface, and set a condition controller according to the variable and the target interface, so as to jump to the target interface based on the condition controller; execute the test case of the target interface, obtain the response result, and determine whether the escape was successful based on the response result.
[0086] 408. Determine the parent interface of the associated interface based on the variable; determine the variable value based on the parent interface; execute the test case of the associated interface based on the variable value to obtain the response result.
[0087] 409. Execute the test cases of the associated interface and obtain the response results.
[0088] Specifically, each business process has a corresponding associated file, which includes multiple interfaces involved in the business process and the dependencies between these interfaces. By reviewing the interfaces in the associated file, the dependencies between them can be determined, identifying which interfaces are independent (non-associated) and which are associated. Upon obtaining the message from the associated interface, it can be first determined whether the message is modifiable. If so, the parameters in the message can be modified, and variables can be set for these parameters. For example, taking a shopping order interface as an associated interface, its message includes parameters such as the purchased items, their quantity, and the amount. Taking the amount as an example, the parameter "amount" can be modified, and variables can be set for this parameter.
[0089] After modifying the message, further determine whether the associated interface is an escape route. If so, a condition controller can be set, and the target interface to be redirected to can be specified. The test cases for the associated interface of the next-level interface are executed, and the response is processed and assigned to variables. If no escape route exists, the parent associated interface from which the variable originates can be identified, and the method of obtaining the variable value can be determined. The test cases for the parent associated interface are executed, and the response is processed and assigned to variables. Finally, the test cases for the associated interface are executed to obtain the response result.
[0090] The automated process escape testing method provided in this embodiment solves the interface dependency problem by using variable parameter passing, and then realizes free interface jump by setting condition controllers, thereby achieving automated testing of process escape. Compared with manual penetration testing, this method improves testing efficiency.
[0091] Figure 5 This is a schematic diagram of the structure of the automated process escape testing device provided in an embodiment of this application. Figure 5 As shown, the automated test device 50 for process escape includes: an acquisition module 501, a modification module 502, and a jump module 503.
[0092] The acquisition module 501 is used to acquire messages from associated interfaces; the associated interface is an interface that has an association relationship with other interfaces.
[0093] Modification module 502 is used to modify the parameters of the message and set the variables corresponding to the associated interface according to the modified parameters;
[0094] The jump module 503 is used to, if the associated interface is configured with an escape mechanism, obtain the target interface to be jumped to corresponding to the associated interface, set a condition controller according to the variable and the target interface, jump to the target interface based on the condition controller, execute the test case of the target interface, obtain the response result, and determine whether the escape was successful based on the response result.
[0095] The automated process escape testing device provided in this application solves the interface dependency problem by using variable parameter passing, and then realizes free interface jump by setting a condition controller, thereby realizing automated testing of process escape. Compared with manual penetration testing, it improves testing efficiency.
[0096] The automatic process escape testing device provided in this application embodiment can be used to execute the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0097] Figure 6 This is a structural block diagram of an automated process escape testing device provided in an embodiment of this application. The device may be a computer, server, tablet, etc.
[0098] Device 60 may include one or more of the following components: processing component 601, memory 602, power supply component 603, multimedia component 604, audio component 605, input / output (I / O) interface 606, sensor component 607, and communication component 608.
[0099] Processing component 601 typically controls the overall operation of device 60, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 601 may include one or more processors 609 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 601 may include one or more modules to facilitate interaction between processing component 601 and other components. For example, processing component 601 may include a multimedia module to facilitate interaction between multimedia component 604 and processing component 601.
[0100] Memory 602 is configured to store various types of data to support the operation of device 60. Examples of such data include instructions for any application or method operating on device 60, contact data, phonebook data, messages, pictures, videos, etc. Memory 602 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0101] Power supply component 603 provides power to the various components of device 60. Power supply component 603 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 60.
[0102] Multimedia component 604 includes a screen that provides an output interface between the device 60 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 604 includes a front-facing camera and / or a rear-facing camera. When the device 60 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0103] Audio component 605 is configured to output and / or input audio signals. For example, audio component 605 includes a microphone (MIC) configured to receive external audio signals when device 60 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 602 or transmitted via communication component 608. In some embodiments, audio component 605 also includes a speaker for outputting audio signals.
[0104] I / O interface 606 provides an interface between processing component 601 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0105] Sensor assembly 607 includes one or more sensors for providing state assessments of various aspects of device 60. For example, sensor assembly 607 can detect the on / off state of device 60, the relative positioning of components such as the display and keypad of device 60, changes in the position of device 60 or a component of device 60, the presence or absence of user contact with device 60, the orientation or acceleration / deceleration of device 60, and temperature changes of device 60. Sensor assembly 607 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 607 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 607 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0106] Communication component 608 is configured to facilitate wired or wireless communication between device 60 and other devices. Device 60 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 608 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 608 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0107] In an exemplary embodiment, device 60 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0108] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 602 including instructions, which can be executed by a processor 609 of the device 60 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0109] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0110] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0111] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0112] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements the process escape automatic testing method executed by the above-mentioned process escape automatic testing device.
[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An automatic testing method for process escape, characterized in that, include: Obtain the associated files corresponding to the business process, wherein the associated files include multiple interfaces involved in the business process; Determine the relationships between the interfaces to identify the associated interfaces; Obtain the message from the associated interface; When the message exists in the pre-obtained set of modifiable messages, the parameters included in the message are modified, and the set of modifiable messages is determined according to the test requirements; and the variables corresponding to the associated interface are set according to the modified parameters. Determine whether the next-level associated interface of the associated interface is an interface to be escaped; if so, determine that the associated interface has an escape mechanism, obtain the target interface to be jumped to corresponding to the associated interface, the target interface is the next-level associated interface of the interface to be escaped; and set a condition controller according to the variable and the target interface, so as to jump to the target interface based on the condition controller. Execute the test cases of the target interface to obtain the response results, and determine whether the escape was successful based on the response results.
2. The method according to claim 1, characterized in that, The method further includes: If the associated interface does not have an escape mechanism, then the parent associated interface of the associated interface is determined based on the variable; the variable value is determined based on the parent associated interface; and the test cases of the associated interface are executed based on the variable value to obtain the response result.
3. An automatic testing device for process escape, characterized in that, include: The acquisition module is used to acquire the associated files corresponding to the business process, and the associated files include multiple interfaces involved in the business process; Determine the relationships between the interfaces to identify the associated interfaces; Obtain the message from the associated interface; The modification module is used to modify the parameters included in the message when the message exists in a pre-sorted set of modifiable messages, wherein the set of modifiable messages is determined according to test requirements; and to set the variables corresponding to the associated interface according to the modified parameters. The jump module is used to determine whether the next-level associated interface of the associated interface is an interface to be escaped; if so, it is determined that the associated interface has an escape mechanism, and the target interface to be jumped to corresponding to the associated interface is obtained, the target interface being the next-level associated interface of the interface to be escaped; and a condition controller is set according to the variable and the target interface, and the jump is made to the target interface based on the condition controller. Execute the test cases of the target interface to obtain the response results, and determine whether the escape was successful based on the response results.
4. An automatic testing device for process escape, characterized in that, include: At least one processor and memory; The memory stores computer-executed instructions; The at least one processor executes the computer execution instructions stored in the memory, causing the at least one processor to perform the automated process escape test method as described in claim 1 or 2.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by the processor, implement the automatic process escape testing method as described in claim 1 or 2.
6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the automatic process escape testing method as described in claim 1 or 2.
Citation Information
Patent Citations
Software automation test method, device and equipment and storage medium
CN112579452A
Full-link interface test method and device, electronic equipment and storage medium
CN114579469A
Anti-malware system with evasion code detection and rectification
US10162966B1
