Test Method, Device, Computing Device and Storage Medium for Detecting Application Abnormalities

By building a data object model and generating simulated data, the method of detecting application exceptions solves the inefficiency problem in the existing technology, realizes the ability to quickly detect application exceptions, and reduces the complexity and cost of writing test cases.

CN114968762BActive Publication Date: 2025-06-27HAINAN CHEZHIYITONG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210383803.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-12
Publication Date
2025-06-27
Estimated Expiration
2042-04-12

AI Technical Summary

Technical Problem

The prior art is inefficient in detecting application abnormalities, requires a large number of test samples, which takes time and cannot meet the iteration requirements, and there are a large number of invalid samples in the actual samples.

Method used

By building the data object sets of each request interface of the application, and building the data object model sets based on these data object sets. When the application receives a data request, it uses the data object model corresponding to the target request interface to generate simulation data and returns it to the target request interface for response to detect whether an exception has occurred in the application.

Benefits of technology

By randomly generating the structure of data objects, each request can decouple user requests and data return, reducing the complexity and cost of writing test cases and improving writing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968762B_ABST
    Figure CN114968762B_ABST
Patent Text Reader

Abstract

The present invention discloses a test method, device, computing device and storage medium for detecting application anomalies. The test method for detecting application anomalies is executed in a computing device, and the method includes: constructing a data object set for each request interface of the application, wherein the attribute information of each data object in the data object set is different; constructing a data object model set according to each data object set; when it is monitored that the application receives a data request, determining a target request interface; generating simulated data by using the data object model corresponding to the target request interface; returning the simulated data to the target request interface for response, and detecting whether the application has anomalies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a test method, device, computing device and storage medium for detecting application anomalies. Background Art

[0002] Anomalies or white screens of applications (such as APPs) arranged on terminals or terminals (such as PCs) are generally caused by the data attributes of the data returned by the request interfaces exceeding the logic of the existing processing code. The data generally returned by the request interfaces is assembled from the data defined by the present system or by calling the interfaces of other systems. In other words, the data attributes of the data returned by the request interfaces are uncertain.

[0003] In the prior art, generally, a large number of test samples are used to traverse the application terminals to detect such anomalies. However, this method is extremely inefficient. It is very likely that tens of thousands of samples are required to discover problems, which takes a long time and cannot meet the iterative requirements. Moreover, a large number of the actual samples are invalid samples, and only a small number are valid samples. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a test method, device, computing device and storage medium for detecting application anomalies that overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of the present invention, there is provided a test method for detecting application anomalies, which is executed in a computing device. The method includes: constructing a data object set for each request interface of the application, where the attribute information of each data object in the data object set is different; constructing a data object model set according to each data object set; when it is monitored that the application receives a data request, determining the target request interface; generating simulated data by using the data object model corresponding to the target request interface; returning the simulated data to the target request interface for response, and detecting whether the application has an anomaly.

[0006] Optionally, in the test method for detecting application anomalies according to the present invention, the step of constructing a data object set for each request interface of the application includes: concurrently traversing each request interface of the application by using the collected test data; for each request interface, counting the attribute information of the data objects of each returned data; removing duplicates of the data objects with the same attribute information, and using the de-duplicated data objects as the data object set of the request interface.

[0007] Optionally, in the test method for detecting application anomalies according to the present invention, the step of concurrently traversing each request interface of the application by using the collected test data includes: constructing a proxy interface for monitoring each request interface of the application to be tested; concurrently traversing each request interface by using the collected test data through the proxy interface.

[0008] Optionally, in the test method for detecting application anomalies according to the present invention, wherein the attribute information at least includes the fields of the data object, the type of the field value, and the range of the field value, and the step of constructing a set of data object models according to each set of data objects includes: constructing a corresponding data object model based on the fields, field values, and ranges of field values of each data object in the data object set.

[0009] Optionally, in the test method for detecting application anomalies according to the present invention, wherein the step of generating simulation data by using the data object model corresponding to the target request interface includes: generating a data object according to the data object model; and performing instantiation processing on the generated data object to obtain simulation data.

[0010] Optionally, in the test method for detecting application anomalies according to the present invention, wherein before the step of performing instantiation processing on the generated data object, it further includes: integrating each set of data object models into a mock service so as to perform instantiation processing on the generated data object through the mock service.

[0011] Optionally, in the test method for detecting application anomalies according to the present invention, wherein the step of generating a data object according to the data object model includes: matching the generated data object with historical generated data; if the match is successful, regenerating the data object through the data object model, and repeating the matching and generating steps until the match fails.

[0012] Optionally, in the test method for detecting application anomalies according to the present invention, it further includes the step of: when an application anomaly is detected, obtaining simulation data and parsing out the corresponding data object from the simulation data.

[0013] According to another aspect of the present invention, there is provided a test device for detecting application anomalies, resident in a computing device, the device including: a first construction module adapted to construct a set of data objects for each request interface of the application, wherein the attribute information of each data object in the set of data objects is different; a second construction module adapted to construct a set of data object models according to each set of data objects; a determination module adapted to determine a target request interface when it is monitored that the application receives a data request; a generation module adapted to generate simulation data by using the data object model corresponding to the target request interface; and a detection module adapted to return the simulation data to the target request interface for response and detect whether the application has an anomaly.

[0014] According to another aspect of the present invention, there is provided a computing device, including: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the above method.

[0015] According to another aspect of the present invention, there is provided a readable storage medium storing program instructions, which, when read and executed by a computing device, cause the computing device to execute the above method.

[0016] According to the solution of the present invention, through the constructed data object model, a structural form of a data object is randomly generated for each request, so that the user request and the data return can be decoupled. Therefore, when writing test cases, they can be written casually without the need to construct complex inputs (regardless of what is input, the data object model will simulate the returned data), which reduces the amount of case code writing and improves the writing efficiency.

[0017] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically exemplified below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0019] Figure 1 A schematic diagram of a computing device 100 according to an embodiment of the present invention is shown;

[0020] Figure 2 A flowchart of a test method 200 for detecting application anomalies according to an embodiment of the present invention is shown;

[0021] Figure 3 A structural diagram of a test device 300 for detecting application anomalies according to an embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0023] In the prior art, a UI automation framework is generally used to cover and test an application to detect the cause of application anomalies. For example, a large number of test cases are written through the UI automation frameworks of Appium and selenium, and the written test cases are continuously input into the application, and whether the application will have anomalies is monitored. On the one hand, the amount of test cases to be written is extremely large, and the writing cost is high. On the other hand, the test cases are written based on the UI automation framework and require the use of browser drivers, resulting in very slow execution efficiency.

[0024] To solve the problems existing in the above prior art, the solution of the present invention is proposed. An embodiment of the present invention provides a test method for detecting application anomalies, and this method can be executed in a computing device. Figure 1 The structural diagram of a computing device 100 according to an embodiment of the present invention is shown. As Figure 1 shown, in the basic configuration 102, the computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 can be used for communication between the processor 104 and the system memory 106.

[0025] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: microprocessor (μP), microcontroller (μC), digital signal processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a level 1 cache 110 and a level 2 cache 112, a processor core 114, and registers 116. An example of the processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example of the memory controller 118 can be used in conjunction with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.

[0026] Depending on the desired configuration, system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. Physical memory in a computing device generally refers to volatile memory RAM, and data on a disk needs to be loaded into physical memory before it can be read by processor 104. System memory 106 can include an operating system 120, one or more applications 122, and program data 124. Applications 122 are actually multiple program instructions that are used to instruct processor 104 to perform corresponding operations. In some embodiments, applications 122 can be arranged to execute instructions on an operating system by one or more processors 104 using program data 124. The operating system 120 can be, for example, Linux, Windows, etc., and it includes program instructions for handling basic system services and performing hardware-dependent tasks. Applications 122 include program instructions for implementing various functions desired by users. Applications 122 can be, for example, a browser, instant messaging software, software development tools (such as integrated development environment IDE, compiler, etc.), but are not limited thereto. When an application 122 is installed in computing device 100, a driver module can be added to the operating system 120.

[0027] When computing device 100 starts running, processor 104 reads and executes the program instructions of operating system 120 from memory 106. Applications 122 run on top of operating system 120 and utilize the interfaces provided by operating system 120 and the underlying hardware to implement various functions desired by users. When a user starts an application 122, the application 122 is loaded into memory 106, and processor 104 reads and executes the program instructions of the application 122 from memory 106.

[0028] Computing device 100 further includes a storage device 132. The storage device 132 includes a removable storage 136 and a non-removable storage 138, and both the removable storage 136 and the non-removable storage 138 are connected to a storage interface bus 134.

[0029] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output device 142, peripheral interface 144, and communication device 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I / O ports 158. Example communication device 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via one or more communication ports 164 through a network communication link.

[0030] The network communication link may be an example of a communication medium. A communication medium can generally embody computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data concentrations or its changes can encode information in the signal. As a non-limiting example, the communication medium can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR), or other wireless media. The term computer-readable medium as used herein can include both storage media and communication media.

[0031] The computing device 100 also includes a storage interface bus 134 connected to the bus / interface controller 130. The storage interface bus 134 is connected to a storage device 132, which is suitable for data storage. Example storage devices 132 may include removable storage 136 (e.g., CD, DVD, USB flash drive, removable hard disk, etc.) and non-removable storage 138 (e.g., hard disk drive HDD, etc.).

[0032] In the computing device 100 according to the present invention, the application 122 includes multiple program instructions for executing the method 200.

[0033] Figure 2 A flowchart of a test method 200 for detecting application anomalies according to an embodiment of the present invention is shown. The method 200 is suitable for execution in a computing device (e.g., the aforementioned computing device 100).

[0034] AsFigure 2 As shown in Figure 2 , the purpose of method 200 is to implement a test method for detecting application anomalies, starting from step S202. In step S202, a data object set of each request interface of the application is constructed, where the attribute information of each data object in the data object set is different. The specific construction method is as follows:

[0035] First, use the collected test data to concurrently traverse each request interface of the application. The test data can come from a data source or be collected through application logs. For example, to verify whether an application anomaly will occur when searching for car brands, the car brand library is used to make concurrent requests to the interface.

[0036] In some embodiments, a proxy interface for listening to each request interface of the application to be tested can be constructed first. Then, the collected test data is concurrently traversed through the proxy interface to each request interface. Constructing the proxy interface can facilitate the input of test data, and the response speed of the proxy interface is faster and more efficient than that in the application. Specifically, the proxy interface is integrated through a driver to listen to all request interfaces. The purpose of the proxy is to provide a proxy for other objects to control access to the application. For example, a user wants to rent a house but doesn't have a lot of time to understand the rental information, so they find an intermediary to complete it. Analogous to the present application, the proxy interface is equivalent to the intermediary, and the user is equivalent to the class to be proxied. The request efficiency can be improved through the proxy interface.

[0037] Then, for each request interface, count the attribute information of the data objects of each response value. The attribute information generally includes the field (key) of the data object, the type of the field value (value of the key), and the range of the field value. Specifically, count whether the key exists, the type of the value of the key (e.g., string, null, etc.), and the maximum and minimum ranges of the value. Exemplarily, if the data object of the interface return data is "key-1, value-0011", then count that the field of this data object is 1, the type of the field value is a number, and the length of the field value is 4.

[0038] Finally, remove duplicates from the data objects with the same attribute information, and use the de-duplicated data objects as the data object set of the request interface. That is, compare the data objects pairwise. If the fields, the types of the field values, and the ranges of the field values of the two data objects are all the same, then de-duplicate these two data objects. In other words, either one of the two data objects can be retained. Continuing the previous example, the two data objects are "key-1, value-0011" and "key-1, value-1100" respectively. Although their value values are different, their value types are the same, so these two data objects are de-duplicated and only one of them is retained.

[0039] After the data object set is constructed, proceed to step S204. Based on each data object set, construct a data object model set. Specifically, abstract corresponding data object models based on the fields, field values, and ranges of field values of each data object in the data object set. Exemplarily, in a data object set, there are two data objects, namely "key-1, value-0011" and "key-1, value-today is a good day". Then write a data object generation rule based on this data object set. This data object generation rule should include the following content: "There exists a key, the value type of the value is number and string, and the length of the value is 4-7". Write this data object generation rule as a corresponding function, which serves as the data object model.

[0040] After the data object model is constructed, associate it with the corresponding request interface. Then the user can make an interface request in the application. In step S206, when it is monitored that the application receives a data request, determine the target request interface. In other words, check which interface is the request interface for the user to make a data request.

[0041] In step S208, use the data object model corresponding to the target request interface to generate simulated data. Specifically, first, generate a data object according to the data object model. When responding to the request of the request interface, the request parameters will be sent to the data object model, and the data object model will randomly generate a data object. For example, the rule for the data object model to generate a data object is that there exists a key, the value type of the value of the key is string and null, and the range of the value is 1-5. When responding to the request of the request interface, a data object "key-1, value-0000" can be generated.

[0042] In addition, the purpose of this method 200 is to simulate and generate return data through the data object model to detect which data objects will cause application exceptions. Based on this, in some embodiments, match the generated data object with the historically generated data; if the match is successful, regenerate the data object through the data object model, and repeat the steps of matching the generated data object with the historically generated data and regenerating the data object until the match fails. That is, the generated data object should be distinguished from the previously generated data object, which can avoid repeated testing of the same data object.

[0043] Then, the generated data objects are instantiated to obtain simulated data. Specifically, each data object model set is integrated into the Mock service so that the generated data objects can be instantiated through the mock service. The mock service is a testing method in which, during the testing process, for some objects that are not easy to construct or obtain, a virtual object is created for testing. In other words, after the data objects are determined, the mock service can be used to fill their contents and so on, and finally simulated data is obtained.

[0044] In step S210, the simulated data is returned to the target request interface for response, and it is detected whether the application has an exception. If an application exception is detected, the simulated data is obtained, and the corresponding data object is parsed from the simulated data. In other words, the data object corresponding to the simulated data causes the application exception.

[0045] Through the method 200 of this embodiment, through the constructed data object model, a structural form of a data object is randomly generated for each request, so that the user request and the data return can be decoupled. Therefore, when writing test cases, they can be written casually without the need to construct complex inputs (no matter what the input is, the data object model will simulate and return the data), which reduces the amount of test case code writing and improves the writing efficiency.

[0046] Figure 3 There is shown a test apparatus 300 for detecting application exceptions according to an embodiment of the present invention. The apparatus 300 resides in a computing device (such as the computing device 100 described above). The apparatus 300 includes a first construction module 302, a second construction module 304, a determination module 306, a generation module 308, and a detection module 310 that are coupled to each other. Among them, the first construction module 302 is adapted to construct a data object set of each request interface of the application, and among them, the attribute information of each data object in the data object set is different. The second construction module 304 is adapted to construct a data object model set according to each data object set. The determination module 306 is adapted to determine the target request interface when it is monitored that the application receives a data request. The generation module 308 is adapted to generate simulated data using the data object model corresponding to the target request interface. The detection module 310 is adapted to return the simulated data to the target request interface for response and detect whether the application has an exception.

[0047] It should be noted that the working principle and working process of the apparatus 300 provided in this embodiment are similar to those of the foregoing method 200, and the related parts can refer to the description of the above method 200, and will not be repeated here.

[0048] A8. The method as described in A1, further comprising the step of: when detecting the application exception, obtaining the simulated data and parsing the corresponding data object from the simulated data.

[0049] The various technologies described herein can be implemented in combination with hardware or software, or a combination of both. Thus, the methods and apparatuses of the present invention, or certain aspects or portions of the methods and apparatuses of the present invention, may take the form of program code (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes an apparatus for practicing the present invention.

[0050] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a processor-readable storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. Among them, the memory is configured to store the program code; the processor is configured to execute the method of the present invention according to the instructions in the program code stored in the memory.

[0051] By way of example and not limitation, the readable medium includes a readable storage medium and a communication medium. The readable storage medium stores information such as computer-readable instructions, data structures, program modules, or other data. The communication medium generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and includes any information delivery medium. A combination of any of the above is also included within the scope of the readable medium.

[0052] In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. A variety of general-purpose systems can also be used in conjunction with the examples of the present invention. Based on the above description, the structure required to construct such a system is obvious. In addition, the present invention is not directed to any particular programming language. It should be understood that the content of the present invention described herein can be implemented using a variety of programming languages, and the description of a particular language above is for the purpose of disclosing the preferred embodiments of the present invention.

[0053] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and technologies have not been shown in detail so as not to obscure the understanding of this specification.

[0054] Similarly, it should be understood that, for the purpose of streamlining the present disclosure and aiding in the understanding of one or more of the various inventive aspects, in the foregoing description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all of the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention.

[0055] Those skilled in the art should understand that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices as described in the embodiments, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or further divided into multiple sub-modules.

[0056] Those skilled in the art can understand that the modules in the devices of the embodiments can be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and further can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0057] In addition, those skilled in the art can understand that, although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of the features of different embodiments means that it is within the scope of the present invention and forms different embodiments. For example, in the following claims, any one of the claimed embodiments can be used in any combination.

[0058] In addition, some of the embodiments described herein are described as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices performing the functions. Therefore, a processor having the necessary instructions for implementing the method or method elements forms an apparatus for implementing the method or method elements. In addition, the elements described herein of the apparatus embodiments are examples of the apparatus for performing the functions performed by the elements for the purpose of implementing the invention.

[0059] As used herein, unless otherwise specified, the use of ordinal numbers such as "first", "second", "third", etc. to describe ordinary objects merely indicates different instances of similar objects and is not intended to imply that the objects so described must have a given order in terms of time, space, ranking, or in any other manner.

[0060] Although the present invention has been described in terms of a limited number of embodiments, those skilled in the art in this technical field will appreciate that other embodiments can be contemplated within the scope of the invention as thus described. In addition, it should be noted that the language used in this specification has been selected primarily for readability and teaching purposes rather than for the purpose of explaining or limiting the subject matter of the invention. Therefore, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. For the scope of the present invention, the disclosure of the present invention is illustrative rather than restrictive, and the scope of the present invention is defined by the appended claims.

Claims

1. A test method for detecting application anomalies, which is executed in a computing device. The method includes the steps of: Construct a set of data objects for each request interface of the application, where The attribute information of each data object in the data object set is different; Construct a data object model set according to each of the data object sets; When it is monitored that the application receives a data request, determine the target request interface; Generate simulated data by using the data object model corresponding to the target request interface, wherein the data object model randomly generates a data object as the simulated data; Return the simulated data to the target request interface for response, and detect whether the application has anomalies.

2. The method according to claim 1, wherein, The step of constructing the data object sets of each request interface of the application includes: Use the collected test data to concurrently traverse each request interface of the application; For each request interface, count the attribute information of the data objects in each returned data; Deduplicate the data objects with the same attribute information, and use the deduplicated data objects as the data object set of this request interface.

3. The method according to claim 2, wherein, The step of using the collected test data to concurrently traverse each request interface of the application includes: Construct a proxy interface for monitoring each request interface of the application; Concurrently traverse each request interface with the collected test data through the proxy interface.

4. The method according to claim 1, wherein, The attribute information at least includes the fields of the data object, the field value type, and the range of the field value. And the step of constructing a data object model set according to each of the data object sets includes: Construct corresponding data object models based on the fields, field values, and ranges of field values of each data object in the data object set.

5. The method according to claim 1, wherein The step of generating simulated data by using the data object model corresponding to the target request interface includes: Generate a data object according to the data object model; Perform instantiation processing on the generated data object to obtain the simulated data.

6. The method according to claim 5, wherein, Before the step of performing instantiation processing on the generated data object, it further includes: Integrate each data object model set into a mock service so that the generated data object can be instantiated through the mock service.

7. The method according to claim 5, wherein, The step of generating a data object according to the data object model includes: Match the generated data object with the historically generated data; If the match is successful, regenerate the data object through the data object model, and repeat the steps of matching the generated data object with the historically generated data and regenerating the data object until the match fails.

8. The method according to claim 1, wherein It further includes the step of: when it is detected that the application has anomalies, obtain the simulated data and parse the corresponding data object from the simulated data.

9. A test device for detecting application anomalies, which resides in a computing device. The device includes: A first construction module, adapted to construct the data object sets of each request interface of the application, wherein the attribute information of each data object in the data object set is different; A second construction module, adapted to construct a data object model set according to each of the data object sets; A determination module, adapted to determine the target request interface when it is monitored that the application receives a data request; A generation module, adapted to generate simulation data by using a data object model corresponding to the target request interface, wherein the data object model randomly generates a type of data object as the simulation data; A detection module, adapted to return the simulation data to the target request interface for response and detect whether an exception occurs in the application.

10. A computing device, comprising: At least one processor; And A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1-8.

11. A readable storage medium storing program instructions, which when read and executed by a computing device, cause the computing device to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Application testing system and method, electronic device, and readable storage medium

    CN108427631A

  • Test data generation method and device

    CN113568949A