Test method, device, storage medium and electronic device

By generating and sending text descriptions, it solves the problem that testers find it difficult to accurately describe program errors, and achieves rapid and accurate error positioning and repair, which improves testing efficiency.

CN113849416BActive Publication Date: 2024-12-03DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111275484.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-12-03
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

During the testing process of an application, it is difficult for testers to accurately describe program errors, resulting in inefficient problem location and repair.

Method used

By displaying the page to be tested and responding to the test operation, a text description is generated based on the preset operation description template and page elements. If a program error occurs, it is sent to the background system for error positioning.

Benefits of technology

It realizes fast and accurate problem location and program error repair, improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849416B_ABST
    Figure CN113849416B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a testing method, device, storage medium and electronic device, which can generate a text description corresponding to a test operation in real time during a test process, so that when a program error occurs, the problem can be quickly and accurately located based on the text description, thereby improving the efficiency of problem location and the efficiency of repairing program errors. The method includes: displaying a page to be tested of an application; in response to a test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation; during the update of the page content, generating a text description corresponding to the test operation based on a preset operation description template and the page elements associated with the test operation; if a program error occurs during the update of the page content, the text description is sent to a background system, and the background system is used to locate the error based on the text description.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of testing technology, and in particular, to a testing method, device, storage medium and electronic device. Background Art

[0002] During the application testing process, when testers discover a bug (program error), they often have difficulty accurately describing the specific information of a bug when communicating with the corresponding developer. In the related art, the usual method is to add reproducible steps to reproduce the bug, thereby locating the problem. However, this method requires manual reproducibility settings, which is cumbersome, and cannot guarantee that the reproduced information can fully describe the specific information of the bug, thereby affecting the efficiency of problem locating and bug repairing. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a testing method, the method comprising:

[0005] Display the application's page to be tested;

[0006] In response to a test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation;

[0007] During the updating process of the page content, a text description corresponding to the test operation is generated based on a preset operation description template and a page element associated with the test operation;

[0008] If a program error occurs during the updating process of the page content, the text description is sent to a background system, and the background system is used to locate the error according to the text description.

[0009] In a second aspect, the present disclosure provides a testing method, the method comprising:

[0010] Receiving a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated by the test terminal in response to a test operation on a page to be tested, controlling the page to be tested to update page content based on the test operation, and during the updating process of the page content, after the page elements associated with the test operation are generated based on a preset operation description template and the test operation, and sent when a program error occurs during the updating process;

[0011] Error location is performed based on the text description.

[0012] In a third aspect, the present disclosure provides a testing device, the device comprising:

[0013] A first display module, used to display the page to be tested of the application program;

[0014] A control module, configured to, in response to a test operation on the page to be tested, control the page to be tested to update page content based on the test operation;

[0015] A first generating module, configured to generate a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation during the updating process of the page content;

[0016] The first sending module is used to send the text description to a background system when a program error occurs in the updating process of the page content, and the background system is used to locate the error according to the text description.

[0017] In a fourth aspect, the present disclosure provides a testing device, the device comprising:

[0018] A first receiving module is used to receive a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated based on a preset operation description template and a page element associated with the test operation, and is sent when a program error occurs in the updating process after the test terminal controls the page to be tested to update the page content based on the test operation in response to the test operation on the page to be tested.

[0019] A positioning module is used to locate the error based on the text description.

[0020] In a fifth aspect, the present disclosure provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect or the second aspect.

[0021] In a sixth aspect, the present disclosure provides an electronic device, including:

[0022] a storage device having a computer program stored thereon;

[0023] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect or the second aspect.

[0024] Through the above technical solution, during the test process, the text description corresponding to the test operation can be generated in real time based on the preset operation description template and the page elements associated with the test operation. Therefore, if a program error occurs during the test process, the text description can be sent to the background system, so that the background system can quickly and accurately locate the problem based on the text description, thereby improving the efficiency of problem location and the efficiency of repairing program errors.

[0025] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0027] Figure 1 is a flow chart of a testing method according to an exemplary embodiment of the present disclosure;

[0028] Figure 2 is a process schematic diagram of a testing method according to an exemplary embodiment of the present disclosure;

[0029] Figure 3 is a schematic diagram of a screenshot of a cropping operation in a testing method according to an exemplary embodiment of the present disclosure;

[0030] Figure 4 is a schematic diagram of an error description page in a test method according to an exemplary embodiment of the present disclosure;

[0031] Figure 5 is a flow chart showing a testing method according to another exemplary embodiment of the present disclosure;

[0032] Figure 6 is a block diagram of a testing device according to an exemplary embodiment of the present disclosure;

[0033] Figure 7 is a block diagram of a testing device according to another exemplary embodiment of the present disclosure;

[0034] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0036] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0037] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0038] It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should also be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0040] Figure 1 is a flow chart of a testing method according to an exemplary embodiment of the present disclosure. Figure 1 , the test method can be applied to test terminals, including:

[0041] Step 101: Display the page to be tested of the application.

[0042] Step 102 : In response to a test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation.

[0043] Step 103 , during the updating process of the page content, a text description corresponding to the test operation is generated based on a preset operation description template and page elements associated with the test operation.

[0044] Step 104: If a program error occurs during the updating process of the page content, a text description is sent to a background system, and the background system is used to locate the error based on the text description.

[0045] In the above manner, during the test process, a text description corresponding to the test operation can be generated in real time based on the preset operation description template and the page elements associated with the test operation. Therefore, if a program error occurs during the test process, the text description can be sent to the background system, so that the background system can quickly and accurately locate the problem based on the text description, thereby improving the efficiency of problem location and the efficiency of repairing program errors.

[0046] In order to enable those skilled in the art to better understand the testing method provided by the present disclosure, the above steps are described in detail with examples below.

[0047] For example, the test operation on the page to be tested may include a click operation or a sliding operation on the page to be tested, etc., which is not limited in the embodiments of the present disclosure. In the embodiments of the present disclosure, in response to the test operation on the page to be tested, the page to be tested may be controlled to update the page content based on the test operation, that is, the corresponding functional test is performed on the page to be tested. For example, in response to a click operation on a button control for jumping to another page in the page to be tested, the page to be tested is controlled to jump to another page.

[0048] During the updating process of the page content, a text description corresponding to the test operation can be generated based on the preset operation description template and the page elements associated with the test operation. Considering the various types of test operations, multiple operation description templates corresponding to the test operation types can be pre-set, such as setting a click test operation to correspond to a first operation description template, setting a sliding test operation to correspond to a second operation description template, and so on. The specific content of the operation description template is not limited in the embodiment of the present disclosure.

[0049] In a possible manner, based on a preset operation description template and a page element associated with the test operation, generating a text description corresponding to the test operation may be: based on the type of the test operation, obtaining a corresponding target description template from a preset operation description template, wherein each preset operation description template has identification information for characterizing the type of the test operation. Then, based on the target description template and the page element associated with the test operation, generating a text description corresponding to the test operation.

[0050] In this way, an operation description template matching the test operation can be determined according to the type of the test operation, thereby obtaining a more accurate text description, which is convenient for possible problem location and problem repair (ie, bug repair) in subsequent processes.

[0051] In a possible manner, each preset operation description template may include preset, empty information items to be filled in, and each information item to be filled in has identification information for characterizing the content to be filled in. Accordingly, based on the preset operation description template and the page elements associated with the test operation, a text description corresponding to the test operation is generated, which may be: determining the description information of the code element corresponding to the page element associated with the test operation in the source code of the page to be tested, the description information including at least one of the class name, object information, selector information, unit information and view information corresponding to the code element. Then, based on the description information and the identification information of the information item to be filled in the operation description template, the description information is filled into the information item corresponding to the operation description template to obtain the text description corresponding to the test operation.

[0052] That is to say, the preset operation description template pre-sets multiple information items to be filled in with empty content, and after obtaining the description content corresponding to the test operation, the multiple information items to be filled in can be filled in to obtain the corresponding text description. In actual applications, the operation description template can be a function that fills in content by passing in parameters, and each of the passed in parameters corresponds to an information item to be filled in the operation description template, so that the corresponding text description can be output through the function.

[0053] In the disclosed embodiment, the text description can be used for problem location and bug repair. Therefore, after a program error occurs, the description information of the code element corresponding to the page element associated with the test operation in the source code of the page to be tested can be first determined. For example, if the test operation is a sliding operation, and the associated page element is the entire page element corresponding to the page to be tested, the code element corresponding to the entire page element can be determined in the source code of the page to be tested, for example, the corresponding code element is determined to be scrollView in the source code of the page to be tested. Then, the description information of the code element can be further determined.

[0054] For example, the description information may include at least one of the class name information, object information, selector information, unit information, and view information corresponding to the code element. For example, referring to the above example, the code element is scrollView, and it can be determined that the description information of the code element includes the scrollView class name, the proxy class name corresponding to scrollView, etc. The embodiment of the present disclosure does not limit this, and it can be determined according to the source code corresponding to the page to be tested.

[0055] For example, for a click operation, the corresponding description information may be obtained by referring to the content of Table 1.

[0056] Table 1

[0057]

[0058] Referring to Table 1, if a UIControl event is triggered by a click operation, the description information may include the UIControl class name, target (object) information, and selector (selector) information. Alternatively, if the control corresponding to the click operation has text information and / or picture information, the description information may also include the text information and / or picture information of the control. If a UIGestureRecognizer event is triggered, the description information may include the UIGestureRecognizer class name, view (view) information, target (object) information, and selector (selector) information. If a UITableViewCell event is triggered, the description information may include the UITableViewCell class name, section (unit) information and row (row) information, and tableview (table view) information. If a UICollectionViewCell event is triggered, the description information may include the UICollectionViewCell class name, section (unit) information and row (row) information, and UICollectionView (view) information.

[0059] For example, in an actual application, the code for obtaining the description information of the code element corresponding to the page element in the source code can be written into the source code in a traceless embedding manner to reduce the coupling of the code.

[0060] After obtaining the description information of the corresponding code element in the source code, you can fill the description information into the information item corresponding to the operation description template based on the description information and the identification information of the information item to be filled in the operation description template to obtain the text description corresponding to the test operation. For example, the operation description template corresponding to UIControl is: UIControl: "Clicked <class name information>, target is <object information>, selector is <selector information>". Based on this, the generated text description can be: UIControl: "SSButton was clicked, target is SSViewController, selector is onButtonClick". Or, the operation description template corresponding to the page jump is: From <class name information A> to <class name information B>. Based on this, the text description can be generated as: From AController to BController.

[0061] After the text description is generated, the text description can be sent to the background system in response to the submission operation of the text description. That is to say, in the embodiment of the present disclosure, the tester can submit the text description to the bug background system, and the corresponding developer can open the bug background system to find the description information of the corresponding bug and locate it offline. And the description information can include the text description corresponding to the test operation, so that the developer can quickly and accurately locate the problem based on the text description in the error description page, thereby improving the efficiency of problem location and bug repair.

[0062] In a possible manner, operation screenshots and log information corresponding to the test operation can also be generated. Then, when a program error occurs during the update of the page content, the operation screenshots and log information are sent to the background system. The background system can then be used to locate the error based on at least one of the text description, the operation screenshots, and the log information.

[0063] That is to say, in addition to text descriptions, the disclosed embodiments also provide information in two dimensions, namely, operation screenshots and log information, to assist in problem location. Among them, the text description can accurately describe the page elements associated with the test operation when a program error occurs, the operation screenshot can intuitively display the page element status when a program error occurs, and can highlight the corresponding page elements, and the log information can globally display the operation status of the application when a program error occurs. Therefore, combining text descriptions, operation screenshots, and log information can more comprehensively describe program errors, thereby more accurately locating problems.

[0064] For example, refer to Figure 2 In the process of testing the mobile device, text description, operation screenshots and log information can be generated to assist in problem location. According to the actual test situation, the text description can include at least one of a click operation description, a slide operation description and a page jump description.

[0065] For example, the log information may be generated in real time during the update process of the page content, and the operation screenshot may be obtained by taking a screenshot of the current page content in response to the update of the page content. Alternatively, the operation screenshot may be obtained by recording the entire update process of the page content and then filtering the corresponding video frames in the recorded video. Specifically, the update process of the page content may be recorded first to obtain a test operation video, and then in response to a cropping operation on the test operation video, a target video frame corresponding to the cropping operation is obtained, and the target video frame is used as an operation screenshot of the test operation.

[0066] It should be understood that, usually, a bug only occurs in a short period of time, so the embodiment of the present disclosure can cut out the interval where the bug occurs from all the recorded operation contents. Figure 3, the user finds that the bug occurs in the 3rd and 4th frames of the video by viewing the recorded test operation video, then the 3rd and 2nd frames of the video can be cropped, and the 4th and 5th frames of the video can be cropped, so as to obtain the 3rd and 4th frames of the video as the final operation screenshots.

[0067] After obtaining the text description, operation screenshots and log information corresponding to the test operation, the corresponding text description, operation screenshots and log information can be sent to the backend system when a program error occurs. After receiving the corresponding text description, operation screenshots and log information, the backend system can locate the problem by combining the multi-dimensional problem description information.

[0068] For example, the backend system can display an error description page including text description, operation screenshots, and log information. Figure 4 The error description page shown. Figure 4 The error description page displays three display areas side by side, where the first display area is used to display the text description corresponding to the program error, the second display area is used to display the operation screenshot corresponding to the program error, and the third display area is used to display the log information corresponding to the program error.

[0069] Of course, the error description page can also display other information related to the program error. For example, the error description page can display application identification information, test case name and other information. The embodiment of the present disclosure does not limit the display of other information in the error description page.

[0070] In a possible manner, the background system can also respond to the selection operation of the target text description corresponding to the target test operation in the error description page, highlight the target text description, determine the target operation screenshot corresponding to the target test operation, and highlight the target operation screenshot.

[0071] For example, refer to Figure 4 In response to the selection operation of the first text description in the error description page, the first text description is highlighted ( Figure 4 The first text description is displayed in grayscale for highlighting. Accordingly, the target operation screenshot corresponding to the first text description can be determined in the operation screenshot ( Figure 4 Page B is used as an example), and the target operation screenshot is highlighted ( Figure 4 Page B is shown as grayscale for highlighting. Thus, when viewing the text description, the corresponding operation screenshots can be viewed simultaneously, which is convenient for problem location and bug repair.

[0072] It should be understood that, in a specific implementation of the present disclosure, the highlighted target operation screenshot may also be a page element associated with the test operation in the highlighted target operation screenshot, and the present disclosure embodiment does not limit this.

[0073] Based on the same concept, the embodiment of the present disclosure also provides a testing method, which is applied to the background system. Figure 5 , the method comprising:

[0074] Step 501, receiving a text description corresponding to a test operation sent by a test terminal. The text description is generated by the test terminal in response to a test operation on a page to be tested, controlling the page to be tested to update page content based on the test operation, and in the process of updating the page content, based on a preset operation description template and page elements associated with the test operation, and sent when a program error occurs in the updating process.

[0075] Step 502: perform error location based on the text description.

[0076] In a possible manner, the background system may also receive an operation screenshot and log information corresponding to the test operation sent by the test terminal, and then display an error description page including text description, operation screenshot and log information. Accordingly, step 502 may be: in response to a selection operation of a target text description corresponding to a target test operation in the error description page, highlight the target text description, determine a target operation screenshot corresponding to the target test operation, and highlight the target operation screenshot.

[0077] It should be understood that the relevant execution process of the background system can refer to the relevant content in the test terminal embodiment, which will not be repeated here.

[0078] Through the above scheme, the test terminal can generate a text description corresponding to the test operation in real time during the test based on the preset operation description template and the page elements associated with the test operation. If a program error occurs during the test, the test terminal can send the text description to the background system. The background system can quickly and accurately locate the problem based on the text description, improve the efficiency of problem location and the efficiency of repairing program errors. In addition to the text description, the test terminal can also send operation screenshots and log information. The background system can locate the problem based on the text description, operation screenshots and log information, combined with multiple dimensions of problem description information, to improve the accuracy of problem location.

[0079] Based on the same concept, the present disclosure also provides a testing device, which can become part or all of the electronic device through software, hardware or a combination of both. Figure 6 , the testing device 600 comprises:

[0080] The first display module 601 is used to display the page to be tested of the application program;

[0081] A control module 602, configured to, in response to a test operation on the page to be tested, control the page to be tested to update page content based on the test operation;

[0082] A first generating module 603 is used to generate a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation during the updating process of the page content;

[0083] The first sending module 604 is used to send the text description to a background system when a program error occurs in the updating process of the page content, and the background system is used to locate the error according to the text description.

[0084] Optionally, the first generating module 603 is used to:

[0085] Based on the type of the test operation, a corresponding target description template is acquired from a preset operation description template, wherein each of the preset operation description templates has identification information for characterizing the type of the test operation;

[0086] Based on the target description template and the page elements associated with the test operation, a text description corresponding to the test operation is generated.

[0087] Optionally, each of the preset operation description templates includes preset information items to be filled in with empty content, each of the information items to be filled in has identification information for representing the content to be filled in, and the first generating module 603 is used to:

[0088] Determine description information of a code element corresponding to the page element associated with the test operation in the source code of the page to be tested, wherein the description information includes at least one of class name information, object information, selector information, unit information, and view information corresponding to the code element;

[0089] Based on the description information and the identification information of the information item to be filled in the operation description template, the description information is filled into the information item corresponding to the operation description template to obtain a text description corresponding to the test operation.

[0090] Optionally, the device 600 further includes:

[0091] A second generating module is used to generate operation screenshots and log information corresponding to the test operation;

[0092] The second sending module is used to send the operation screenshot and the log information to the background system when a program error occurs during the update of the page content. The background system is used to locate the error based on at least one of the text description, the operation screenshot and the log information.

[0093] Optionally, the second generating module is used to:

[0094] Recording the updating process of the page content to obtain a test operation video;

[0095] In response to a cropping operation on the test operation video, a target video frame corresponding to the cropping operation is acquired, and the target video frame is used as an operation screenshot of the test operation.

[0096] Optionally, the first sending module 604 is used to:

[0097] In response to a submission operation on the text description, the text description is sent to a background system.

[0098] Based on the same concept, the present disclosure also provides a testing device, which can become part or all of the electronic device through software, hardware or a combination of both. Figure 7 , the testing device 700 comprises:

[0099] The first receiving module 701 is used to receive a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated based on a preset operation description template and a page element associated with the test operation, and is sent when a program error occurs in the updating process after the test terminal controls the page to be tested to update the page content based on the test operation in response to the test operation on the page to be tested.

[0100] The positioning module 702 is used to locate the error based on the text description.

[0101] Optionally, the device 700 further includes:

[0102] A second receiving module, used to receive the operation screenshot and log information corresponding to the test operation sent by the test terminal;

[0103] A second display module, used to display an error description page including the text description, the operation screenshot and the log information;

[0104] The positioning module 702 is used for:

[0105] In response to a selection operation on a target text description corresponding to a target test operation in the error description page, the target text description is highlighted, and a target operation screenshot corresponding to the target test operation is determined and the target operation screenshot is highlighted.

[0106] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0107] Based on the same inventive concept, an embodiment of the present disclosure also provides a non-temporary computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any of the above-mentioned testing methods are implemented.

[0108] Based on the same inventive concept, the present disclosure also provides an electronic device, including:

[0109] a memory having a computer program stored thereon;

[0110] A processor is used to execute the computer program in the memory to implement the steps of any of the above-mentioned testing methods.

[0111] Reference below Figure 8 , which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0112] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0113] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0114] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0115] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0116] In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used for communication, and can be interconnected with any form or medium of digital data communication (e.g., communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), internets (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.

[0117] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0118] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: displays the page to be tested of the application; in response to the test operation on the page to be tested, controls the page to be tested to update the page content based on the test operation; during the updating process of the page content, generates a text description corresponding to the test operation based on a preset operation description template and the page elements associated with the test operation; if a program error occurs during the updating process of the page content, the text description is sent to the background system, and the background system is used to locate the error according to the text description.

[0119] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a text description sent by the test terminal, wherein the text description is a response of the test terminal to a test operation on the page to be tested, controls the page to be tested to update page content based on the test operation, and during the update process of the page content, generates page elements associated with a preset operation description template and the test operation, and then sends the generated content when a program error occurs during the update process; and locates the error based on the text description.

[0120] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, constitute a limitation on the module itself.

[0123] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0124] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0125] According to one or more embodiments of the present disclosure, Example 1 provides a testing method, the method comprising:

[0126] Display the application's page to be tested;

[0127] In response to a test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation;

[0128] During the updating process of the page content, a text description corresponding to the test operation is generated based on a preset operation description template and a page element associated with the test operation;

[0129] If a program error occurs during the updating process of the page content, the text description is sent to a background system, and the background system is used to locate the error according to the text description.

[0130] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein generating a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation includes:

[0131] Based on the type of the test operation, a corresponding target description template is acquired from a preset operation description template, wherein each of the preset operation description templates has identification information for characterizing the type of the test operation;

[0132] Based on the target description template and the page elements associated with the test operation, a text description corresponding to the test operation is generated.

[0133] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein each of the preset operation description templates includes a preset, empty information item to be filled in, each of the information item to be filled in has identification information for characterizing the content to be filled in, and the text description corresponding to the test operation is generated based on the preset operation description template and the page element associated with the test operation, including:

[0134] Determine description information of a code element corresponding to the page element associated with the test operation in the source code of the page to be tested, wherein the description information includes at least one of class name information, object information, selector information, unit information, and view information corresponding to the code element;

[0135] Based on the description information and the identification information of the information item to be filled in the operation description template, the description information is filled into the information item corresponding to the operation description template to obtain a text description corresponding to the test operation.

[0136] According to one or more embodiments of the present disclosure, Example 4 provides the method described in any one of Examples 1-3, wherein the method further includes:

[0137] Generate operation screenshots and log information corresponding to the test operation;

[0138] When a program error occurs during the updating process of the page content, the operation screenshot and the log information are sent to the background system, and the background system is used to locate the error according to at least one of the text description, the operation screenshot and the log information.

[0139] According to one or more embodiments of the present disclosure, Example 5 provides the method described in Example 4, wherein generating an operation screenshot corresponding to the test operation includes:

[0140] Recording the updating process of the page content to obtain a test operation video;

[0141] In response to a cropping operation on the test operation video, a target video frame corresponding to the cropping operation is acquired, and the target video frame is used as an operation screenshot of the test operation.

[0142] According to one or more embodiments of the present disclosure, Example 6 provides a method according to any one of Examples 1-3, wherein sending the text description to a background system includes:

[0143] In response to a submission operation on the text description, the text description is sent to a background system.

[0144] According to one or more embodiments of the present disclosure, Example 7 provides a testing method, the method comprising:

[0145] Receiving a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated by the test terminal in response to a test operation on a page to be tested, controlling the page to be tested to update page content based on the test operation, and during the updating process of the page content, after the page elements associated with the test operation are generated based on a preset operation description template and the test operation, and sent when a program error occurs during the updating process;

[0146] Error location is performed based on the text description.

[0147] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, wherein the method further includes:

[0148] Receiving operation screenshots and log information corresponding to the test operation sent by the test terminal;

[0149] Displaying an error description page including the text description, the operation screenshot, and the log information;

[0150] The performing error location based on the text description includes:

[0151] In response to a selection operation on a target text description corresponding to a target test operation in the error description page, the target text description is highlighted, and a target operation screenshot corresponding to the target test operation is determined and the target operation screenshot is highlighted.

[0152] According to one or more embodiments of the present disclosure, Example 9 provides a testing device, the device comprising:

[0153] A first display module, used to display the page to be tested of the application program;

[0154] A control module, configured to, in response to a test operation on the page to be tested, control the page to be tested to update page content based on the test operation;

[0155] A first generating module, configured to generate a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation during the updating process of the page content;

[0156] The first sending module is used to send the text description to a background system when a program error occurs in the updating process of the page content, and the background system is used to locate the error according to the text description.

[0157] According to one or more embodiments of the present disclosure, Example 10 provides a testing device, the device comprising:

[0158] A first receiving module is used to receive a text description sent by a test terminal, wherein the text description is generated by the test terminal in response to a test operation on a page to be tested, and the test terminal controls the page to be tested to update page content based on the test operation, and during the update process of the page content, after the page element associated with the test operation is generated based on a preset operation description template and the test operation, and is sent when a program error occurs in the update process;

[0159] A positioning module is used to locate the error based on the text description.

[0160] According to one or more embodiments of the present disclosure, Example 11 provides a non-transitory computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-8 when executed by a processing device.

[0161] According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, including:

[0162] a storage device having a computer program stored thereon;

[0163] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-8.

[0164] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0165] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0166] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A testing method, characterized in that: The method comprises: Display the application's page to be tested; In response to a test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation; In the process of updating the page content, based on a preset operation description template and the page element associated with the test operation, a text description corresponding to the test operation is generated, wherein the text description includes an operation description of the test operation and an element description of the page element; If a program error occurs during the updating of the page content, the text description is sent to a background system, and the background system is used to locate the error according to the text description; Each of the preset operation description templates includes preset information items to be filled in with empty content, each of the information items to be filled in has identification information for characterizing the content to be filled in, and the text description corresponding to the test operation is generated based on the preset operation description template and the page element associated with the test operation, including: Determine description information of a code element corresponding to the page element associated with the test operation in the source code of the page to be tested, wherein the description information includes at least one of class name information, object information, selector information, unit information, and view information corresponding to the code element; Based on the description information and the identification information of the information item to be filled in the operation description template, the description information is filled into the information item corresponding to the operation description template to obtain a text description corresponding to the test operation.

2. The method according to claim 1, characterized in that The generating a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation includes: Based on the type of the test operation, a corresponding target description template is acquired from a preset operation description template, wherein each of the preset operation description templates has identification information for characterizing the type of the test operation; Based on the target description template and the page elements associated with the test operation, a text description corresponding to the test operation is generated.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Generate operation screenshots and log information corresponding to the test operation; When a program error occurs during the updating process of the page content, the operation screenshot and the log information are sent to the background system, and the background system is used to locate the error according to at least one of the text description, the operation screenshot and the log information.

4. The method according to claim 3, characterized in that The generating the operation screenshot corresponding to the test operation includes: Recording the updating process of the page content to obtain a test operation video; In response to a cropping operation on the test operation video, a target video frame corresponding to the cropping operation is acquired, and the target video frame is used as an operation screenshot of the test operation.

5. The method according to claim 1 or 2, characterized in that: The sending the text description to the background system includes: In response to a submission operation on the text description, the text description is sent to a background system.

6. A testing method, characterized in that: The method comprises: Receive a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated by the test terminal in response to the test operation on the page to be tested, controlling the page to be tested to update page content based on the test operation, and in the process of updating the page content, based on a preset operation description template and a page element associated with the test operation, and then sent when a program error occurs in the updating process, wherein the text description includes an operation description of the test operation and an element description of the page element, wherein each of the preset operation description templates includes a preset, empty information item to be filled in, and each of the information items to be filled in has a function for characterizing the page to be tested. Fill in the identification information of the content, the generating of the text description corresponding to the test operation based on the preset operation description template and the page element associated with the test operation, including: determining the description information of the code element corresponding to the page element associated with the test operation in the source code of the page to be tested, the description information including at least one of the class name information, object information, selector information, unit information and view information corresponding to the code element; based on the description information and the identification information of the information item to be filled in the operation description template, filling the description information into the information item corresponding to the operation description template to obtain the text description corresponding to the test operation; Error location is performed based on the text description.

7. The method according to claim 6, characterized in that The method further comprises: Receiving operation screenshots and log information corresponding to the test operation sent by the test terminal; Displaying an error description page including the text description, the operation screenshot, and the log information; The performing error location based on the text description includes: In response to a selection operation on a target text description corresponding to a target test operation in the error description page, the target text description is highlighted, and a target operation screenshot corresponding to the target test operation is determined and the target operation screenshot is highlighted.

8. A testing device, characterized in that: The device comprises: A first display module, used to display the page to be tested of the application program; A control module, configured to, in response to a test operation on the page to be tested, control the page to be tested to update page content based on the test operation; A first generating module, configured to generate a text description corresponding to the test operation based on a preset operation description template and a page element associated with the test operation during the updating process of the page content, wherein the text description includes an operation description of the test operation and an element description of the page element; A first sending module, used for sending the text description to a background system when a program error occurs in the updating process of the page content, and the background system is used for locating the error according to the text description; Each of the preset operation description templates includes preset, empty information items to be filled in, and each of the information items to be filled in has identification information for characterizing the content to be filled in. The first generation module is used to: determine the description information of the code element corresponding to the page element associated with the test operation in the source code of the page to be tested, and the description information includes at least one of the class name information, object information, selector information, unit information and view information corresponding to the code element; based on the description information and the identification information of the information item to be filled in the operation description template, fill the description information into the information item corresponding to the operation description template to obtain the text description corresponding to the test operation.

9. A testing device, characterized in that: The device comprises: The first receiving module is used to receive a text description corresponding to a test operation sent by a test terminal, wherein the text description is generated based on a preset operation description template and a page element associated with the test operation in response to the test operation on the page to be tested, and is sent when a program error occurs in the update process after the test terminal controls the page to be tested to update the page content based on the test operation, and during the update process of the page content, the text description includes an operation description of the test operation and an element description of the page element, wherein each of the preset operation description templates includes a preset, empty information item to be filled in, and each of the information items to be filled in has a function to be used. The method comprises: determining the description information of the code element corresponding to the page element associated with the test operation in the source code of the page to be tested, wherein the description information includes at least one of the class name information, object information, selector information, unit information and view information corresponding to the code element; and filling the description information into the information item corresponding to the operation description template based on the description information and the identification information of the information item to be filled in the operation description template to obtain the text description corresponding to the test operation. A positioning module is used to locate the error based on the text description.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.