Application testing method and device, equipment and storage medium

By generating reference and virtual object use cases, the dependence on the peripheral application methods of the link to be tested is eliminated, the problem of inaccurate test scope in the existing technology is solved, and the efficiency of application testing is improved.

CN120743734APending Publication Date: 2025-10-03BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410346203.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The test methods used in the existing technology cannot accurately define the test scope, resulting in low test efficiency.

Method used

By obtaining the link to be tested of the application to be tested, generating reference test cases and virtual object test cases, generating target test cases based on these test cases, and performing test operations on the application to be tested, the dependence on application methods located outside the link to be tested is eliminated.

Benefits of technology

It improves the testing efficiency of application testing and solves the problem of defining the test scope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743734A_ABST
    Figure CN120743734A_ABST
Patent Text Reader

Abstract

The invention discloses an application testing method, device and equipment and a storage medium, and relates to the technical field of computers, and the method comprises the following steps: obtaining a to-be-tested link of a to-be-tested application; wherein the link to be tested at least comprises one main test method; generating a reference test case based on the incoming parameter and the outgoing parameter corresponding to each main test method; at least one direct calling method located on the periphery of the to-be-tested link in the application link of the to-be-tested application is obtained, and a virtual object case is generated based on incoming parameters and outgoing parameters corresponding to the direct calling methods; and generating a target test case based on the virtual object case and the reference test case, and executing a test operation on the to-be-tested application based on the target test case. According to the embodiment of the invention, the problem that the test range cannot be accurately defined in the application test is solved, and the test efficiency of the application test is improved.
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 in particular to an application testing method, device, equipment and storage medium. Background Art

[0002] With the development of computer technology, the framework of application code is becoming more and more complex, and there is a coupling relationship between calling and being called among many methods in the application chain.

[0003] In the process of implementing the present invention, it was found that the prior art has at least the following technical problems:

[0004] The full-link testing method requires all application methods in the application link to participate in the test. Although it is currently possible to set an application method in the application link as the main test method in advance, all application methods in the application link that are directly and indirectly called by the main test method still need to participate in the test.

[0005] Therefore, traditional application testing methods cannot accurately define the test scope, which reduces the test efficiency of application testing. Summary of the Invention

[0006] The embodiments of the present invention provide an application testing method, apparatus, device and storage medium to solve the problem that the test scope of application testing cannot be accurately defined, thereby improving the test efficiency of application testing.

[0007] According to one embodiment of the present invention, there is provided an application testing method, the method comprising:

[0008] Obtaining a link to be tested of the application to be tested; wherein the link to be tested includes at least one main test method;

[0009] Generate reference test cases based on the input and output parameters corresponding to each of the main test methods;

[0010] Obtaining at least one direct call method in the application link of the application to be tested that is located outside the link to be tested, and generating a virtual object use case based on input parameters and output parameters corresponding to each of the direct call methods;

[0011] A target test case is generated based on the virtual object test case and the reference test case, and a test operation is performed on the application to be tested based on the target test case.

[0012] According to another embodiment of the present invention, there is provided an application testing device, the device comprising:

[0013] A link-to-be-tested acquisition module, configured to acquire a link-to-be-tested of an application to be tested; wherein the link-to-be-tested comprises at least one main test method;

[0014] A reference test case generation module, configured to generate reference test cases based on the input and output parameters corresponding to each of the main test methods;

[0015] a virtual object use case generation module, configured to obtain at least one direct call method in the application link of the application to be tested and located outside the link to be tested, and generate a virtual object use case based on input parameters and output parameters corresponding to each of the direct call methods;

[0016] The test operation execution module is configured to generate a target test case based on the virtual object test case and the reference test case, and execute a test operation on the application to be tested based on the target test case.

[0017] According to another embodiment of the present invention, an electronic device is provided, the electronic device including:

[0018] at least one processor; and

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the application testing method described in any embodiment of the present invention.

[0021] According to another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. The computer instructions are used to enable a processor to implement the application testing method described in any embodiment of the present invention when executed.

[0022] The technical solution of the embodiment of the present invention generates a reference test case based on the input parameters and output parameters corresponding to the main test method in the test link of the application to be tested, obtains at least one direct calling method in the application link of the application to be tested that is located outside the test link, and generates a virtual object use case based on the input parameters and output parameters corresponding to each direct calling method, generates a target test case based on the virtual object use case and the reference test case, and performs a test operation on the application to be tested based on the target test case, thereby eliminating the dependence of the test link on the application method located outside the test link, thereby solving the problem that the application test cannot accurately define the test scope and improving the test efficiency of the application test.

[0023] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flowchart of an application testing method provided by one embodiment of the present invention;

[0026] Figure 2 A schematic diagram of a link to be tested provided by an embodiment of the present invention;

[0027] Figure 3 A schematic diagram of a reference test link provided by one embodiment of the present invention;

[0028] Figure 4 A flowchart of another application testing method provided by one embodiment of the present invention;

[0029] Figure 5 A flowchart of a specific example of an application testing method provided by one embodiment of the present invention;

[0030] Figure 6 A schematic structural diagram of an application testing device provided by one embodiment of the present invention;

[0031] Figure 7 The present invention provides a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "object", "reference", etc. in the description and claims of the present invention 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 terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Figure 1 A flowchart of an application testing method provided by an embodiment of the present invention is applicable to testing application methods in application codes. The method can be executed by an application testing device, which can be implemented in the form of hardware and / or software.

[0035] like Figure 1 As shown, the method includes:

[0036] S110: Obtain a link to be tested of the application to be tested.

[0037] Specifically, the link to be tested is used to represent part or all of the links in the application link. The application link contains multiple application methods with at least one level of calling relationship. The application link is used to represent the calling coupling between all methods in the application code of the application to be tested.

[0038] In a specific embodiment, the method further includes: deploying a probe in the application to be tested to monitor method attribute data corresponding to each application method in the application to be tested; and constructing an application link of the application to be tested based on the method name and call message in the monitored method attribute data.

[0039] Specifically, a probe installation package is sent to a terminal device running the application to be tested, so as to install the probe in the terminal device. The probe is bound with an application identifier of the application to be tested, wherein the application identifier is used to uniquely identify the application to be tested.

[0040] In this embodiment, the call message includes the input and output parameters of the application method and at least one call method name corresponding to the application method. Exemplarily, the method attribute data also includes method identification data and thread ID information of the application method. The data content of the method attribute data is not limited here.

[0041] The advantage of this setting is that it solves the problem of requiring developers of the application to be tested to manually build the application link, thereby improving the efficiency and accuracy of building the application link.

[0042] On the basis of the above embodiments, specifically, before constructing the application link of the application to be tested based on the method names and call messages in the monitored method attribute data, the method also includes: performing preprocessing operations on each method attribute data respectively; wherein the preprocessing operations include desensitization processing and / or data cleaning processing.

[0043] Here, illustratively, the input and output parameters in the method attribute data are desensitized.

[0044] The advantage of this setting is that desensitization processing can improve the data security of the monitoring data of the application to be tested during the application testing process, and data cleaning processing can ensure the accuracy, consistency, integrity, and availability of the data, thereby ensuring the executableness of the application testing method and the accuracy of the test results.

[0045] In this embodiment, the link to be tested includes at least one main test method. In a specific embodiment, the link to be tested includes one main test method, or one main test method and sub-test methods that have at least one level of calling relationship with the main test method, or at least two main test methods and sub-test methods that have at least one level of calling relationship with each main test method. The main test method is used to represent the application method at the top of the calling link in the link to be tested.

[0046] Figure 2 A schematic diagram of a link to be tested provided by an embodiment of the present invention. Specifically, Figure 2 The entry method, methods 1 to 13 in the above together constitute the application link of the application to be tested. Figure 2 Method 1, Method 4 and Method 5 filled in medium grey represent the link to be tested, wherein Method 1 represents the main test method in the link to be tested, and Method 4 and Method 5 are the sub-test methods in the link to be tested. Figure 2 The link to be tested shown also includes method 2, so method 1 and method 2 are both main test methods in the link to be tested.

[0047] In a specific embodiment, obtaining a link to be tested of an application to be tested includes: obtaining method heat data corresponding to each application method in the application link; adding application methods whose method heat data meet preset heat conditions to a reference test link, and using at least one test link with a call relationship in the reference test link as a link to be tested.

[0048] In a specific embodiment, the method heat data includes at least one of the following heat data: the number of calls, the number of calls, and the call ratio of the application method in the application link. The number of calls is used to characterize the number of other application methods that call the application method, the number of calls is used to characterize the number of other application methods called by the application method, and the call ratio is used to characterize the ratio between the call volume and the number of calls. For example, Figure 2 Taking method 3 in as an example, the number of calls, number of calls, and call ratio corresponding to method 3 are 1, 3, and 3 respectively.

[0049] In a specific embodiment, the method heat data includes at least one heat data of the number of calls, the number of calls and the response time of the application method monitored during the operation of the application to be tested, wherein the number of calls is used to represent the number of times the application method is called by other application methods during the operation of the application to be tested, the number of calls is used to represent the number of times the application method calls other application methods during the operation of the application to be tested, and the response time is used to represent the time it takes to calculate the output parameters based on the input parameters when the application method is called.

[0050] Specifically, the preset heat condition can be that a preset number of heat data items each exceed a corresponding heat threshold value. The heat threshold values ​​corresponding to each heat data item can be the same or different. For example, the preset number can be 1 or 3. The preset number can be customized based on the total number of heat data items in the method heat data. The preset number is not limited here.

[0051] Figure 3 A schematic diagram of a reference test link provided by an embodiment of the present invention, specifically, Figure 3 Method 1, Method 3, Method 4, Method 5, Method 6, Method 7, and Method 11 filled in medium gray together constitute a reference test link. The reference test link contains two test links with a calling relationship, one is a test link composed of Method 1, Method 4, Method 5, and Method 11, and the other is a test link composed of Method 3, Method 5, and Method 6.

[0052] S120: Generate reference test cases based on the input parameters and output parameters corresponding to each main test method.

[0053] Specifically, the input parameters corresponding to each main test method are used as input parameters of the reference test case, and the output parameters corresponding to each main test method are used as expected output parameters of the reference test case. In a specific embodiment, based on the input parameters and output parameters corresponding to each main test method, a reference test case is generated, including: obtaining a reference test framework corresponding to the test environment, adding the input parameters and output parameters corresponding to each sub-test method and each main test method in the link to be tested to the reference test framework, and obtaining a reference test case.

[0054] The advantage of this setting is that it ensures the adaptability between the target test cases and the test environment, and expands the applicable scenarios of the application test method.

[0055] S130: Obtain at least one direct call method located outside the application link of the application to be tested, and generate a virtual object use case based on input parameters and output parameters corresponding to each direct call method.

[0056] Specifically, the direct calling method is used to represent an application method that has a direct calling relationship with at least one test method in the link to be tested. Figure 2 For example, the direct calling methods located at the periphery of the link to be tested include four application methods, namely method 9 to method 12.

[0057] In this embodiment, the virtual object use case is used to release the dependency of the link under test on the application method with which it has a direct calling relationship, and correspondingly, it also releases the dependency of the link under test on the application method with which it has an indirect calling relationship.

[0058] In a specific embodiment, a virtual object use case is generated based on the input parameters and output parameters corresponding to each direct call method, including: obtaining a mock framework corresponding to the test environment, adding the input parameters and output parameters corresponding to each direct call method to the mock framework, and obtaining a virtual object use case.

[0059] The advantage of this setting is that it ensures the adaptability between the target test cases and the test environment, and expands the applicable scenarios of the application test method.

[0060] S140 : Generate a target test case based on the virtual object test case and the reference test case, and perform a test operation on the application to be tested based on the target test case.

[0061] Specifically, the virtual object test case is added to the reference test case to obtain the target test case. Figure 2 For example, during the execution of the target test case, the execution logic represented by the virtual object use case is as follows: in response to monitoring that method 4 calls method 9 based on the input parameters of method 9, the output parameter of method 9 is used as the return value of method 4 calling method 9; in response to monitoring that method 4 calls method 10 based on the input parameters of method 10, the output parameter of method 10 is used as the return value of method 4 calling method 10; in response to monitoring that method 5 calls method 11 based on the input parameters of method 11, the output parameter of method 11 is used as the return value of method 5 calling method 11; in response to monitoring that method 5 calls method 12 based on the input parameters of method 12, the output parameter of method 12 is used as the return value of method 5 calling method 12.

[0062] If necessary Figure 2The link to be tested is tested as shown in the figure. The traditional application test case includes 9 calling test cases, namely, calling method 1, method 4-method 5, method 9-method 12, and method 14-method 15, which obviously exceeds the test scope limited by the link to be tested (method 1, method 4-method 5).

[0063] The technical solution of this embodiment generates a reference test case based on the input parameters and output parameters corresponding to the main test method in the test link of the application to be tested, obtains at least one direct call method in the application link of the application to be tested that is located outside the test link, and generates a virtual object use case based on the input parameters and output parameters corresponding to each direct call method, generates a target test case based on the virtual object use case and the reference test case, and performs test operations on the application to be tested based on the target test case, thereby eliminating the dependence of the test link on the application method located outside the test link, thereby solving the problem that the application test cannot accurately define the test scope and improving the test efficiency of the application test.

[0064] Based on the above embodiment, specifically, after obtaining the link to be tested of the application to be tested, the method further includes: executing step S120 when no target test case corresponding to the link to be tested is stored; after generating the target test case based on the virtual object case and the reference test case, the method further includes: storing the link to be tested in correspondence with the target test case.

[0065] The advantage of this setting is that it improves the efficiency of obtaining target test cases, thereby further improving the testing efficiency of the applied test method.

[0066] Figure 4 This is a flow chart of another application testing method provided by an embodiment of the present invention. This embodiment further refines the "obtaining a link to be tested of the application to be tested" in the above embodiment. Figure 4 As shown, the method includes:

[0067] S210: Output and display multiple application methods in the application link of the application to be tested in a visual interactive interface.

[0068] In a specific embodiment, all application methods in the application chain are simultaneously output and displayed in a visual interactive interface.

[0069] In another specific embodiment, in response to detecting a search operation input by the user, the search application method corresponding to the search operation in the application link and the direct calling method and / or directly called method corresponding to the search application method are simultaneously output and displayed in the visual interactive interface.

[0070] by Figure 2For example, assuming that the search application method is method 5, method 5, method 11-method 12 are output and displayed in the visual interaction interface at the same time, or method 1-method 2, method 5 are output and displayed in the visual interaction interface at the same time, or method 1-method 2, method 5, method 11-method 12 are output and displayed in the visual interaction interface at the same time.

[0071] S220 : In response to detecting a selection operation input by the user based on the visual interactive interface, add a selection application method corresponding to the selection operation as a test method to the link to be tested.

[0072] Based on the above embodiment, specifically, when the display mode of the application link is a non-full display mode, the method also includes: in response to detecting a selection operation of the user based on the visual interactive interface input, the direct calling method and / or the directly called method corresponding to the selected application method are displayed in the visual interactive interface.

[0073] The advantage of this setting is that since there are many application methods in the application link, the full display mode outputs and displays all application methods at the same time, which will affect the efficiency of users in selecting application methods to a certain extent. Displaying application methods layer by layer according to the search operations and selection operations input by the user can not only improve the efficiency of users in selecting application methods, but also avoid users from making incorrect selections and adding application methods that have no call relationship with the link to be tested to the link to be tested.

[0074] In a specific embodiment, before adding the selection application method corresponding to the selection operation as a test method to the link to be tested, the method also includes: when there is a calling relationship between the selection application method and at least one test method in the current test link, the current test link is used as the link to be tested; when there is no calling relationship between the selection application method and any test method in the current test link, an empty newly created test link is used as the link to be tested.

[0075] Specifically, the calling relationship includes a direct calling relationship and / or a direct called relationship.

[0076] by Figure 2 For example, assuming that the current test link includes method 1, method 4 and method 5, if method 2 is selected as the application method, since method 2 has a direct calling relationship with method 5 in the current test link, method 2 is added to the current test link to obtain a link to be tested consisting of method 1, method 2, method 4 and method 5; if method 6 is selected as the application method, since method 6 has no direct calling relationship and / or direct being called relationship with method 1, method 4 and method 5 in the current test link, a new link to be tested is generated based on method 6.

[0077] In another specific embodiment, when there is no calling relationship between the selected application method and any test method in the current test link, information indicating a selection error is output based on the selected application method.

[0078] Exemplary notifications for incorrect selections may include disabling the selection control for the selected application method, or generating a text prompt such as "The current application method xx does not have a call relationship with the current test link." The output format of the notification for incorrect selections is not limited and can be customized based on actual needs.

[0079] The advantage of this setting is that it prevents users from making erroneous selections and adding an application method that has no calling relationship with the current test link to the link to be tested.

[0080] In a specific embodiment, before adding the selection application method corresponding to the selection operation as a test method to the link to be tested, the method also includes: obtaining method identification data of the selection application method corresponding to the selection operation; when the method identification data belongs to external identification data, based on the selection application method, outputting information for prompting prohibition of selection; wherein the method identification data includes a method identification and / or a method class name, and the external identification data indicates that the application method belongs to an external access method.

[0081] Among them, illustratively, the method identifier can be composed of at least one of numbers, words, uppercase letters, lowercase letters or special characters. The composition form of the method identifier is not limited here, and can be customized according to actual needs.

[0082] Exemplarily, the message used to indicate the prohibition of selection may include setting the selection control corresponding to the selected application method to an unselectable state, or generating a text prompt such as "Application method xxx cannot be used for testing." The output format of the message used to indicate the prohibition of selection is not limited and can be customized according to actual needs.

[0083] The benefit of this setting is that it avoids unnecessary data pollution to third-party programs corresponding to external access methods and improves the standardization of application testing.

[0084] S230: Generate reference test cases based on the input parameters and output parameters corresponding to each main test method.

[0085] S240: Obtain at least one direct call method located outside the application link of the application to be tested, and generate a virtual object use case based on the input parameters and output parameters corresponding to each direct call method.

[0086] S250 : Generate a target test case based on the virtual object test case and the reference test case, and perform a test operation on the application to be tested based on the target test case.

[0087] S230-S250 in this embodiment are the same as those in the above embodiment. Figure 1 S120 - S140 shown correspond to the same or similar steps and are not described in detail in this embodiment.

[0088] The technical solution of this embodiment is to display the output of multiple application methods in the application link of the application to be tested in a visual interactive interface. In response to detecting a selection operation of the user based on the visual interactive interface input, the selected application method corresponding to the selection operation is added as a test method to the link to be tested, thereby realizing the configurability of the link to be tested, increasing the combination forms of each test method in the link to be tested, and thus broadening the applicable scenarios of the application test method.

[0089] Figure 5 This is a flowchart of a specific example of an application testing method provided by one embodiment of the present invention. Specifically, Figure 5 Taking the example of an application to be tested being installed in an application container and an application test method serving a processing platform, on the application container side, a probe is installed in the application container where the application to be tested is installed. The probe is used to monitor the method attribute data of each application method in the application to be tested, and the multiple method attribute data obtained from the monitoring are uploaded to the processing platform.

[0090] On the processing platform side, the platform collects multiple method attribute data uploaded by the probes and performs desensitization and data cleaning on them. Based on the method name and call message in each method attribute data, the platform constructs an application link, displays the application link in a visual interactive interface, and stores it in a preset storage space.

[0091] Based on the operation data input by the user through the visual interactive interface, a link to be tested is determined, a target test case is generated based on the link to be tested, a test operation is performed on the application to be tested based on the target test case, and the link to be tested and the target test case are stored in a preset storage space. Alternatively, if a target test case is found from the preset storage space based on the link to be tested, a test operation is performed on the application to be tested based on the target test case.

[0092] The following is an embodiment of an application testing device provided in an embodiment of the present invention. The device and the application testing method of the above embodiment belong to the same inventive concept. For details not fully described in the embodiment of the application testing device, please refer to the content about the application testing method in the above embodiment.

[0093] Figure 6This is a schematic diagram of the structure of an application testing device provided by one embodiment of the present invention. Figure 6 As shown, the apparatus includes: a link to be tested acquisition module 310 , a reference test case generation module 320 , a virtual object case generation module 330 and a test operation execution module 340 .

[0094] The link to be tested acquisition module 310 is used to acquire the link to be tested of the application to be tested; wherein the link to be tested includes at least one main test method;

[0095] A reference test case generation module 320 is used to generate reference test cases based on the input and output parameters corresponding to each main test method;

[0096] A virtual object use case generation module 330 is configured to obtain at least one directly called method located outside the application link of the application to be tested, and generate a virtual object use case based on the input and output parameters corresponding to each directly called method;

[0097] The test operation execution module 340 is configured to generate a target test case based on the virtual object test case and the reference test case, and execute a test operation on the application to be tested based on the target test case.

[0098] The technical solution of this embodiment generates a reference test case based on the input parameters and output parameters corresponding to the main test method in the test link of the application to be tested, obtains at least one direct call method in the application link of the application to be tested that is located outside the test link, and generates a virtual object use case based on the input parameters and output parameters corresponding to each direct call method, generates a target test case based on the virtual object use case and the reference test case, and performs test operations on the application to be tested based on the target test case, thereby eliminating the dependence of the test link on the application method located outside the test link, thereby solving the problem that the application test cannot accurately define the test scope and improving the test efficiency of the application test.

[0099] In a specific embodiment, the link to be tested acquisition module 310 is specifically configured to:

[0100] Outputting multiple application methods in the application chain of the application to be tested and displaying them in a visual interactive interface;

[0101] In response to detecting a selection operation input by a user based on the visual interactive interface, a selection application method corresponding to the selection operation is added to the link to be tested as a test method.

[0102] In a specific embodiment, the device further comprises:

[0103] a link to be tested determining module, configured to, before adding the selected application method corresponding to the selection operation as the test method to the link to be tested, set the current test link as the link to be tested if there is a calling relationship between the selected application method and at least one test method in the current test link;

[0104] When there is no calling relationship between the selected application method and any test method in the current test link, the empty newly created test link is used as the link to be tested.

[0105] In a specific embodiment, the device further comprises:

[0106] An information output module, configured to obtain method identification data of the selection application method corresponding to the selection operation before adding the selection application method corresponding to the selection operation as a test method to the link to be tested;

[0107] In a case where the method identification data is external identification data, based on the selected application method, outputting information for prompting prohibition of selection;

[0108] The method identification data includes a method identification and / or a method class name, and the external identification data indicates that the application method belongs to an external access method.

[0109] In a specific embodiment, the device further comprises:

[0110] An application link building module is used to deploy probes in the application to be tested to monitor method attribute data corresponding to each application method in the application to be tested;

[0111] Based on the method names and call messages in the monitored method attribute data, the application link of the application to be tested is constructed.

[0112] In a specific embodiment, the device further comprises:

[0113] The preprocessing operation execution module is used to perform preprocessing operations on each method attribute data before building the application link of the application to be tested based on the method name and call message in the monitored method attribute data; wherein the preprocessing operation includes desensitization processing and / or data cleaning processing.

[0114] In a specific embodiment, the device further comprises:

[0115] a target test case storage module configured to, after obtaining a link to be tested of the application to be tested, generate a reference test case based on input parameters and output parameters corresponding to each main test method if no target test case corresponding to the link to be tested is stored;

[0116] After executing the virtual object-based test case and the reference test case to generate the target test case, the link to be tested and the target test case are stored in correspondence.

[0117] The application testing device provided in the embodiment of the present invention can execute the application testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] Figure 7 A schematic diagram of the structure of an electronic device provided for one embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0119] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, that is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor 11. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0120] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0121] The processor 11 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the application testing method provided in the above embodiments.

[0122] In some embodiments, the application testing method provided in the above embodiments may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps in the application testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the application testing method in any other appropriate manner (e.g., by means of firmware).

[0123] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0124] Computer programs for implementing the application testing methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0125] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0127] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0128] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0129] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0130] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. An application testing method, characterized in that: include: Obtaining a link to be tested of the application to be tested; wherein the link to be tested includes at least one main test method; Generate reference test cases based on the input and output parameters corresponding to each of the main test methods; Obtaining at least one direct call method in the application link of the application to be tested that is located outside the link to be tested, and generating a virtual object use case based on input parameters and output parameters corresponding to each of the direct call methods; A target test case is generated based on the virtual object test case and the reference test case, and a test operation is performed on the application to be tested based on the target test case.

2. The method according to claim 1, characterized in that The obtaining of the link to be tested of the application to be tested includes: Outputting multiple application methods in the application chain of the application to be tested and displaying them in a visual interactive interface; In response to detecting a selection operation input by a user based on the visual interactive interface, a selection application method corresponding to the selection operation is added to the link to be tested as a test method.

3. The method according to claim 2, characterized in that Before adding the selection application method corresponding to the selection operation as a test method to the link to be tested, the method further includes: In a case where the selected application method has a calling relationship with at least one test method in the current test link, taking the current test link as a link to be tested; In the case that there is no calling relationship between the selected application method and any test method in the current test link, the empty newly created test link is used as the link to be tested.

4. The method according to claim 2, characterized in that Before adding the selection application method corresponding to the selection operation as a test method to the link to be tested, the method further includes: Obtain method identification data of a selection application method corresponding to the selection operation; In a case where the method identification data is external identification data, outputting information for prompting prohibition of selection based on the selected application method; The method identification data includes a method identification and / or a method class name, and the external identification data indicates that the application method belongs to an external access method.

5. The method according to claim 1, wherein The method further comprises: Deploy a probe in the application to be tested to monitor method attribute data corresponding to each application method in the application to be tested; Based on the method name and call message in the monitored method attribute data, an application link of the application to be tested is constructed.

6. The method according to claim 5, characterized in that Before constructing the application link of the application to be tested based on the method name and call message in the monitored method attribute data, the method further includes: Preprocessing operations are performed on each of the method attribute data respectively; wherein the preprocessing operations include desensitization processing and / or data cleaning processing.

7. The method according to any one of claims 1 to 6, characterized in that After obtaining the link to be tested of the application to be tested, the method further includes: In the case where no target test case corresponding to the link to be tested is stored, performing a step of generating a reference test case based on input parameters and output parameters corresponding to each of the main test methods; After generating a target test case based on the virtual object test case and the reference test case, the method further includes: storing the link to be tested in correspondence with the target test case.

8. An application testing device, characterized in that: include: A link-to-be-tested acquisition module, configured to acquire a link-to-be-tested of an application to be tested; wherein the link-to-be-tested comprises at least one main test method; A reference test case generation module, configured to generate reference test cases based on the input and output parameters corresponding to each of the main test methods; a virtual object use case generation module, configured to obtain at least one direct call method in the application link of the application to be tested and located outside the link to be tested, and generate a virtual object use case based on input parameters and output parameters corresponding to each of the direct call methods; The test operation execution module is configured to generate a target test case based on the virtual object test case and the reference test case, and execute a test operation on the application to be tested based on the target test case.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the application testing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the application testing method according to any one of claims 1 to 7 when executed.