Test report generation method and device

By matching template categories based on user information, automatically obtaining data test templates and target test data, and generating test reports that meet user needs, the problems of low efficiency and low quality in the existing technology are solved, and efficient and accurate test report generation is achieved.

CN115080429BActive Publication Date: 2025-08-19PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210742966.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-08-19
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the prior art, the generation efficiency of test reports is low and the quality is not high, manual filling of forms is prone to errors, and the general test report template cannot meet the personalized needs of different departments, resulting in a lot of interfering with data and affecting the generation efficiency and quality of test reports.

Method used

By obtaining data test templates from the preset template library according to the selected template category, and obtaining target test data from the test database, generating test reports, using user information to match template categories, automatically forming test reports that meet user needs, reducing interfering data, and improving generation efficiency and quality.

Benefits of technology

It improves the efficiency and quality of test reports generation, reduces interfering data, shortens the response time, and improves query efficiency and business investigation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115080429B_ABST
    Figure CN115080429B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology and provides a test report generation method and apparatus. The method comprises: obtaining a data test template corresponding to a selected template category from a preset template library; obtaining, based on the data test template, target test data corresponding to each test component in the data test template from each test data in a test database; and generating a test report based on each target test data and the data test template. The test report generation method provided in the embodiments of the present application can improve the efficiency of test report generation and the quality of the generated test reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a test report generation method and device. Background Art

[0002] With the continuous development of science and technology, more and more online businesses are being carried out. To ensure the availability of online businesses, they need to be tested before going online. Test reports are generated to organize and analyze a large number of test results.

[0003] In related technologies, test reports are mainly manually produced by test engineers based on the test results of the entire business. Test engineers manually write the test cases and corresponding test results one by one into a designed universal test report template. However, this manual form filling method is not only time-consuming but also prone to errors, affecting the efficiency of test report generation. In addition, different departments usually have different focuses on test results. For any department, the test report generated using the universal test report template will contain a large amount of interfering data, resulting in the inability to quickly obtain valid test data from the test report, affecting the quality of the test report. Summary of the Invention

[0004] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a test report generation method that can improve the generation efficiency of the test report and the quality of the generated test report.

[0005] This application also proposes a test report generating device.

[0006] The present application also provides an electronic device.

[0007] The present application also provides a computer-readable storage medium.

[0008] The test report generation method according to the first embodiment of the present application includes:

[0009] According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library;

[0010] According to the data test template, acquiring each target test data corresponding to each test component in the data test template from each test data in the test database;

[0011] Generate a test report based on each of the target test data and the data test template;

[0012] The test data is data obtained during the testing process of any test instance.

[0013] The test report generation method provided in the embodiment of the present application obtains a data test template through a selected template category, and based on each test component in the data test template, extracts the target test data corresponding to each test component from the test data to form a test report with the data test template, thereby being able to obtain the corresponding data test template and data based on the user's different test result acquisition requirements to automatically form the test report required by the user, reducing time consumption, avoiding a large amount of interference data in the generated test report, and thereby improving the generation efficiency of the test report and the quality of the generated test report.

[0014] 3. According to one embodiment of the present application, obtaining a data test template corresponding to the selected template category from a preset template library includes:

[0015] receiving a test report generation request, and obtaining user information from the test report generation request;

[0016] Determining the template category corresponding to the user information according to the user information;

[0017] According to the template category, a data test template corresponding to the template category is obtained from a preset template library.

[0018] According to one embodiment of the present application, obtaining a data test template corresponding to the template category from a preset template library according to the template category includes:

[0019] According to the template category, obtaining a test component set corresponding to the template category from a preset template library;

[0020] In response to a selection operation on a test component set, the corresponding test components are acquired from the test component set according to the selection operation to generate the data test template.

[0021] According to one embodiment of the present application, the selection operation includes a click operation.

[0022] According to one embodiment of the present application, obtaining, from each test data in a test database, target test data corresponding to each test component in the data test template according to the data test template includes:

[0023] According to the data test template, acquiring from a test database each candidate test data corresponding to any test component in the data test template;

[0024] Sending version information of each candidate test data to a terminal device;

[0025] According to the target version information selected by the terminal device from each piece of version information, target test data corresponding to the target version information is acquired from each piece of candidate test data.

[0026] According to one embodiment of the present application, generating a test report based on each of the target test data and the data test template includes:

[0027] Comparing any target test data with preset abnormal data, and determining a label corresponding to the target test data according to a comparison result between the preset abnormal data and the target test data;

[0028] Marking the target test data according to the label to obtain marked data;

[0029] Write any of the markup data into the corresponding test component in the data test template to obtain a page file;

[0030] Load the page file and generate a test report;

[0031] The preset abnormal data is data generated when an error occurs in the test.

[0032] According to one embodiment of the present application, loading the page file and generating a test report includes:

[0033] Obtaining the test component recording the markup data with the tag as the target tag from the page file, loading the component, and generating a test report;

[0034] The target tag indicates that the comparison results are the same.

[0035] A test report generating device according to an embodiment of the second aspect of the present application includes:

[0036] A test template acquisition module is used to acquire a data test template corresponding to the selected template category from a preset template library according to the selected template category;

[0037] A test data acquisition module, configured to acquire, from the test data in the test database, target test data corresponding to the test components in the data test template according to the data test template;

[0038] A test report generating module, configured to generate a test report based on each of the target test data and the data test template;

[0039] The test data is data obtained during the testing process of any test instance.

[0040] According to an embodiment of the third aspect of the present application, the electronic device includes a processor and a memory storing a computer program, and when the processor executes the computer program, the test report generation method described in any of the above embodiments is implemented.

[0041] According to the computer-readable storage medium of the fourth embodiment of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the test report generating method described in any of the above embodiments is implemented.

[0042] According to the computer program product of the fifth embodiment of the present application, the computer program product includes: when the computer program is executed by a processor, the test report generation method as described in any of the above embodiments is implemented.

[0043] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0044] Through the selected template category, the data test template is obtained, and based on the test components in the data test template, the target test data corresponding to each test component is extracted from the test data to form a test report with the data test template, so that the corresponding data test template and data can be obtained based on the user's different test results to automatically form the test report required by the user, reducing time consumption and avoiding a large amount of interference data in the generated test report, thereby improving the generation efficiency of the test report and the quality of the generated test report.

[0045] Furthermore, by obtaining user information to match template categories, the corresponding data test template is obtained according to the template category corresponding to the user information, so that the template category selected by the user can be automatically determined, avoiding providing multiple template categories for users to choose from, improving the efficiency of obtaining data test templates, and at the same time improving the security of the process of obtaining data test templates.

[0046] Furthermore, after obtaining the test component set corresponding to the template category from the preset template library, based on the selection operation of the test component set, the selected test components are determined from the test component set to generate a data test template, so that the generated data test template is more in line with user needs and improves the efficiency of subsequent users in finding relevant data from the test report.

[0047] Furthermore, each target test data item is compared with pre-set exception data generated when a test error occurs. Based on the comparison results, a label for each target test data item is determined. Each target test data item is then tagged according to the label and written into the test component. A page file is then retrieved and loaded to generate a test report. This allows subsequent queries for test data in the test report to quickly identify relevant test data using the test data label, improving test data query efficiency.

[0048] Furthermore, by obtaining the test component that records the tagged data with the target tag from the page file for loading, only the abnormal tagged data needs to be loaded, thereby reducing the amount of data loaded, avoiding slow loading of the test report due to excessive loading of data, and avoiding difficulty for users to find abnormal test data, thereby shortening the response time of the test report and improving the efficiency of business troubleshooting. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0050] Figure 1 This is a flow chart of a test report generation method provided in an embodiment of the present application;

[0051] Figure 2 In the embodiment of this application Figure 1 A flow chart of obtaining a data test template in a test report generation method;

[0052] Figure 3 In the embodiment of this application Figure 1 A schematic diagram of a process for obtaining target test data in a test report generation method;

[0053] Figure 4 In the embodiment of this application Figure 1 A flow chart of test report generation in a test report generation method;

[0054] Figure 5 This is a schematic diagram of the structure of the test report generating device provided in an embodiment of the present application;

[0055] Figure 6 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.

[0057] Below, the test report generation method and device provided in the embodiments of the present application will be introduced and explained in detail through several specific embodiments.

[0058] In one embodiment, a test report generation method is provided, which is applied to a server for generating a test report. The server can be a standalone server or a server cluster consisting of multiple servers. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence sampling point devices.

[0059] like Figure 1 As shown, a test report generation method provided in this embodiment includes:

[0060] Step 101: According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library;

[0061] Step 102: acquiring target test data corresponding to test components in the data test template from test data in a test database according to the data test template;

[0062] Step 103: Generate a test report based on the target test data and the data test template;

[0063] The test data are data obtained during the testing process of any test instance.

[0064] Through the selected template category, the data test template is obtained, and based on the test components in the data test template, the target test data corresponding to each test component is extracted from the test data to form a test report with the data test template, so that the corresponding data test template and data can be obtained based on the user's different test results to automatically form the test report required by the user, reducing time consumption and avoiding a large amount of interference data in the generated test report, thereby improving the generation efficiency of the test report and the quality of the generated test report.

[0065] In one embodiment, the server is pre-configured with multiple test components, and all test components form a preset template library. Each test component can be based on the pafa5 framework and configured through apollo to adapt to various test environments. Exemplarily, the test component is used to represent a certain scenario in the business, such as credit card public account binding, new and old accounts, N transactions of N yuan, cumulative amount consumption, etc. By inputting a certain data of the business during execution into the corresponding test component, the test data can be successfully constructed. For example, for credit card public account binding, you only need to enter the customer number and whether it is bound (1 or 0) to get the test data corresponding to the test component.

[0066] The number and type of each test component can be updated and supplemented regularly based on business updates.

[0067] In one embodiment, each test component is pre-configured based on different template categories to form different data test templates, such as customer information, customer operation, and system configuration. Test components of the same template category form a single data test template. The template category to which each test component belongs can be set based on actual circumstances.

[0068] In one embodiment, the server may generate links for each template category and push each link to the terminal device for the user to select. If the user selects one or more template categories in the links for each template category, such as clicking on a link for a template category, the server retrieves a data test template corresponding to the template category from a preset template library.

[0069] Considering that there may be many template categories, users may make mistakes when manually selecting template categories, and test reports usually need to be kept confidential, in order to improve the efficiency of obtaining data test templates and improve the security of the process of obtaining data test templates, in one embodiment, Figure 2 As shown, the method of obtaining a data test template corresponding to the selected template category from a preset template library according to the selected template category includes:

[0070] Step 201: receiving a test report generation request and obtaining user information from the test report generation request;

[0071] Step 202: determining the template category corresponding to the user information based on the user information;

[0072] Step 203: According to the template category, a data test template corresponding to the template category is obtained from a preset template library.

[0073] In one embodiment, a user can initiate a test report generation request to the server via a test report generation control displayed on a terminal device. Upon receiving the test report generation request from the user, the server examines the user information in the test report generation request. This user information may include the user's name and department. After obtaining the user information, the server matches the user information with a database table on the server that records the correspondence between each user information item and each template category. The server then determines the template category corresponding to the user information and then determines a data test template based on the template category.

[0074] By obtaining user information to match template categories, the corresponding data test template is obtained according to the template category corresponding to the user information, so that the template category selected by the user can be automatically determined, avoiding providing multiple template categories for users to choose from, improving the efficiency of obtaining data test templates, and at the same time improving the security of the process of obtaining data test templates.

[0075] In order to make the generated data test template more in line with user needs, in one embodiment, according to the template category, a data test template corresponding to the template category is obtained from a preset template library, including:

[0076] According to the template category, obtaining a test component set corresponding to the template category from a preset template library;

[0077] In response to a selection operation on a test component set, the corresponding test components are acquired from the test component set according to the selection operation to generate the data test template.

[0078] In one embodiment, the server is pre-configured with multiple test components, each of which is grouped based on a different template category. After determining the template category selected by the user, a test component set consisting of all test components belonging to the template category is pushed to the user's terminal device for selection. The user can select the test components they need from the test component set by clicking, dragging, or other selection operations based on actual needs, thereby forming a data test template with the test components selected by the user.

[0079] After obtaining the test component set corresponding to the template category from the preset template library, based on the selection operation of the test component set, the selected test components are determined from the test component set to generate a data test template, so that the generated data test template is more in line with user needs and improves the efficiency of subsequent users in finding relevant data from the test report.

[0080] In one embodiment, after obtaining a data test template, any test component in the data test template is matched against a test database storing various test data to obtain test data for the scenario represented by the test component. For example, if the scenario represented by the test component is WeChat public account binding, test data indicating the customer number and whether the customer number is bound is obtained from the test database as target test data corresponding to the test component.

[0081] Considering that the business may include multiple different versions, in order to improve the accuracy of the acquired target test data, in one embodiment, Figure 3As shown, according to the data test template, obtaining each target test data corresponding to each test component in the data test template from each test data in the test database includes:

[0082] Step 301: acquiring, from a test database, the candidate test data corresponding to any test component in the data test template according to the data test template;

[0083] Step 302: Send the version information of each candidate test data to the terminal device;

[0084] Step 303 : According to the target version information selected by the terminal device from each of the version information, target test data corresponding to the target version information is acquired from each of the candidate test data.

[0085] In one embodiment, because a service may include multiple versions, the same test component may correspond to multiple test data in the test database. If multiple test data corresponding to a test component is retrieved from the test database, the version information corresponding to each multiple data item is sent to the terminal device for the user to select. After receiving the version information selected by the user through the terminal device, the version information is used as the target version information, and the candidate test data corresponding to the target version information is retrieved as the target test data.

[0086] After obtaining the target test data, the target test data can be recorded in the corresponding test component in the data test template, and then the activity information of the activity scene of the target test data, such as the activity name and activity period, is obtained. After marking each test component that writes the target test data, each test component is saved to the same static page file through interface staticization technology, so that when the page file is rendered to the display interface of the terminal device, a test report can be generated on the display interface.

[0087] To facilitate data query in the test report, in one embodiment, Figure 4 As shown, the test report is generated according to each of the target test data and the data test template, including:

[0088] Step 401: Compare any target test data with preset abnormal data, and determine a label corresponding to the target test data based on the comparison result between the preset abnormal data and the target test data;

[0089] Step 402: label the target test data according to the label to obtain labeled data;

[0090] Step 403: Write any of the markup data into the corresponding test component in the data test template to obtain a page file;

[0091] Step 404: Load the page file and generate a test report;

[0092] The preset abnormal data is data generated when an error occurs in the test.

[0093] In one embodiment, after obtaining each target test data, each target test data can be compared with pre-set exception data. Pre-set exception data refers to alarm data, such as "null," "false," or "warning," generated when a test error occurs in a specific scenario. For example, in the scenario of binding a credit card to a public account, if the test is normal, the test data will be the customer number and whether the account is bound (1 or 0); if the test is abnormal, the test data will be alarm data.

[0094] If the target test data is identical to the preset abnormal data, the target test data is abnormal, and the label of the target test data is determined to be the target label indicating abnormality. Otherwise, the label of the target test data is determined to be the normal label indicating normality. The target label and the normal label can be color labels, such as a red label for the target label and a green label for the normal label.

[0095] In one embodiment, after determining the label corresponding to each target test data, each label is added to the corresponding target test data, each target test data is marked to form each marked data, and then each marked data is written into the corresponding test component in the data test template, and each test component is saved to the same page file through interface staticization technology.

[0096] When a user performs a viewing operation on the page file, such as a click operation on the page file, the page file is retrieved and loaded into the display interface in response to the viewing operation, and a test report is generated so that the user can view the test report through the display interface. When the page file is loaded, for different tags of the marked data, the area on the display interface displaying the marked data is marked with the tag corresponding to the marked data. For example, if the tag of a certain marked data is a red tag, the area on the display interface displaying the marked data is marked red.

[0097] By comparing each target test data set with pre-set exception data generated when a test error occurs, the tag for each target test data set is determined based on the comparison results. Each target test data set is then tagged according to the tag and written into the test component. This is then loaded from a page file to generate a test report. This allows subsequent queries of test data in the test report to quickly identify relevant test data using the tags, improving query efficiency.

[0098] Considering that there may be a large number of test components in the page file, the target test data displayed will also be very large. The test report is used to troubleshoot abnormal test data of the business. If too much test data is displayed, it will be inconvenient for users to find abnormal data and will also affect the loading speed of the test report. Therefore, in order to shorten the loading time of the test report and improve the efficiency of troubleshooting business abnormalities, in one embodiment, loading the page file and generating the test report includes:

[0099] Obtaining the test component recording the markup data with the tag as the target tag from the page file, loading the component, and generating a test report;

[0100] The target tag indicates that the comparison results are the same.

[0101] In one embodiment, upon receiving a user's request to view a page file, the system detects the tags of each tagged data item in the page file in response to the request. If the tag of a particular tagged data item matches a target tag indicating an abnormal comparison result, the tagged data item is considered abnormal. A test component containing the tagged data item is then loaded into a display interface, generating a test report so that the user can directly view the abnormality of the service.

[0102] Exemplarily, the target tag is a red tag. When a user's viewing operation on a page file is received, in response to the viewing operation, the test component that records the tag data marked by the red tag in the page file is loaded into the display interface to form a test report, so that the marked data is displayed in a red font in the test report, or the marked data is displayed in red in the display area of its test component.

[0103] By obtaining the test component that records the tagged data with the target tag from the page file and loading it, only the abnormal tagged data needs to be loaded, which reduces the amount of data loaded, avoids too much data being loaded causing the test report to load too slowly, and avoids the difficulty for users to find abnormal test data, thereby shortening the response time of the test report and improving the efficiency of business troubleshooting.

[0104] The test report generating device provided in the present application is described below. The test report generating device described below and the test report generating method described above can refer to each other.

[0105] In one embodiment, if Figure 5 As shown, a test report generating device is provided, comprising:

[0106] The test template acquisition module 210 is used to acquire a data test template corresponding to the selected template category from a preset template library according to the selected template category;

[0107] The test data acquisition module 220 is used to acquire, according to the data test template, target test data corresponding to each test component in the data test template from each test data in the test database;

[0108] A test report generating module 230 is configured to generate a test report based on each of the target test data and the data test template;

[0109] The test data is data obtained during the testing process of any test instance.

[0110] Through the selected template category, the data test template is obtained, and based on the test components in the data test template, the target test data corresponding to each test component is extracted from the test data to form a test report with the data test template, so that the corresponding data test template and data can be obtained based on the user's different test results to automatically form the test report required by the user, reducing time consumption and avoiding a large amount of interference data in the generated test report, thereby improving the generation efficiency of the test report and the quality of the generated test report.

[0111] In one embodiment, the test template acquisition module 210 is specifically configured to:

[0112] receiving a test report generation request, and obtaining user information from the test report generation request;

[0113] Determining the template category corresponding to the user information according to the user information;

[0114] According to the template category, a data test template corresponding to the template category is obtained from a preset template library.

[0115] In one embodiment, the test template acquisition module 210 is specifically configured to:

[0116] According to the template category, obtaining a test component set corresponding to the template category from a preset template library;

[0117] In response to a selection operation on a test component set, the corresponding test components are acquired from the test component set according to the selection operation to generate the data test template.

[0118] In one embodiment, the selection operation includes a click operation.

[0119] In one embodiment, the test data acquisition module 220 is specifically configured to:

[0120] According to the data test template, acquiring from a test database each candidate test data corresponding to any test component in the data test template;

[0121] Sending version information of each candidate test data to a terminal device;

[0122] According to the target version information selected by the terminal device from each piece of version information, target test data corresponding to the target version information is acquired from each piece of candidate test data.

[0123] In one embodiment, the test report generation module 230 is specifically configured to:

[0124] Comparing any target test data with preset abnormal data, and determining a label corresponding to the target test data according to a comparison result between the preset abnormal data and the target test data;

[0125] Marking the target test data according to the label to obtain marked data;

[0126] Write any of the markup data into the corresponding test component in the data test template to obtain a page file;

[0127] Load the page file and generate a test report;

[0128] The preset abnormal data is data generated when an error occurs in the test.

[0129] In one embodiment, the test report generation module 230 is specifically configured to:

[0130] Obtaining the test component recording the markup data with the tag as the target tag from the page file, loading the component, and generating a test report;

[0131] The target tag indicates that the comparison results are the same.

[0132] Figure 6 An example of a physical structure diagram of an electronic device is shown below. Figure 6 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call a computer program in the memory 830 to execute a test report generation method, for example, including:

[0133] According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library;

[0134] According to the data test template, acquiring each target test data corresponding to each test component in the data test template from each test data in the test database;

[0135] Generate a test report based on each of the target test data and the data test template;

[0136] The test data is data obtained during the testing process of any test instance.

[0137] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0138] On the other hand, an embodiment of the present application further provides a storage medium, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the test report generation method provided in each of the above embodiments, for example, including:

[0139] According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library;

[0140] According to the data test template, acquiring each target test data corresponding to each test component in the data test template from each test data in the test database;

[0141] Generate a test report based on each of the target test data and the data test template;

[0142] The test data is data obtained during the testing process of any test instance.

[0143] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, which stores a computer program. The computer program is used to cause a processor to execute the methods provided in the above embodiments, for example, including:

[0144] According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library;

[0145] According to the data test template, acquiring each target test data corresponding to each test component in the data test template from each test data in the test database;

[0146] Generate a test report based on each of the target test data and the data test template;

[0147] The test data is data obtained during the testing process of any test instance.

[0148] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NAND FLASH), solid-state drives (SSDs)), etc.

[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0150] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A test report generation method, characterized in that: include: According to the selected template category, a data test template corresponding to the template category is obtained from a preset template library; According to the data test template, acquiring each target test data corresponding to each test component in the data test template from each test data in the test database; Generate a test report based on each of the target test data and the data test template; The test data is the data obtained during the test of any test instance; Generating a test report according to each of the target test data and the data test template includes: Comparing any target test data with preset abnormal data, and determining a label corresponding to the target test data according to a comparison result between the preset abnormal data and the target test data; Marking the target test data according to the label to obtain marked data; Write any of the markup data into the corresponding test component in the data test template to obtain a page file; Obtaining the test component of the marked data with the tag being the target tag from the page file, loading the tag, and generating a test report; The preset abnormal data is data generated when an error occurs in the test, and the target label indicates that the comparison results are the same; The step of obtaining a data test template corresponding to the selected template category from a preset template library according to the selected template category includes: receiving a test report generation request, and obtaining user information from the test report generation request; Determining the template category corresponding to the user information according to the user information; According to the template category, obtaining a test component set corresponding to the template category from a preset template library; In response to a selection operation on a test component set, the corresponding test components are acquired from the test component set according to the selection operation to generate the data test template.

2. The test report generation method according to claim 1, characterized in that: The selection operation includes a click operation.

3. The test report generation method according to claim 1, wherein: According to the data test template, obtaining target test data corresponding to each test component in the data test template from each test data in the test database includes: According to the data test template, acquiring each candidate test data corresponding to any test component in the data test template from a test database; Sending version information of each candidate test data to a terminal device; According to the target version information selected by the terminal device from each piece of version information, target test data corresponding to the target version information is acquired from each piece of candidate test data.

4. A test report generating device, characterized in that: include: A test template acquisition module is used to acquire a data test template corresponding to the selected template category from a preset template library according to the selected template category; A test data acquisition module, configured to acquire, from the test data in the test database, target test data corresponding to the test components in the data test template according to the data test template; A test report generating module, configured to generate a test report based on each of the target test data and the data test template; The test data is the data obtained during the test of any test instance; The test report generation module is specifically used for: Comparing any target test data with preset abnormal data, and determining a label corresponding to the target test data according to a comparison result between the preset abnormal data and the target test data; Marking the target test data according to the label to obtain marked data; Write any of the markup data into the corresponding test component in the data test template to obtain a page file; Obtaining the test component of the marked data with the tag being the target tag from the page file, loading the tag, and generating a test report; The preset abnormal data is data generated when an error occurs in the test, and the target label indicates that the comparison results are the same; The test template acquisition module is specifically used to: receiving a test report generation request, and obtaining user information from the test report generation request; Determining the template category corresponding to the user information according to the user information; According to the template category, obtaining a test component set corresponding to the template category from a preset template library; In response to a selection operation on a test component set, the corresponding test components are acquired from the test component set according to the selection operation to generate the data test template.

5. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the test report generating method according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the test report generating method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Business test method, device and system

    CN111221739A

  • Method and device for automatically generating test report, storage medium and electronic equipment

    CN111858354A