Application program testing method and device, program product and electronic equipment

By generating remote test tasks and collecting operating data in the test server, the problem of low efficiency in application testing in the existing technology is solved, and a fast and simple test process and efficient test report generation are achieved.

CN118672909APending Publication Date: 2024-09-20SHANSHU TECH (BEIJING) CO LTD +5
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410731294.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing application testing solutions require professional knowledge and are inefficient. Testers need to build a test environment in each application server, making testing work time-consuming and laborious.

Method used

By obtaining the running data collection tool in the test server, generating the target remote test task, writing the access parameters of the application server, starting the remote test, collecting the running data and generating the test report, the professional threshold is lowered and the test efficiency and portability are improved.

Benefits of technology

It realizes fast and simple application testing, reduces the professional requirements of testers, improves testing efficiency and portability, and reduces the need to build a test environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672909A
    Figure CN118672909A
Patent Text Reader

Abstract

The embodiment of the invention provides an application program testing method and device, a program product and electronic equipment. An application program is loaded in at least one application server, the method is executed on a test server, and the method comprises the steps that an operation data collection tool used for proxy collection of operation data of the application program in the tested process is obtained, and a target remote test task is generated based on the operation data collection tool; obtaining an access parameter of a target application server loaded with the to-be-tested application program, and writing the access parameter into the target remote test task; in response to an execution instruction triggered by a user for the target remote test task, starting to test the to-be-tested application program in the target application server based on the target remote test task; and generating a test report for the to-be-tested application program based on the collected target operation data of the to-be-tested application program in the tested process. The efficiency of testing the application program can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of IT and computer technology, and in particular to an application testing method, device, program product and electronic device. Background Art

[0002] At present, developers generally need to test applications after developing them. The existing solution is usually to build a test environment in an application server loaded with the application, and test the application based on the built test environment. However, such an application test solution often requires testers with strong professional knowledge to complete, and each time an application is loaded on a new application server, the tester needs to rebuild the test environment before the application can be tested. As a result, the testing work is time-consuming, labor-intensive, and inefficient. Based on this, how to improve the efficiency of testing applications is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The embodiments of the present application provide an application testing method, apparatus, computer program product or computer program, computer-readable storage medium, and electronic device, which can improve the efficiency of testing the application at least to a certain extent.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0005] According to one aspect of an embodiment of the present application, there is provided an application testing method, in which an application is loaded in at least one application server, respectively. The method is executed on the test server, an operation data collection tool is obtained, and based on the operation data collection tool, a target remote test task is generated, wherein the operation data collection tool is used to collect the operation data of the application during the test process on an agent basis; access parameters of a target application server are obtained, and the access parameters are written into the target remote test task, wherein the target application server is loaded with the application to be tested; in response to an execution instruction for the target remote test task triggered by a user, based on the target remote test task, a test of the application to be tested in the target application server is started, and target operation data of the application to be tested during the test process is collected; based on the target operation data, a test report for the application to be tested is generated.

[0006] In some embodiments of the present application, based on the aforementioned scheme, the initiation of testing of the application to be tested in the target application server based on the target remote testing task includes: obtaining a target test case, the target test case including at least one test item, wherein one test item is used to test an application function of the application to be tested; accessing the target application server through the access parameters in the target remote testing task to test at least one application function of the application to be tested in the target application server based on the target test case.

[0007] In some embodiments of the present application, based on the aforementioned scheme, obtaining the target test case includes: obtaining the code repository address pre-written in the target remote test task, the code repository pointed to by the code repository address is used to store pre-designed test cases; based on the code repository address, accessing the code repository to read the target test case from the code repository.

[0008] In some embodiments of the present application, based on the aforementioned scheme, obtaining the target test case includes: displaying a test case upload window; in response to a user dragging a pre-designed target test case locally to the test case upload window, obtaining the target test case.

[0009] In some embodiments of the present application, based on the aforementioned scheme, it is characterized in that the collection of target running data of the application under test during the testing process includes: monitoring whether each code unit in the application under test is executed; if any code unit in the application under test is executed, recording the any code unit, and using the recorded code unit as the target running data of the application under test during the testing process.

[0010] In some embodiments of the present application, based on the aforementioned scheme, generating a test report for the application to be tested based on the target operation data includes: counting each code unit in the target operation data to determine the statistical value of the application to be tested on at least one test indicator; generating a test report for the application to be tested based on the statistical value of the application to be tested on at least one test indicator.

[0011] In some embodiments of the present application, based on the aforementioned solution, the test indicator at least includes code coverage.

[0012] According to one aspect of an embodiment of the present application, an application testing device is provided, in which an application is loaded in at least one application server, respectively. The device is arranged on the test server, and the device comprises: a first acquisition unit, used to acquire an operation data collection tool, and generate a target remote test task based on the operation data collection tool, wherein the operation data collection tool is used to collect the operation data of the application during the test process on behalf of the agent; a second acquisition unit, used to acquire access parameters of the target application server, and write the access parameters into the target remote test task, wherein the target application server is loaded with the application to be tested; a starting unit, used to respond to an execution instruction for the target remote test task triggered by a user, start testing the application to be tested in the target application server based on the target remote test task, and collect target operation data of the application to be tested during the test process; a generating unit, used to generate a test report for the application to be tested based on the target operation data.

[0013] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method described in the above embodiments.

[0014] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the above embodiment is implemented.

[0015] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the above embodiments.

[0016] The technical solution proposed in this application is based on a running data collection tool for collecting running data of an application during the test process by proxy. By generating a target remote test task in a test server and writing the access parameters of the target application server into the target remote test task, the target remote test task can be used to start the remote test of the application to be tested in the target application server. Finally, a test report for the application to be tested can be generated based on the collected target running data of the application to be tested during the test process. In this way, on the one hand, through the technical solution of this application, the threshold of professionalism of testers is lowered. Users only need to write the access parameters of the application server into the target remote test task to implement the test of the application, which indirectly improves the efficiency of application testing. On the other hand, through the technical solution of this application, the problem that the application can only be tested on a single machine in the existing solution is changed. By generating a target remote test task in the test server at one time, the application loaded in different application servers can be tested multiple times, without the need to build a test environment in each application server, which enhances the portability of application testing, thereby directly improving the efficiency of application testing.

[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0019] Figure 1 A system architecture diagram showing the technical solution of the embodiment of the present application can be applied;

[0020] Figure 2 A flowchart of an application testing method according to an embodiment of the present application is shown;

[0021] Figure 3 A page diagram according to an embodiment of the present application is shown;

[0022] Figure 4 A page diagram according to an embodiment of the present application is shown;

[0023] Figure 5 A page diagram according to an embodiment of the present application is shown;

[0024] Figure 6A block diagram of an application testing device according to an embodiment of the present application is shown;

[0025] Figure 7 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0027] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0029] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0030] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.

[0032] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0033] First, please combine Figure 1 , the system architecture and application scenarios for implementing the technical solution of this application are explained.

[0034] See also Figure 1 , showing a system architecture diagram to which the technical solution of the embodiments of the present application can be applied.

[0035] like Figure 1 As shown, the system architecture may include a test server 101, a network 102, and at least one application server 103. The network 102 is used to provide a medium for a communication link between the test server 101 and the application server 103. The network 102 may include various connection types, such as a wired communication link, a wireless communication link (such as a TCP network communication protocol, used to ensure data transmission on the network), and the like.

[0036] In the present application, an application program may be loaded in at least one application server 103 .

[0037] In the present application, the provided application testing method may be executed by the testing server 101 , and accordingly, the application testing device is generally disposed in the testing server 101 .

[0038] Figure 2 The flowchart of the application testing method according to one embodiment of the present application is shown. The application testing method can be executed by a device having a computing processing function, such as Figure 1 The test server 101 is shown. Figure 2 As shown, the application testing method at least includes steps 210 to 240, which are described in detail as follows:

[0039] In step 210, an operation data collection tool is obtained, and based on the operation data collection tool, a target remote test task is generated, wherein the operation data collection tool is used to collect the operation data of the application program during the test process.

[0040] In this application, the running data collection tool obtained can be JaCoCo, which is an open source code coverage tool for Java. JaCoCo runs in java agent mode, which can be responsible for detecting bytecode when the application runs the test. Jacocokeyi deeply studies each instruction and displays the line of code to be executed during each test. In order to collect code coverage data, JaCoCo generally uses ASM to perform code detection in real time and receives events from JVM ToolInterface during this process.

[0041] In the present application, when it is necessary to test the application to be tested loaded in the target application server, after obtaining an operation data collection tool for collecting the operation data of the application during the test, a target remote test task can be generated based on the operation data collection tool.

[0042] In step 220, access parameters of a target application server are obtained, and the access parameters are written into the target remote test task, wherein the target application server is loaded with the application program to be tested.

[0043] In the present application, the access parameters of the target application server may include information such as the application address / IP of the target application server, the application port, etc. After obtaining the access parameters of the target application server, the access parameters may be written into the target remote test task.

[0044] In order to make the art better understand the present application, the following Figure 3 Provide explanation.

[0045] See also Figure 3 , showing a page diagram according to an embodiment of the present application.

[0046] like Figure 3 As shown, in actual operation, the user can enter the application name, application address / IP, application port and other access parameters of the application in the pop-up window on the WEB page, so that the test server can obtain the access parameters of the target application server and write the access parameters into the target remote test task.

[0047] It is understandable that in this application, users can Figure 3 Enter relevant parameters in the window of the page shown to improve and modify the remote test task. In this way, the flexibility and convenience of creating or adjusting the remote test task can be enhanced, thereby improving the efficiency of application testing.

[0048] It should be noted that Figure 3The page shown is only for the purpose of enabling those skilled in the art to better understand the present application, and is an exemplary display of a method of writing the access parameters of the target application server into the target remote test task, wherein: Figure 3 The business information shown in does not require attention.

[0049] In step 230, in response to an execution instruction for the target remote test task triggered by a user, the test of the application under test in the target application server is started based on the target remote test task, and target running data of the application under test during the test process is collected.

[0050] In the present application, after the access parameters of the target application server are written into the target remote test task, when the user needs to test the application to be tested, he only needs to trigger the execution instruction for the target remote test task, for example, click a button set in the page to trigger the execution instruction for the target remote test task. After the user triggers the execution instruction, the test of the application to be tested in the target application server can be started based on the target remote test task.

[0051] Specifically, in the present application, starting the test of the application to be tested in the target application server based on the target remote test task can be performed according to the following steps 231 to 232:

[0052] Step 231 : obtaining a target test case, wherein the target test case includes at least one test item, wherein one test item is used to test an application function of the application to be tested.

[0053] Step 232: access the target application server through the access parameters in the target remote test task, so as to test at least one application function of the application program to be tested in the target application server based on the target test case.

[0054] In this application, it should be noted that a test case refers to a description of a test task for a specific application, which embodies the test plan, method, technology and strategy. Its content may include at least one test item (such as "login", "view", "modify" and other items), and each test item includes a test target, a test environment, input data, test steps, expected results, a test script, etc., and finally forms a document for corresponding testing of an application function of the application to be tested. In other words, a test case is a set of test inputs, execution conditions and expected results compiled for a special purpose, which is used to verify whether the application function of a specific application is met.

[0055] In one embodiment of the present application, the obtaining of the target test case may be performed according to the following steps 2311 to 1312:

[0056] Step 2311, obtaining the code repository address pre-written into the target remote test task, where the code repository pointed to by the code repository address is used to store pre-designed test cases.

[0057] Step 2312: Based on the code repository address, access the code repository to read the target test case from the code repository.

[0058] In this embodiment, the pre-designed test cases can be saved in the code repository, for example, Figure 1 The code repository 104 is shown. Specifically, the code repository can be accessed based on the code repository address to read the target test case from the code repository.

[0059] In this application, the code repository address can be pre-written into the target remote testing task. Figure 3 Enter the code repository address in the window on the page shown so that the test server can obtain the code repository address.

[0060] In this application, the tester only needs to enter the code repository address in the page window, and the test server can read the target test case from the code repository, and then implement the test of the application in the subsequent process, which indirectly improves the efficiency of application testing.

[0061] In another embodiment of the present application, the obtaining of the target test case may also be performed according to the following steps 2313 to 1314:

[0062] Step 2313, display the test case upload window.

[0063] Step 2314, in response to the user dragging the pre-designed target test case locally to the test case upload window, the target test case is obtained.

[0064] In this embodiment, if the code repository address cannot be obtained, or the obtained code repository address is incorrect, or the user needs to use other test cases, the pre-designed target test cases can be temporarily uploaded. Figure 4 , shows a page diagram according to an embodiment of the present application. Figure 4 As shown, a test case upload window can pop up on the page, and the user can drag the pre-designed target test case locally to the test case upload window, so that the test server can obtain the target test case.

[0065] In this application, through page visualization, users can customize the addition and maintenance of test cases, test the content that users need to test, meet the personalized needs of testers, and drag and drop to add test cases, which simplifies the test operation and makes the process clear, thereby improving the testing efficiency of the application.

[0066] It should be noted that Figure 4 The page shown is only for the purpose of enabling those skilled in the art to better understand the present application, and is an exemplary display of a method for obtaining a target test case, wherein: Figure 4 The business information shown in does not require attention.

[0067] In step 230, in response to a user-triggered remote test task for the target

[0068] In the present application, after starting to test the application to be tested in the target application server based on the target remote test task, the target operation data of the application to be tested during the test process can be collected. Specifically, the target operation data of the application to be tested during the test process can be collected according to the following steps 2315 to 2316:

[0069] Step 2315: monitor whether each code unit in the application to be tested is executed.

[0070] Step 2316: If any code unit in the application to be tested is executed, the any code unit is recorded, and the recorded code unit is used as the target running data of the application to be tested during the testing process.

[0071] In this application, testing the application to be tested is actually testing whether the application can normally implement one or more application functions (such as "login" function, "view" function, "modify" function, etc.) envisioned by the developer. In this process, when the application implements a certain function, the corresponding code unit in the application will be executed. Based on this, by monitoring the execution status of each code unit in the application to be tested, if any code unit in the application to be tested is executed, the any code unit is recorded, and the recorded code unit can be used as the target running data of the application to be tested during the testing process.

[0072] In step 240, a test report for the application to be tested is generated based on the target operation data.

[0073] In the present application, the target operation data may record which code units in the application to be tested have been executed. Based on this, the test report for the application to be tested is generated based on the target operation data, and may be performed according to the following steps 241 to 242:

[0074] Step 241 , counting each code unit in the target running data, and determining a statistical value of the application to be tested on at least one test indicator.

[0075] Step 242: Generate a test report for the application to be tested based on the statistical value of the application to be tested on at least one test indicator.

[0076] In the present application, the test indicator at least includes code coverage.

[0077] It should be noted that code coverage is the ratio of the code executed during the runtime of an application to the total code, which can indirectly measure the quality of an application. On the one hand, code coverage can be used to determine the code in an application that has not been tested by the test cases, and then guide testers to create new test cases to test the untested code. On the other hand, code coverage can also be used to determine whether there is redundant code in the application, and then determine the code quality of the application.

[0078] Code coverage is usually divided into the following categories:

[0079] Statement Coverage: Measures the proportion of code statements covered during the execution of a test case. The calculation method is to count the ratio of the number of executed code statements to the total number of code statements.

[0080] Branch Coverage: Measures the proportion of code branches covered during the execution of test cases. The calculation method is to count the ratio of the number of executed code branches to the total number of code branches.

[0081] Condition Coverage: Measures the proportion of conditional statements covered during the execution of a test case. The calculation method is to count the ratio of the number of conditional statements executed to the total number of conditional statements.

[0082] Path Coverage: Measures the proportion of code paths covered during the execution of a test case. The calculation method is to count the ratio of the number of executed code paths to the total number of code paths.

[0083] Function Coverage: Measures the proportion of functions or methods covered during the execution of a test case. The calculation method is to count the ratio of the number of functions or methods executed to the total number of functions or methods.

[0084] Boundary Value Coverage: Measures the proportion of boundary value cases covered during the execution of test cases. The calculation method is to count the ratio of the number of boundary value test cases covered to the total number of boundary value test cases.

[0085] Error Handling Coverage: Measures the proportion of error handling situations covered during the execution of test cases. The calculation method is to count the ratio of the number of error handling test cases covered to the total number of error handling test cases.

[0086] See also Figure 5 , shows a page diagram according to an embodiment of the present application. Figure 5 As shown, a test report display format with the test indicator being code coverage is provided. Users can view the test report by clicking a button on the page.

[0087] It should be noted that Figure 5 The page shown is only for the purpose of enabling those skilled in the art to better understand the present application. The exemplary display of the test indicator is a form of a test report of code coverage, in which: Figure 5 The business information shown in does not require attention.

[0088] In the present application, the test indicators may also include the number of times each code unit is executed. By the number of times each code unit is executed, it is possible to determine which code units are executed multiple times, thereby achieving accurate identification of test cases. At the same time, the test effects of the test cases can be evaluated, guiding testers to design more refined test cases.

[0089] In the present application, the test report generated for the application to be tested can be stored in a test server or in an application server for users to download and view.

[0090] Based on the technical solution proposed in this application, based on the operation data collection tool for collecting the operation data of the application during the test process, by generating a target remote test task in the test server and writing the access parameters of the target application server into the target remote test task, the remote test of the application to be tested in the target application server can be started based on the target remote test task, and finally a test report for the application to be tested can be generated based on the target operation data of the application to be tested collected during the test process. In this way, on the one hand, through the technical solution of this application, the threshold of professionalism of testers is lowered, and the user only needs to write the access parameters of the application server into the target remote test task to implement the test of the application, which indirectly improves the efficiency of application testing. On the other hand, through the technical solution of this application, the problem that the application can only be tested on a single machine in the existing solution is changed. By generating a target remote test task in the test server at one time, the application loaded in different application servers can be tested multiple times, without the need to build a test environment in each application server, which enhances the portability of application testing, thereby directly improving the efficiency of application testing.

[0091] In actual applications, this application integrates the running data collection tool into the web application system, presents a graphical page for operation, and obtains the access information of the application server loaded with the application to be tested and the corresponding test case, so as to generate a test report for the application to be tested, realize the process of online viewing and collaboration, and facilitate users to monitor the report. The operation is simple, the process is clear, and the test efficiency is greatly improved. At the same time. As time goes by, in the continuous application testing needs, the technical solution of this application can significantly reduce technical debt, shorten the testing time, and thus improve the efficiency of application testing.

[0092] The following describes an apparatus embodiment of the present application, which can be used to execute the application testing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the application testing method of the present application.

[0093] Figure 6 A block diagram of an application testing device according to an embodiment of the present application is shown.

[0094] Reference Figure 6 As shown, an application is loaded in at least one application server, and the device is set on the test server. According to an embodiment of the present application, an application testing device 600 includes: a first acquisition unit 601, a second acquisition unit 602, a startup unit 603 and a generation unit 604.

[0095] Among them, the first acquisition unit 601 is used to acquire an operation data collection tool, and generate a target remote test task based on the operation data collection tool, wherein the operation data collection tool is used to collect the operation data of the application during the test process; the second acquisition unit 602 is used to acquire the access parameters of the target application server, and write the access parameters into the target remote test task, wherein the target application server is loaded with the application to be tested; the starting unit 603 is used to respond to the execution instruction for the target remote test task triggered by the user, start the test of the application to be tested in the target application server based on the target remote test task, and collect the target operation data of the application to be tested during the test process; the generating unit 604 is used to generate a test report for the application to be tested based on the target operation data.

[0096] In some embodiments of the present application, based on the aforementioned scheme, the starting unit 603 is configured to: obtain a target test case, the target test case including at least one test item, wherein one test item is used to test an application function of the application to be tested; access the target application server through the access parameters in the target remote test task to test at least one application function of the application to be tested in the target application server based on the target test case.

[0097] In some embodiments of the present application, based on the aforementioned scheme, the startup unit 603 is also configured to: obtain a code repository address pre-written in the target remote test task, the code repository pointed to by the code repository address is used to store pre-designed test cases; based on the code repository address, access the code repository to read the target test case from the code repository.

[0098] In some embodiments of the present application, based on the aforementioned scheme, the starting unit 603 is further configured to: display a test case upload window; and obtain the target test case in response to the user dragging a pre-designed target test case locally to the test case upload window.

[0099] In some embodiments of the present application, based on the aforementioned scheme, it is characterized in that the startup unit 603 is also configured to: monitor whether each code unit in the application to be tested is executed; if any code unit in the application to be tested is executed, then record the any code unit and use the recorded code unit as the target running data of the application to be tested during the testing process.

[0100] In some embodiments of the present application, based on the aforementioned scheme, the generation unit 604 is configured to: count the various code units in the target running data to determine the statistical value of the application to be tested on at least one test indicator; based on the statistical value of the application to be tested on at least one test indicator, generate a test report for the application to be tested.

[0101] In some embodiments of the present application, based on the aforementioned solution, the test indicator at least includes code coverage.

[0102] As another embodiment of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method described in the above embodiment.

[0103] Based on the same inventive concept, the embodiment of the present application also provides an electronic device. Figure 7 , shows a schematic diagram of the structure of an electronic device in an embodiment of the present application, wherein the electronic device includes one or more memories 704, one or more processors 702, and at least one computer program (program code) stored in the memories 704 and executable on the processors 702, and when the processor 702 executes the computer program, the method described above is implemented.

[0104] Among them, Figure 7 In the embodiment of the present invention, a bus architecture (represented by bus 700) is shown, which may include any number of interconnected buses and bridges, and bus 700 links various circuits including one or more processors represented by processor 702 and memory represented by memory 704. Bus 700 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 705 provides an interface between bus 700 and receiver 701 and transmitter 703. Receiver 701 and transmitter 703 may be the same element, namely a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 702 is responsible for managing bus 700 and general processing, while memory 704 may be used to store data used by processor 702 when performing operations.

[0105] As another embodiment of the present application, a computer-readable storage medium is also provided, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0106] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.

[0107] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including instructions for making a computer device (which can be a personal computer, server or network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0110] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

1. An application testing method, characterized in that: An application program is loaded in at least one application server, and the method is executed on the test server. The method includes: Acquire an operation data collection tool, and generate a target remote test task based on the operation data collection tool, wherein the operation data collection tool is used to collect the operation data of the application program during the test process; Obtaining access parameters of a target application server, and writing the access parameters into the target remote test task, wherein the target application server is loaded with the application to be tested; In response to an execution instruction for the target remote test task triggered by a user, based on the target remote test task, start testing the application to be tested in the target application server, and collect target running data of the application to be tested during the testing process; A test report for the application to be tested is generated based on the target operation data.

2. The method according to claim 1, characterized in that: The step of starting to test the application program to be tested in the target application server based on the target remote test task includes: Obtaining a target test case, wherein the target test case includes at least one test item, wherein one test item is used to test an application function of the application to be tested; The target application server is accessed through the access parameters in the target remote test task, so as to test at least one application function of the application program to be tested in the target application server based on the target test case.

3. The method according to claim 2, characterized in that The obtaining of the target test case comprises: Obtaining a code repository address pre-written into the target remote test task, where the code repository pointed to by the code repository address is used to store pre-designed test cases; Based on the code repository address, the code repository is accessed to read target test cases from the code repository.

4. The method according to claim 2, characterized in that: The obtaining of the target test case comprises: Display the test case upload window; In response to the user dragging the pre-designed target test case locally to the test case upload window, the target test case is acquired.

5. The method according to any one of claims 1 to 4, characterized in that: The collecting of target operation data of the application to be tested during the testing process includes: Monitoring whether each code unit in the application program to be tested is executed; If any code unit in the application to be tested is executed, the code unit is recorded, and the recorded code unit is used as target running data of the application to be tested during the testing process.

6. The method according to claim 5, characterized in that The generating a test report for the application to be tested based on the target operation data includes: Counting each code unit in the target running data to determine a statistical value of the application to be tested on at least one test indicator; A test report for the application to be tested is generated based on the statistical value of the application to be tested on at least one test indicator.

7. The method according to claim 6, characterized in that The test indicator includes at least code coverage.

8. An application testing device, characterized in that: An application program is loaded in at least one application server, and the device is arranged on the test server, and the device comprises: A first acquisition unit is used to acquire an operation data collection tool, and generate a target remote test task based on the operation data collection tool, wherein the operation data collection tool is used to collect the operation data of the application program during the test process; A second acquisition unit is used to acquire access parameters of a target application server, and write the access parameters into the target remote test task, wherein the target application server is loaded with the application to be tested; A starting unit, configured to respond to an execution instruction for the target remote test task triggered by a user, start testing the application to be tested in the target application server based on the target remote test task, and collect target running data of the application to be tested during the testing process; A generating unit is used to generate a test report for the application to be tested based on the target operation data.

9. A computer program product or a computer program, characterized in that The computer program product or computer program comprises computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor performs the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein the one or more memories store at least one program code, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the method according to any one of claims 1 to 7.