CN116467223B - Method, device, system, equipment and medium for generating test report - Google Patents

Method, device, system, equipment and medium for generating test report Download PDF

Info

Publication number
CN116467223B
CN116467223B CN202310729171.7A CN202310729171A CN116467223B CN 116467223 B CN116467223 B CN 116467223B CN 202310729171 A CN202310729171 A CN 202310729171A CN 116467223 B CN116467223 B CN 116467223B
Authority
CN
China
Prior art keywords
test
data
test report
snapshot
report
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310729171.7A
Other languages
Chinese (zh)
Other versions
CN116467223A (en
Inventor
肖鹏涛
刘健
张同虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202310729171.7A priority Critical patent/CN116467223B/en
Publication of CN116467223A publication Critical patent/CN116467223A/en
Application granted granted Critical
Publication of CN116467223B publication Critical patent/CN116467223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device, a system, equipment and a medium for generating a test report. The invention relates to the technical field of big data. The method comprises the following steps: generating a request by acquiring a test report triggered by a user; the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request; converting the test data into a test report view corresponding to the test report category based on the category converter; rendering the test report view to display the test report. According to the embodiment of the disclosure, the test data is converted into the test report view corresponding to the test report category based on the category converter, and the test report view is rendered to display the test report, so that the generation efficiency of the test report can be effectively improved.

Description

Method, device, system, equipment and medium for generating test report
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a method, a device, a system, equipment and a medium for generating a test report.
Background
The financial industry has high requirements on software functions, and a large amount of testing work is required before the software is put into production in order to ensure the quality and stability of the software. The testing work is controlled by a strict testing flow, and only the compliant testing activities can meet the online requirement of the financial software. In the test management and control activity, the test report is a key delivery object of the test activity, and can show the sufficiency and rationality of the test. The test report is signed by the test manager to mark the end of the test activity. The test report is signed by the business sector for use as a credential for subsequent functional delivery.
Traditional test report generation methods are classified into manual and automatic generation.
The manual generation mode of the test report is to manually summarize the requirement items, the functional modules, the test cases and the test defect information and manually compile the test report. The manual compiling of the test report is time-consuming and labor-consuming, the test report format is not uniform, the report compiling requirement is likely to be unsatisfied, and the error rate is high. The automatic generation mode can greatly improve the efficiency, and can generate a standard report file according to the service requirement, however, the existing automatic generation mode has certain defects.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a system, equipment and a medium for generating a test report, which can improve the efficiency of generating the test report.
In a first aspect, an embodiment of the present invention provides a method for generating a test report, including: acquiring a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request; converting the test data into a test report view corresponding to the test report category based on the category converter; rendering the test report view to display a test report.
In a second aspect, an embodiment of the present invention further provides a device for generating a test report, including: the test report generation request acquisition module is used for acquiring a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category; the test data and class converter acquisition module is used for acquiring the test data and class converter based on the test report request; the conversion module is used for converting the test data into a test report view corresponding to the test report category based on the category converter; and the rendering module is used for rendering the test report view so as to display a test report.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a method for generating a test report according to any one of the embodiments of the present invention when the processor executes the program.
In a fourth aspect, embodiments of the present invention further provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating a test report according to any of the embodiments of the present invention.
In the embodiment of the invention, the request is generated by acquiring the test report triggered by the user; the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request; converting the test data into a test report view corresponding to the test report category based on the category converter; rendering the test report view to display the test report. According to the embodiment of the disclosure, the test data is converted into the test report view corresponding to the test report category based on the category converter, and the test report view is rendered to display the test report, so that the generation efficiency of the test report can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a test report generation provided by an embodiment of the present invention;
FIG. 2 is a flowchart of another method for generating a test report according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system architecture for generating a test report according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another system architecture for generating test reports according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a test report generating device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
The existing automatic generation test report has the following defects: 1) Temporarily collecting data is detrimental to the repeated generation of reports and may lead to inconsistent report content from one generation to the next, resulting in a loss of effectiveness of the test report; 2) The data model is not uniform, and the data user needs to develop data processing analysis codes, so that a large number of repeated codes are caused, and the later maintenance and expansion are not facilitated.
Fig. 1 is a flowchart of a test report generation provided in an embodiment of the present invention, where the embodiment is applicable to a case of generating a test report, the method may be performed by a test report generating device, and the device may be implemented in hardware and/or software, and the test report generating device may be configured in an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like. As shown in fig. 1, the method includes:
S110, acquiring a test report generation request triggered by a user.
The test report generation request comprises a test report identifier and a test report category.
The test report identifier may be used to identify test content, where the test content may be a functional test, a performance test, etc., and the test report identifier may be an identifier of a certain part of the functional tests in a certain Application (APP), for example. The test report category can be divided into a document category and a webpage category, namely an offline file and an online file. The document category may be word file, pdf file, text file, etc., which is not limited in this embodiment.
S120, acquiring test data and a class converter based on the test report request.
In this embodiment, corresponding test data is obtained through a test report identifier in a test report request, and a corresponding class converter is obtained through a test report class in the test report request. The relationship between the test report category and the category converter can be understood as a one-to-one correspondence, and each test report category has a corresponding category converter. The class transformer may be considered a set-up transformation function that may be used to transform test data into a test report view corresponding to a test report class. The test data comprises custom test data and actual test data.
S130, converting the test data into a test report view corresponding to the test report category based on the category converter.
In this embodiment, the test data may be converted into the test report view corresponding to the test report category by the category converter. Wherein a test report view may be understood as an unrendered test report in the underlying computer layer.
And S140, rendering the test report view to display a test report.
In this embodiment, any rendering manner may be used to render the test report view, so as to display the test report on the display interface.
In the embodiment of the invention, the request is generated by acquiring the test report triggered by the user; the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request; converting the test data into a test report view corresponding to the test report category based on the category converter; rendering the test report view to display the test report. According to the embodiment of the disclosure, the test data is converted into the test report view corresponding to the test report category based on the category converter, and the test report view is rendered to display the test report, so that the generation efficiency of the test report can be effectively improved.
Fig. 2 is a flowchart of another method for generating a test report according to an embodiment of the present invention. The embodiment of the invention is embodied on the basis of the embodiment of the invention, and referring to fig. 2, the method provided by the embodiment of the invention specifically comprises the following steps:
s210, acquiring a test report generation request triggered by a user.
S220, acquiring test data based on the test report identification.
In this embodiment, the user-defined test data and the actual test data may be obtained through the test report identifier.
S230, acquiring a corresponding class converter based on the test report class.
In this embodiment, the corresponding class converter may be obtained according to the class of the test report, so as to convert the test data through the class converter.
Optionally, acquiring the corresponding class converter based on the test report class includes: and acquiring a corresponding class converter based on the document class.
Wherein the test report category is a document category, and the category converter is characterized by a conversion function. According to the embodiment, the corresponding class converter is obtained through the document class, and the class converter can be accurately obtained.
Optionally, acquiring test data based on the test report identifier includes: retrieving the snapshot database according to the test report identification; if the test report snapshot corresponding to the test report identifier is retrieved from the snapshot database, analyzing the test report snapshot to obtain initial service data; if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, acquiring initial service data according to the test report identifier; test data is obtained based on the initial traffic data.
The snapshot database may be used to store a test report snapshot, and may also be understood as a backup of a test state when a test report is generated. In this embodiment, if the test report snapshot corresponding to the test report identifier is retrieved in the snapshot database, it may be stated that the corresponding test report has been generated, and the test report snapshot may be directly parsed, so as to obtain initial service data. If the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, the initial service data can be collected through the test report identifier. After the initial service data is obtained, test data may be obtained from the initial service data.
Wherein, the initial service data comprises: custom service data and actual test service data. Custom business data may be understood as subjective test data. The custom business data may refer to data that cannot be obtained from a setting database, and may include artificial subjective test data such as test purpose, test legacy problem, risk analysis, test manager, project manager's evaluation opinion, business department opinion, signature information, and the like. Actual test traffic data may be understood as objective test data. The actual test service data may refer to statistical data of objective reaction test conditions, and may include test data of actual conditions such as participant test conditions, requirement item test conditions, functional test conditions, case structure analysis, case execution conditions, defect structure analysis, defect resolution conditions, and the like. The actual test service data may be obtained from a settings database.
In this embodiment, if a test report snapshot corresponding to the test report identifier is retrieved from the snapshot database, the test report snapshot is parsed to obtain initial service data; if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, the efficiency of acquiring the test data can be improved according to the mode of acquiring the initial service data according to the test report identifier.
Optionally, acquiring test data based on the initial service data includes: carrying out first structuring treatment on the self-defined service data to obtain self-defined test data; and carrying out second structuring processing on the actual test service data to obtain the actual test data.
In this embodiment, the custom service data may be converted into custom test data, and the actual test service data may be converted into actual test data. In this embodiment, the manner of obtaining the custom test data and the actual test data by performing the first structuring process on the custom service data and performing the second structuring process on the actual test service data is convenient for the subsequent accurate processing according to the custom test data and the actual test data.
Optionally, performing a first structuring process on the custom service data to obtain custom test data, including: converting the self-defined service data into data of an object structure to obtain self-defined test data; performing second structuring processing on the actual test service data to obtain actual test data, including: and converting the actual test service data into data of an object structure to obtain the actual test data.
The object structure may be a set of several objects, which may be of the same type or of different types. The object structure may be a linear structure such as a linked list, a queue, etc. The object structure may be a tree structure, such as a binary tree. The object structure may be a graphical structure, such as a social network, map, or the like. The object structure may be a grid structure, such as a game map, a grid image, or the like. The specific content of the object structure is not limited in this embodiment. In this embodiment, the manner of converting the custom service data into the data of the object structure and converting the actual test service data into the data of the object structure, thereby obtaining the custom test data and the actual test data, is convenient for the subsequent accurate processing according to the custom test data and the actual test data.
Optionally, if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, after acquiring the test data based on the initial service data, the method further includes: converting the custom test data and the actual test data into a test report snapshot; the test report snapshot is stored in a snapshot database.
In this embodiment, if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, the initial service data is collected according to the test report identifier, and after the test data is obtained based on the initial service data, the test data may be converted into the test report snapshot, and the test report snapshot is stored in the snapshot database. Specifically, the custom test data and the actual test data may be converted into a test report snapshot, and the test report snapshot may be stored in a snapshot database. For storage, the test report snapshot may be persisted to a snapshot database using a persistence storage technique to enable permanent saving of the data.
In this embodiment, by converting the custom test data and the actual test data into the test report snapshot and storing the test report snapshot into the snapshot database, repeated collection of initial service data can be avoided.
Optionally, collecting initial service data according to the test report identifier includes: receiving user-defined service data input by a user according to the test report identification; and extracting corresponding actual test service data from the setting database according to the test report identifier.
In this embodiment, for the custom service data, the custom service data input by the user from the client may be received and identified according to the test report. For the actual test service data, the corresponding actual test service data can be extracted from the setting database according to the test report identifier. Wherein the setting database may be used for storing business data, and the setting database may be any type of database, such as a relational database.
In this embodiment, by receiving the custom service data input by the user according to the test report identifier and extracting the corresponding actual test service data from the setting database according to the test report identifier, the initial service data required by the test report can be effectively obtained.
S240, converting the test data into a test report view corresponding to the test report category based on the category converter.
And S250, rendering the test report view to display a test report.
According to the embodiment, the test report identification is used for acquiring the test data and the corresponding class converter is acquired according to the class of the test report, so that the test data can be accurately acquired and the class converter can be accurately acquired, the test data can be accurately converted into the test report view corresponding to the class of the test report through the class converter, and then the test report can be accurately displayed.
Fig. 3 is a schematic diagram of a system architecture for generating a test report according to an embodiment of the present invention. As shown in fig. 3, the system comprises a data acquisition module, a data processing module, a class conversion module and a rendering module; the data acquisition module is used for acquiring initial service data; the data processing module is used for carrying out structural processing on the initial service data to obtain test data; the class conversion module is used for converting the test data into a test report view corresponding to the test report class; the rendering module is used for rendering the test report view to display the test report.
Wherein the data acquisition module may be understood as a data collector. The data acquisition module is used for acquiring data required by the test report from the client and the setting database, and the data processing module can be understood as a data constructor which is used for generating data of an object structure required by the category conversion module from the initial service data. The rendering module is used for rendering the test report view to the corresponding test report. The class conversion module comprises conversion functions of various service data. The rendering module can render test reports required by different service parties through simple processing.
In this embodiment, initial service data is collected by the data collection module and is input to the data processing module, the data processing module performs structural processing on the initial service data to obtain test data, the test data is input to the class conversion module, the class conversion module converts the test data into a test report view corresponding to a test report class, the test report view is input to the rendering module, and the rendering module renders the test report view to display a test report. According to the embodiment of the disclosure, the data acquisition module acquires the initial service data, the data processing module carries out structural processing on the initial service data to obtain the test data, the class conversion module converts the test data into the test report view corresponding to the test report class, the rendering module renders the test report view, the test report can be generated, and the generation efficiency of the test report can be improved.
Optionally, the data acquisition module comprises a custom data acquisition unit and an actual test data acquisition unit; the data processing module comprises a custom data processing unit and an actual test data processing unit; the class conversion module is provided with a conversion function; the user-defined data acquisition unit is used for acquiring user-defined service data input by a user; the actual test data acquisition unit is used for extracting actual test service data from the setting database; the custom data processing unit is used for carrying out first structuring processing on the custom service data to obtain custom test data; the actual test data processing unit is used for carrying out second structuring processing on the actual test service data to obtain actual test data; the class conversion module calls a conversion function to convert the custom test data and the actual test data into a test report view corresponding to the test report class.
The data processing module is used for carrying out preliminary processing on the initial service data acquired by the data acquisition module to generate data of an object structure required by the category conversion module. The custom data processing unit is used for processing custom service data provided by the data acquisition module and converting the custom service data into data of an object structure required by the class conversion module. The actual test data processing unit is used for processing the actual test service data provided by the data acquisition module and converting the actual test service data into the data of the object structure required by the class conversion module. The data output by the class conversion module is a data source of the rendering module. The test data comprises custom test data generated by the custom data processing unit and actual test data generated by the actual test data processing unit, the test data is bottom data of the class conversion module, and all subsequent data query operations on the class conversion module are from the two data. Each service data has its own conversion function, so that the rendering module can conveniently obtain the required service data. The test report view is a business envelope for the transfer function.
In this embodiment, the custom data acquisition unit acquires the custom service data input by the user, the actual test data acquisition unit extracts the actual test service data from the setting database, the custom data acquisition unit inputs the custom service data to the custom data processing unit, and the custom data processing unit performs a first structuring process on the custom service data to obtain the custom test data. The actual test data acquisition unit inputs the actual test service data to the actual test data processing unit, and the actual test data processing unit performs second structuring processing on the actual test service data to obtain the actual test data. The class conversion module calls a conversion function to convert the custom test data and the actual test data into test report views corresponding to the test report classes, the class conversion module inputs the test report views into the rendering module, and the rendering module renders the test report views to display the test report.
In this embodiment, the custom data acquisition unit acquires the custom service data input by the user, the actual test data acquisition unit extracts the actual test service data from the setting database, the custom data processing unit performs the first structuring process on the custom service data to obtain the custom test data, the actual test data processing unit performs the second structuring process on the actual test service data to obtain the actual test data, and the class conversion module invokes the conversion function to convert the custom test data and the actual test data into the test report view corresponding to the test report class, so that the test report can be effectively generated, and the generation efficiency of the test report can be effectively improved.
Optionally, the method further comprises: the snapshot generation module and the snapshot analysis module; the snapshot generating module is used for converting the test data into a test report snapshot; the snapshot analysis module is used for analyzing the test report snapshot.
The snapshot analysis module is used for reading the durable test report snapshot from the snapshot database, transmitting the analysis of the test report snapshot to the custom data processing unit and the actual test data processing unit, and outputting the object structure by the custom data processing unit and the actual test data processing unit.
In this embodiment, the custom test data and the actual test data may be converted into a test report snapshot by the snapshot generating module, and the test report snapshot may be stored in the snapshot database. The test report snapshot can be parsed by the snapshot parsing module to input the parsed test report snapshot into the data processing module. According to the embodiment, the test data is converted into the test report snapshot through the snapshot generating module, the test report snapshot can be effectively generated, and the test report snapshot in the snapshot database can be analyzed into the data which can be processed by the data processing module through the mode that the snapshot analyzing module analyzes the test report snapshot.
Fig. 4 is a schematic diagram of another system architecture for generating a test report according to an embodiment of the present invention. As shown in fig. 4, the user inputs the custom service data in the client, and the custom data acquisition unit receives the custom service data input by the user according to the test report identifier. And the actual test data acquisition unit extracts corresponding actual test service data from the setting database according to the test report identifier. The custom data processing unit performs first structuring processing on the custom service data to obtain custom test data. And the actual test data processing unit performs second structuring processing on the actual test service data to obtain actual test data. The class conversion module calls a conversion function to convert the custom test data and the actual test data into test report views corresponding to the test report classes, and the rendering module renders the test report views to display the test report. The test report may be a document test report and a web page test report. Custom test data and actual test data may also be converted to test report snapshots by the snapshot generation module, and the test report snapshots may be stored in a snapshot database. The test report snapshot can be parsed by the snapshot parsing module so as to be input into the data processing module.
In this embodiment, the test report snapshot is saved, and the test state when the test report is generated can be repeatedly loaded.
The system comprises a data acquisition module, a data processing module, a class conversion module and a rendering module, wherein different modules are responsible for different works, so that the aim of code decoupling is fulfilled. In this embodiment, the test report generating system provides a unified data processing and processing interface, so that different users do not need to develop data processing and processing codes independently, and the effect of unifying data processing logic is achieved.
Fig. 5 is a schematic structural diagram of a test report generating device according to an embodiment of the present invention. As shown in fig. 5, the apparatus includes a test report generation request acquisition module 510, a test data and class converter acquisition module 520, a conversion module 530, and a rendering module 540;
a test report generation request acquisition module 510, configured to acquire a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category;
a test data and class converter acquisition module 520 for acquiring test data and class converters based on the test report request;
a conversion module 530, configured to convert the test data into a test report view corresponding to the test report category based on the category converter;
And a rendering module 540, configured to render the test report view to display a test report.
In the embodiment of the invention, a test report generation request triggered by a user is acquired through a test report generation request acquisition module; the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request through a test data and class converter acquisition module; converting the test data into a test report view corresponding to the test report category based on the category converter through the conversion module; and rendering the test report view through a rendering module to display the test report. According to the embodiment of the disclosure, the test data is converted into the test report view corresponding to the test report category based on the category converter, and the test report view is rendered to display the test report, so that the generation efficiency of the test report can be effectively improved.
Optionally, the test data and class converter acquisition module is specifically configured to: acquiring test data based on the test report identifier; the test data comprises custom test data and actual test data; and acquiring a corresponding class converter based on the test report class.
Optionally, the test report category is a document category. Optionally, the test data and class converter acquisition module is further configured to: acquiring a corresponding class converter based on the test report class, including: acquiring a corresponding class converter based on the document class; wherein the class transformer is characterized by a transfer function.
Optionally, the test data and class converter acquisition module is further configured to: retrieving a snapshot database according to the test report identification; if the test report snapshot corresponding to the test report identifier is retrieved from the snapshot database, analyzing the test report snapshot to obtain initial service data; wherein the initial service data includes: custom service data and actual test service data; if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, acquiring initial service data according to the test report identifier; and acquiring test data based on the initial service data.
Optionally, the test data and class converter acquisition module is further configured to: carrying out first structuring treatment on the self-defined service data to obtain self-defined test data; and carrying out second structuring processing on the actual test service data to obtain actual test data.
Optionally, the test data and class converter acquisition module is further configured to: converting the self-defined service data into data of an object structure to obtain self-defined test data; and converting the actual test service data into data of an object structure to obtain actual test data.
Optionally, the apparatus further includes: the test report snapshot storage module is specifically used for: converting the custom test data and the actual test data into a test report snapshot; and storing the test report snapshot into the snapshot database.
Optionally, the test data and class converter acquisition module is further configured to: receiving user-defined service data input by a user according to the test report identification; and extracting corresponding actual test service data from a setting database according to the test report identifier.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Fig. 6 shows a block diagram of an electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention. Device 12 is a typical electronic device that enables the generation of test reports.
As shown in fig. 6, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors 16, a memory 28, a bus 18 that connects the various system components, including the memory 28 and the processor 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry standard architecture (Industry Standard Architecture, ISA) bus, micro channel architecture (Micro Channel Architecture, MCA) bus, enhanced ISA bus, video electronics standards association (Video Electronics Standards Association, VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnect, PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory, RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a disk drive for reading from and writing to a removable nonvolatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from and writing to a removable nonvolatile optical disk (e.g., a Compact Disc-Read Only Memory (CD-ROM), digital versatile Disc (Digital Video Disc-Read Only Memory, DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, camera, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., local area network (Local Area Network, LAN), wide area network Wide Area Network, WAN) and/or a public network, such as the internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) systems, tape drives, data backup storage systems, and the like.
The processor 16 executes various functional applications and data processing by running programs stored in the memory 28, for example, to implement the test report generation method provided by the above-described embodiment of the present invention.
The embodiment of the invention provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the program is executed by a processing device, the method for generating a test report according to the embodiment of the invention is realized. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (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.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category; acquiring test data and a class converter based on the test report request; converting the test data into a test report view corresponding to the test report category based on the category converter; rendering the test report view to display a test report.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. A method of generating a test report, comprising:
acquiring a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category;
acquiring test data and a class converter based on the test report request;
converting the test data into a test report view corresponding to the test report category based on the category converter;
rendering the test report view to display a test report;
wherein obtaining test data based on the test report request includes:
Retrieving a snapshot database according to the test report identification;
if the test report snapshot corresponding to the test report identifier is retrieved from the snapshot database, analyzing the test report snapshot to obtain initial service data; wherein the initial service data includes: custom service data and actual test service data; the user-defined service data are subjective test data, and cannot be obtained from a setting database; the actual test service data are statistical data of objective reaction test conditions and can be obtained from a setting database;
if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, acquiring initial service data according to the test report identifier;
acquiring test data based on the initial service data; the test data comprises custom test data and actual test data;
if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, after acquiring the test data based on the initial service data, the method further includes:
converting the custom test data and the actual test data into a test report snapshot;
And storing the test report snapshot into the snapshot database.
2. The method of claim 1, wherein obtaining a class transformer based on the test report request comprises:
and acquiring a corresponding class converter based on the test report class.
3. The method of claim 2, wherein the test report category is a document category, and wherein obtaining a corresponding category converter based on the test report category comprises:
acquiring a corresponding class converter based on the document class; wherein the class transformer is characterized by a transfer function.
4. The method of claim 1, wherein obtaining test data based on the initial traffic data comprises:
carrying out first structuring treatment on the self-defined service data to obtain self-defined test data;
and carrying out second structuring processing on the actual test service data to obtain actual test data.
5. The method of claim 4, wherein performing a first structuring process on the custom service data to obtain custom test data comprises:
converting the self-defined service data into data of an object structure to obtain self-defined test data;
Performing second structuring processing on the actual test service data to obtain actual test data, including:
and converting the actual test service data into data of an object structure to obtain actual test data.
6. The method of claim 1, wherein collecting initial traffic data based on the test report identification comprises:
receiving user-defined service data input by a user according to the test report identification;
and extracting corresponding actual test service data from a setting database according to the test report identifier.
7. A test report generating apparatus, comprising:
the test report generation request acquisition module is used for acquiring a test report generation request triggered by a user; wherein the test report generation request comprises a test report identifier and a test report category;
the test data and class converter acquisition module is used for acquiring the test data and class converter based on the test report request;
the conversion module is used for converting the test data into a test report view corresponding to the test report category based on the category converter;
the rendering module is used for rendering the test report view so as to display a test report;
The test data and class converter acquisition module is specifically configured to: retrieving a snapshot database according to the test report identification; if the test report snapshot corresponding to the test report identifier is retrieved from the snapshot database, analyzing the test report snapshot to obtain initial service data; wherein the initial service data includes: custom service data and actual test service data; the user-defined service data are subjective test data, and cannot be obtained from a setting database; the actual test service data are statistical data of objective reaction test conditions and can be obtained from a setting database; if the test report snapshot corresponding to the test report identifier is not retrieved in the snapshot database, acquiring initial service data according to the test report identifier; acquiring test data based on the initial service data; the test data comprises custom test data and actual test data;
the test report snapshot storage module is used for: converting the custom test data and the actual test data into a test report snapshot; and storing the test report snapshot into the snapshot database.
8. A test report generation system implementing the test report generation method of claim 1, comprising: the device comprises a data acquisition module, a data processing module, a class conversion module and a rendering module;
the data acquisition module is used for acquiring initial service data; the data processing module is used for carrying out structuring processing on the initial service data to obtain test data; the class conversion module is used for converting the test data into a test report view corresponding to the test report class; the rendering module is used for rendering the test report view so as to display the test report; the system also comprises a snapshot generating module and a snapshot analyzing module; the snapshot generating module is used for converting the test data into a test report snapshot; the snapshot analysis module is used for analyzing the test report snapshot.
9. The system of claim 8, wherein the data acquisition module comprises a custom data acquisition unit and an actual test data acquisition unit; the data processing module comprises a custom data processing unit and an actual test data processing unit; the class conversion module is provided with a conversion function;
The user-defined data acquisition unit is used for acquiring user-defined service data input by a user; the actual test data acquisition unit is used for extracting actual test service data from the setting database; the custom data processing unit is used for carrying out first structuring processing on the custom service data to obtain custom test data; the actual test data processing unit is used for performing second structuring processing on the actual test service data to obtain actual test data; and the class conversion module calls the conversion function to convert the custom test data and the actual test data into a test report view corresponding to the test report class.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating a test report according to any one of claims 1-6 when executing the computer program.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of generating a test report according to any of claims 1-6.
CN202310729171.7A 2023-06-20 2023-06-20 Method, device, system, equipment and medium for generating test report Active CN116467223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310729171.7A CN116467223B (en) 2023-06-20 2023-06-20 Method, device, system, equipment and medium for generating test report

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310729171.7A CN116467223B (en) 2023-06-20 2023-06-20 Method, device, system, equipment and medium for generating test report

Publications (2)

Publication Number Publication Date
CN116467223A CN116467223A (en) 2023-07-21
CN116467223B true CN116467223B (en) 2023-09-19

Family

ID=87179286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310729171.7A Active CN116467223B (en) 2023-06-20 2023-06-20 Method, device, system, equipment and medium for generating test report

Country Status (1)

Country Link
CN (1) CN116467223B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885649A (en) * 2016-09-29 2018-04-06 平安科技(深圳)有限公司 The performance test methods and device of IOS application programs
CN108959101A (en) * 2018-07-27 2018-12-07 郑州云海信息技术有限公司 Test result processing method, device, equipment and memory software testing system
CN109597766A (en) * 2018-12-14 2019-04-09 深圳壹账通智能科技有限公司 A kind of processing method and system of test report
KR20190118056A (en) * 2018-04-09 2019-10-17 슈어소프트테크주식회사 Credibility test result management data auto generation method and credibility test result management data auto generation apparatus
CN110380939A (en) * 2019-08-08 2019-10-25 重庆邮电大学 The conformance test method and system of local communication protocol in a kind of power information acquisition system
CN113051155A (en) * 2021-03-11 2021-06-29 中国信息通信研究院 Control system and control method of automatic test platform
CN113220586A (en) * 2021-05-31 2021-08-06 五八到家有限公司 Automatic interface pressure test execution method, device and system
CN113672514A (en) * 2021-08-24 2021-11-19 平安国际智慧城市科技股份有限公司 Test method, test device, server and storage medium
US11200157B1 (en) * 2019-09-17 2021-12-14 Amazon Technologies, Inc. Automated execution reporting for container builds
CN114238138A (en) * 2021-12-22 2022-03-25 建信金融科技有限责任公司 Test data processing method, device, equipment and storage medium
CN115358203A (en) * 2022-08-23 2022-11-18 湖北亿纬动力有限公司 Test report method, test report device, electronic equipment and storage medium
CN116151199A (en) * 2022-12-28 2023-05-23 云控智行科技有限公司 Method, device and equipment for generating network-connected vehicle test report
CN116258129A (en) * 2022-12-27 2023-06-13 北京康斯特仪表科技股份有限公司 Method and system for generating personalized test report

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7284194B2 (en) * 2001-10-23 2007-10-16 Sun Microsystems, Inc. XML based report generator
US7203928B2 (en) * 2002-12-31 2007-04-10 Sun Microsystems, Inc. Method and system for generating and maintaining uniform test results
US9317416B2 (en) * 2014-05-20 2016-04-19 International Business Machines Corporation Merging automated testing reports
TWI811663B (en) * 2021-04-14 2023-08-11 國立臺灣大學 Method and apparatus for generating software test reports

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885649A (en) * 2016-09-29 2018-04-06 平安科技(深圳)有限公司 The performance test methods and device of IOS application programs
KR20190118056A (en) * 2018-04-09 2019-10-17 슈어소프트테크주식회사 Credibility test result management data auto generation method and credibility test result management data auto generation apparatus
CN108959101A (en) * 2018-07-27 2018-12-07 郑州云海信息技术有限公司 Test result processing method, device, equipment and memory software testing system
CN109597766A (en) * 2018-12-14 2019-04-09 深圳壹账通智能科技有限公司 A kind of processing method and system of test report
CN110380939A (en) * 2019-08-08 2019-10-25 重庆邮电大学 The conformance test method and system of local communication protocol in a kind of power information acquisition system
US11200157B1 (en) * 2019-09-17 2021-12-14 Amazon Technologies, Inc. Automated execution reporting for container builds
CN113051155A (en) * 2021-03-11 2021-06-29 中国信息通信研究院 Control system and control method of automatic test platform
CN113220586A (en) * 2021-05-31 2021-08-06 五八到家有限公司 Automatic interface pressure test execution method, device and system
CN113672514A (en) * 2021-08-24 2021-11-19 平安国际智慧城市科技股份有限公司 Test method, test device, server and storage medium
CN114238138A (en) * 2021-12-22 2022-03-25 建信金融科技有限责任公司 Test data processing method, device, equipment and storage medium
CN115358203A (en) * 2022-08-23 2022-11-18 湖北亿纬动力有限公司 Test report method, test report device, electronic equipment and storage medium
CN116258129A (en) * 2022-12-27 2023-06-13 北京康斯特仪表科技股份有限公司 Method and system for generating personalized test report
CN116151199A (en) * 2022-12-28 2023-05-23 云控智行科技有限公司 Method, device and equipment for generating network-connected vehicle test report

Also Published As

Publication number Publication date
CN116467223A (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN111339186B (en) Workflow engine data synchronization method, device, medium and electronic equipment
CN110347840B (en) Prediction method, system, equipment and storage medium for complaint text category
CN110263277B (en) Page data display method, page data updating device, page data equipment and storage medium
CN111949850B (en) Multi-source data acquisition method, device, equipment and storage medium
EP3916584A1 (en) Information processing method and apparatus, electronic device and storage medium
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN111913922B (en) Binary structured log generation method, device, equipment and storage medium
CN113657088A (en) Interface document analysis method and device, electronic equipment and storage medium
CN116467223B (en) Method, device, system, equipment and medium for generating test report
CN111930385A (en) Data acquisition method, device, equipment and storage medium
CN116185393A (en) Method, device, equipment, medium and product for generating interface document
CN112597171A (en) Table relation visualization method and device, electronic equipment and storage medium
CN111241180A (en) Information processing method, device, equipment and storage medium
CN115186738B (en) Model training method, device and storage medium
CN113792138B (en) Report generation method and device, electronic equipment and storage medium
CN113050987B (en) Method and device for generating interface document, storage medium and electronic equipment
US11734299B2 (en) Message templatization for log analytics
CN115391361A (en) Real-time data processing method and device based on distributed database
CN114265966A (en) Data processing method and device, electronic equipment and storage medium
CN109062797B (en) Method and device for generating information
CN114219643A (en) Transaction calling method, device, equipment and storage medium
CN114546780A (en) Data monitoring method, device, equipment, system and storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN110515807B (en) Database table monitoring method, device, equipment and storage medium
CN112667614A (en) Data processing method and device and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant