Test report automatic generation method and device based on tracing test requirements

By exporting relevant data from the PLM system and automatically processing it, we can automatically generate a test report for traceability testing requirements after using the PLM system, solving the problems of low efficiency and poor accuracy caused by manual writing, ensuring the completeness and accuracy of the report.

CN119988210APending Publication Date: 2025-05-13CASCO SIGNAL (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411868380.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

After using the PLM system, it is impossible to use existing tools to generate test reports that trace the requirements of retrospective testing, resulting in increased costs and error risks in manual writing, and it is difficult to ensure the integrity and accuracy of the report.

Method used

It provides a method and device for automatic generation of test reports based on traceability testing requirements. By exporting use case tables and requirements confirmation allocation reports from the PLM system, it automatically finds and processes test requirements data to generate a complete and accurate test report.

Benefits of technology

The automated generation of test reports is achieved, which improves efficiency, ensures the integrity and accuracy of traceability, and reduces the risk of manual participation and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988210A_ABST
    Figure CN119988210A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for automatically generating a test report based on a traceability test demand, and relates to the technical field of test document writing in railway operation. According to the scheme provided by the invention, the whole life cycle data of a railway product is managed by utilizing a PLM system, so that a case table and a demand confirmation distribution report of each test stage can be exported from the PLM system, and then any test stage of a to-be-traced demand is taken as a first test stage; if the corresponding other test stages are second test stages, whether a target test case conforming to the first test stage exists or not is searched from the demand confirmation distribution report of each second test stage, if yes, whether the case number of the test case belongs to the first test stage or not is further searched, and if yes, the test case number of the test case belongs to the second test stage. And if not, further searching the use case content, the demand number and the demand content of the use case number for determining test demand data so as to obtain a test report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of test document writing in railway operation, and in particular to a method and device for automatically generating a test report based on traceability test requirements. Background Art

[0002] In the field of railway product applications, the Product Lifecycle Management (PLM) system is mainly used to integrate information, processes, and personnel in the entire product life cycle, including definition, design, production, support, and maintenance, to achieve collaborative R&D management.

[0003] Now, in order to ensure the safety of railway operations, a large number of stage tests are included in the entire life cycle of railway products. These test stages can be carried out in sequence or in parallel in time, but are not limited to. In one test stage, there will also be test requirements allocated from the second test stage. This is because due to some objective factors, these test requirements are only suitable for specific test operations in this test stage.

[0004] Currently, before using the PLM system, in the test case document, the Source field of each test case will be filled with the requirement number verified by the test case. This requirement number includes both the requirements of this test phase and the requirements assigned to this test phase in the second test phase. Therefore, prepare the test case documents and requirement documents for each test phase, and then enter the test case label and requirement label in the specified format in the requirement quantify tool (Requirement quantify Tool, Reqtify Tool). By running the Reqtify tool, you can generate a complete and accurate test report for tracing the test requirements for any test phase, thereby tracing back to the test requirements assigned to this test phase in the second test phase.

[0005] However, after using the PLM system, the formats of the test case documents and requirement documents stored on the system have changed and are completely incompatible with the Reqtify tool. Therefore, the Reqtify tool can no longer be used to generate this test report, and it has to be replaced by manual assistance to write and implement this test report. Such excessive manual participation not only greatly increases costs, but also makes it difficult to avoid errors and cannot guarantee completeness and accuracy. Summary of the invention

[0006] The present application provides a method and device for automatically generating a test report based on tracing test requirements. The main purpose is to automatically generate a test report for tracing the test requirements assigned to this test phase in other test phases, thereby providing an automated solution that is not only efficient but also ensures the integrity and accuracy of traceability.

[0007] In order to achieve the above objectives, this application mainly provides the following technical solutions:

[0008] The first aspect of the present application provides a method for automatically generating a test report based on traceability test requirements, the method comprising:

[0009] Exporting a use case table corresponding to the first test phase from the PLM system, wherein the use case table stores test case data corresponding to the first test phase;

[0010] Exporting a plurality of demand confirmation allocation reports from the PLM system, wherein the plurality of demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases;

[0011] Searching the second requirement confirmation allocation report for a target test case that meets the requirements of the first test phase;

[0012] If so, determining whether the test case number of the target test case exists in the test case data corresponding to the first test phase;

[0013] If so, obtaining the requirement number, requirement content and use case content corresponding to the use case number from the second requirement confirmation allocation table;

[0014] According to the use case number and its corresponding requirement number, the requirement content and the use case content, the test requirement data assigned to the first test phase in the second test phase is determined, and a test report for tracing the test requirements is generated.

[0015] A second aspect of the present application provides a device for automatically generating a test report based on traceability test requirements, the device comprising:

[0016] A first exporting unit, configured to export a use case table corresponding to a first test phase from a PLM system, wherein the use case table stores test case data corresponding to the first test phase;

[0017] A second exporting unit is used to export a plurality of demand confirmation allocation reports from the PLM system, wherein the plurality of demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases;

[0018] A searching unit, configured to search the second requirement confirmation allocation report for a target test case that meets the requirements of the first test phase;

[0019] A judging unit, configured to judge whether a test case number of the target test case exists in the test case data corresponding to the first test phase when a target test case that meets the first test phase is found in the second requirement confirmation allocation report;

[0020] an acquiring unit, configured to acquire, when determining that the case number of the target test case exists in the test case data corresponding to the first test phase, the requirement number, requirement content and case content corresponding to the case number from the second requirement confirmation allocation table;

[0021] A generating unit is used to determine the test requirement data allocated from the second test phase to the first test phase according to the use case number and its corresponding requirement number, the requirement content and the use case content, and to generate a test report for tracing the test requirements.

[0022] A third aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for automatically generating a test report based on traceability test requirements as described above is implemented.

[0023] The fourth aspect of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for automatically generating a test report based on traceability test requirements as described above is implemented.

[0024] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0025] The present application provides a method and device for automatically generating a test report based on traceable test requirements. The present application uses a PLM system to manage the entire life cycle data of railway products, and accordingly, a use case table and a requirement confirmation allocation report for each test phase can be exported from the PLM system. Then, any test phase of the requirement to be traced is taken as the first test phase, and the corresponding other test phases are taken as the second test phase. Then, by searching from the requirement confirmation allocation report of each second test phase whether there is a target test case that meets the first test phase, if so, further searching whether the use case number of the test case belongs to the first test phase, and if so, further searching the use case content, requirement number and requirement content of the use case number for generating test requirement data, so that a test report can be generated based on such test requirement data to characterize the test requirements assigned to this test phase from all other test phases.

[0026] Compared with the prior art, which has technical problems of low efficiency and poor accuracy due to manual assistance in generating such test reports, the present application provides automatic generation of test reports for tracing the test requirements assigned to this test phase from other test phases, thereby providing an automated solution that is not only efficient but also ensures the integrity and accuracy of traceability.

[0027] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0029] Figure 1 A flow chart of a method for automatically generating a test report based on traceability test requirements provided in an embodiment of the present application;

[0030] Figure 2 Another flow chart of a method for automatically generating a test report based on traceability test requirements provided in an embodiment of the present application

[0031] Figure 3 A schematic diagram of a human-computer interaction interface provided by a tool exemplified in an embodiment of the present application;

[0032] Figure 4 A block diagram of a test report automatic generation device based on traceability test requirements provided in an embodiment of the present application;

[0033] Figure 5 A block diagram of another device for automatically generating test reports based on traceability test requirements provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0035] Now, after using the PLM system, and when the requirement quantify tool (Requirement quantify Tool, Reqtify Tool) cannot be used, we have to use manual assistance to write and implement this test report. For example, the writing process can include but is not limited to the following:

[0036] For example, assuming that the current test phase is software requirement test (SwRT), and the other test phases are system requirement test (SyRT) and subsystem requirement test (SsyRT), and there is one requirement document in the system requirement test phase and five requirement documents in the subsystem requirement test phase, then in order to trace the test requirements assigned to the current test phase from other test phases, the process of manually assisted test report writing includes the following steps: (1)-(4);

[0037] (1) In the PLM system, for each requirement document of each other test phase (such as SyRT, SsyRT), export the corresponding requirement confirmation allocation report (ValidationAllocation Table_Report, VAT_Report). Each VAT_Report table describes the test allocation relationship of all requirement items in a corresponding requirement document. According to the above assumptions, 6 VAT_Report tables should be exported here, including 1 VAT_Report table for SyRT and 5 VAT_Report tables for SsyRT.

[0038] (2) For each VAT_Report table exported in (1), filter out the requirement items assigned to this test phase (SwRT);

[0039] (3) modifying the requirement items selected in (2) according to the format required by the specified table form of the test report;

[0040] (4) Fill the modified content information in (3) back into the test report. The test report is used to trace the test requirements assigned to this test phase from other test phases.

[0041] The inventors have found that the entire life cycle of railway products includes a large number of stage tests. If any one of them is determined as the "current test stage", in comparison, all test stages except the "current test stage" are regarded as "other test stages", then the number of "other test stages" may be very large. If each "other test stage" contains multiple requirement documents, then the number of VAT_Report forms of the "other test stages" finally exported from the PLM system will usually reach more than a dozen. If each VAT_Report form requires manual assistance, then the document processing workload will be very large, and the huge human workload will inevitably lead to errors and omissions.

[0042] To this end, the inventors discovered that the entire life cycle of railway products includes a large number of stage tests. According to relative rules, any test stage can be confirmed as the "current test stage", and each "current test stage" will have multiple "other test stages" relatively. Then, if for each "current test stage", the test requirements of "other test stages" assigned to the "current test stage" can be automatically found to automatically generate corresponding test reports, the processing efficiency and accuracy will be greatly improved.

[0043] Based on the above considerations, the embodiment of the present application provides a method for automatically generating a test report based on traceability test requirements, and the execution subject is a pre-written automated test report generation tool, such as Figure 1 As shown, the present application embodiment provides the following specific steps:

[0044] 101. Export a use case table corresponding to the first test phase from the PLM system, where the use case table stores test case data corresponding to the first test phase.

[0045] The entire life cycle of railway products includes a large number of stage tests. If any one of them is determined as the "current test stage", in comparison, all test stages except the "current test stage" are regarded as "other test stages". In order to distinguish between the "current test stage" and the "other test stages", the embodiment of the present application uses the words "first" and "second" for identification. The "first" and "second" are only used as identifications, and there is no ambiguity in other sorting. The "current test stage" is identified as the "first test stage", and the "other test stages" are identified as the "second test stage". It can be seen that, relative to a "first test stage", there can be one or more "second test stages".

[0046] 102. Export multiple demand confirmation allocation reports from the PLM system, where the multiple demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases.

[0047] The entire life cycle of railway products includes a large number of stage tests. Each test stage may include one or more requirement documents. In the PLM system, a requirement confirmation allocation report (ValidationAllocation Table_Report, VAT_Report) corresponding to each requirement document can be exported.

[0048] Accordingly, the embodiment of the present application distinguishes these exportable VAT_Reports by the first test phase and the second test phase, and also uses the words "first" and "second" to identify them, thereby obtaining a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to the second test phase, thereby facilitating finding the demand entries allocated to the first test phase in the second demand confirmation allocation table.

[0049] For example, for different stage tests included in the entire life cycle of railway products, the present application embodiment cites some VAT_Reports, including the following:

[0050] VAT_Report_BDU.xlsx → Test the Balise Driver Unit (BDU);

[0051] VAT_Report_CBI.xlsx→Test Computer Based Interlocking (CBI);

[0052] VAT_Report_CCS.xlsx→Test Communication Control System (CCS);

[0053] VAT_Report_DVCOM.xlsx→Test the Double Channel Communication Board (DVCOM);

[0054] VAT_Report_LCD.xlsx→Test LKD2-KA line data configuration (Line Configuration Data of LKD2-KA);

[0055] VAT_Report_LEU.xlsx → Test Lineside Electronic Unit;

[0056] VAT_Report_Reserve.xlsx→Test TCPS active and standby systems (Normal and Reserve TCPS);

[0057] 103. Check from the second requirement confirmation allocation report whether there are target test cases that meet the requirements of the first test phase.

[0058] 104. If so, determine whether the case number of the target test case exists in the test case data corresponding to the first test phase.

[0059] 105. If it exists, obtain the requirement number, requirement content and use case content corresponding to the use case number from the second requirement confirmation allocation table.

[0060] 106. According to the use case number and its corresponding requirement number, requirement content and use case content, determine the test requirement data allocated to the first test phase in the second test phase, and generate a test report for tracing the test requirements.

[0061] As shown in 103-106, the automatic query operation in the second requirement confirmation allocation report is performed for the embodiment of the present application. In order, it is first queried whether there are target test cases that meet the requirements of the first test phase. If so, it is further determined whether the use case numbers of these target test cases are in the test case data of the first test phase to further determine whether these target test cases belong to the first test phase. If so, it indicates that these target test cases are compiled based on the requirements allocated to the first test phase, so as to further query the corresponding requirement numbers, requirement contents and use case contents of these target test cases in the second test phase, so as to trace back to these requirement items and generate a test report for tracing test requirements.

[0062] As described above, the embodiment of the present application provides a method for automatically generating a test report based on tracing test requirements. Compared with the prior art, the technical problems of low efficiency and poor accuracy caused by manually assisting in generating such a test report, the present application provides a method for automatically generating a test report for tracing the test requirements assigned to the current test stage in other test stages, thereby providing an automated solution, which is not only efficient, but also ensures the integrity and accuracy of the traceability.

[0063] In order to manage the data information in the requirement confirmation allocation report more comprehensively and in detail, and to facilitate the efficient, complete and accurate search of the requirement items assigned to the first test phase from the second requirement confirmation allocation report, the requirement confirmation allocation report designed in the embodiment of the present application includes three table column areas, such as the requirement table column area, the test case table column area and the decomposition table column area, as shown in Table 1 below.

[0064] Table 1

[0065]

[0066] The test case table column area is mainly used to indicate which test phase the test case belongs to, such as but not limited to: a first attribute column field and a second attribute column field, the first attribute column field is used to indicate whether the test case corresponds to the current test phase, and the second attribute column field is used to indicate the test phase to which the test case belongs. As shown in Table 2 below:

[0067] Table 2

[0068]

[0069]

[0070] The decomposition table column area is mainly used to store the use case number and use case content, such as but not limited to: the third attribute column field and the fourth attribute column field, the third attribute column field is used to store the use case number, and the fourth attribute column field is used to store the use case content. As shown in Table 3 below:

[0071] Table 3

[0072]

[0073] The requirement table column area is mainly used to store relevant data information of the requirement items, such as but not limited to: the fifth attribute column field and the sixth attribute column field, the fifth attribute column field is used to store the requirement number, and the sixth attribute column field is used to store the requirement content. As shown in Table 4 below:

[0074] Table 4

[0075]

[0076] It should be noted that the words "first" to "sixth" are only used as identifiers to distinguish different attribute columns, and there is no sorting ambiguity. In addition, the present application embodiment does not limit the naming of the "first" to "sixth" attribute columns. It also does not limit the positions of the first to sixth attribute columns in each table. Tables 1 to 4 above are only exemplary examples of the present application embodiment.

[0077] The requirement table column area, the test case table column area, and the decomposition table column area can each include multiple attribute column fields, which are not shown one by one in the embodiments of the present application. In addition, in each table column area, you can use certain filtering conditions to perform filtering operations on the attribute column, and each filtering operation will be linked to the three table column areas. Therefore, based on the three different types of data information stored in the three table column areas, the embodiment of the present application divides a requirement confirmation allocation report into three data areas to facilitate the implementation of three progressive search operations in the search logic, thereby facilitating the filtering of data layer by layer and realizing efficient search for specified requirement items.

[0078] Based on the requirement confirmation allocation report after the above detailed design, the embodiment of the present application also provides another method for automatically generating a test report based on traceability test requirements, and the execution subject is still a pre-written automated test report generation tool, such as Figure 2 As shown, the present application embodiment provides the following specific steps:

[0079] 201. Export a use case table corresponding to the first test phase from the PLM system, where the use case table stores test case data corresponding to the first test phase.

[0080] 202. Export multiple demand confirmation allocation reports from the PLM system, where the multiple demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases.

[0081] 203. By searching the column information of the first attribute column field in the column area of ​​the test case table, it is determined whether there is a test case to be checked that does not belong to the current test phase.

[0082] 204. If so, determine whether there is a target test case that meets the requirements of the first test phase in the test case to be checked by searching the column information of the second attribute column field.

[0083] 205. If there is a target test case that meets the requirements of the first test phase among the test cases to be checked, obtain the target test case.

[0084] 206. Obtain the use case number corresponding to the target test case by searching the column information of the third attribute column field in the decomposition table column area.

[0085] 207. Compare the use case numbers with the test case data corresponding to the first test phase one by one to determine whether there are identical use case numbers.

[0086] 208. If the same use case number exists, search for use case content that matches the use case number from the column information of the fourth attribute column field in the decomposition table column area.

[0087] 209. From the column information of the fifth attribute column field in the requirement table column area, find the requirement number corresponding to the use case number.

[0088] 210. From the column information of the sixth attribute column field, search for the requirement content that matches the requirement number.

[0089] 211. According to the use case number and its corresponding requirement number, requirement content and use case content, determine the test requirement data allocated to the first test phase in the second test phase, and generate a test report for tracing the test requirements.

[0090] In combination with 201-211 above, the embodiments of the present application are explained in detail in combination with the following Example 1 and Tables 1, 2, 3 and 4.

[0091] Step 1, the present application embodiment writes an automated test report generation tool, such as the executable file ExcelGenTool.exe of the tool, and the configuration file Marks.ini of the construction tool. By double-clicking the executable file ExcelGenTool.exe, the tool can be started, for example, to open Figure 3 All test phases are configured in the configuration file Marks.ini, so that after the tool is started, the document data of all test phases can be identified by reading the configuration file, which greatly improves the scalability of the tool to different test phases. For example, if the test phases are increased / reduced in the future, it is only necessary to increase / decrease in the configuration file Marks.ini without modifying the software code of the device.

[0092] Step 2: Prepare the input files required by the tool, including the following:

[0093] (1) Export the attachment Summary.xlsm from the overall test report of the PLM system. The test report of the traceability test requirements generated by the embodiment of the present application is actually a data table, which is a sheet page in Summary.xlsm;

[0094] (2) Export the test case table TestCase.xlsx of this test phase from the PLM system;

[0095] (3) Export the required VAT_Report form from the PLM system, that is, including a selected VAT_Report form for this test phase and multiple VAT_Report forms for other test phases.

[0096] Step 3: Start the automation tool and follow the human-computer interaction interface provided by the tool, such as Figure 3As shown, enter the file in the option box, including the following:

[0097] (1) "Use Case and Requirements Statistics" option box: add the test report export attachment Summary.xlsm

[0098] (2) "ALL_TestCase" option box: add the test case table TestCase.xlsx for this test phase;

[0099] (3) "Export table for current phase requirements" option box: add VAT_Report for this test phase;

[0100] (4) "Export table for other phase requirements" option box: add VAT_Report for other test phases;

[0101] (5) “Current Phase” option box: Select a test phase as this test phase.

[0102] Step 4. Click the Start Processing button, and the tool will start automatically processing the form. The specific execution process is as follows: It should be noted that in order to facilitate the distinction of different test phases, this test phase will still be referred to as the "first test phase" and other test phases will be referred to as the "second test phase".

[0103] (1),VAT_Report includes three table column areas, such as requirement table column area, test case table column area and decomposition table column area, as shown in Tables 1 to 4.

[0104] (2) The tool reads the VAT_Report of the first other test phase, and then obtains the following information in sequence: In the test case table column area, by searching the column information of the first attribute column field in the test case table column area, it is determined whether there are test cases to be checked that do not belong to this test phase; if so, by searching the column information of the second attribute column field, it is determined whether there are target test cases that meet the requirements of the first test phase in the test cases to be checked; if so, the target test cases are obtained.

[0105] For example, the tool filters a column of the first attribute column field (such as named "Validation Method"), and the filtering content is "Other test phases", and filters a column of the second attribute column field (such as named "TestValidation Phase"), and further filters it to meet the "First Test Phase".

[0106] (3) After performing the filtering operation on the test case table column area in (2), perform the filtering operation in the decomposition table column area, such as: obtaining the case number corresponding to the target test case by searching the column information of the third attribute column field in the decomposition table column area, and comparing the case number one by one with the test case data corresponding to the first test stage to determine whether there is an identical case number.

[0107] If it exists, it indicates that after the screening operation on the test case table column area, the obtained target test case needs to be allocated to the first test stage for testing.

[0108] Furthermore, according to the determined use case number of the target test case, the column information of the fourth attribute column field is continuously queried in the decomposition table column area to obtain the use case content corresponding to the use case number.

[0109] (4) After performing the filtering operation on the decomposition table column area in (3), perform the filtering operation in the requirement table column area, such as: searching for the requirement number corresponding to the use case number from the column information of the fifth attribute column field in the requirement table column area, and searching for the requirement content that matches the requirement number from the column information of the sixth attribute column field.

[0110] (5) Copy the use case number and its corresponding requirement number, requirement content and use case content to the test report table in Summary.xlsm used to trace the test requirements.

[0111] Step 5. After the tool finishes automatically processing the form, a "Complete" prompt box pops up and generates an output file Summary_Auto.xlsm. Check Summary_Auto.xlsm to see that the form of the test report for tracing test requirements has been automatically filled in.

[0112] In some modified embodiments, a large number of stage tests are included in the entire life cycle of a railway product. If any one of them is determined as the "current test stage", in comparison, all test stages except the "current test stage" are regarded as "other test stages". Then, for a "current test stage", in terms of the tracing test requirements, in order to obtain a more complete and accurate test report, the embodiment of the present application provides the following traversal operations: (1)-(3);

[0113] (1) confirming the allocation table for multiple second demands and setting the processing sequence;

[0114] (2) According to the processing sequence, the second requirement confirmation allocation table is processed one by one to obtain the test requirements allocated to the first test stage in each second test stage;

[0115] (3) Based on multiple test requirements, test requirement data corresponding to the traceability of the first test phase is obtained.

[0116] Furthermore, since each test phase can be used as the "present test phase", the embodiment of the present application can also add another level of sorting, that is, each test phase is used as the "present test phase", and the traversal operations (1)-(3) above are performed on each "present test phase", thereby achieving orderly processing of a large number of test phases, and obtaining more complete and accurate data information for each "present test phase" to execute the test requirements assigned by tracing.

[0117] As the above Figure 1 , Figure 2 The embodiment of the present application provides a device for automatically generating test reports based on tracing test requirements. The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, the device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. The device is used to trace the test requirements allocated to this test stage from other test stages, such as Figure 4 , the device comprises:

[0118] A first exporting unit 31 is used to export a use case table corresponding to the first test phase from the PLM system, wherein the use case table stores test case data corresponding to the first test phase;

[0119] A second exporting unit 32 is used to export a plurality of demand confirmation allocation reports from the PLM system, wherein the plurality of demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases;

[0120] A searching unit 33, configured to search the second requirement confirmation allocation report for a target test case that meets the requirements of the first test phase;

[0121] The judging unit 34 is configured to judge whether the case number of the target test case exists in the test case data corresponding to the first test phase when a target test case that meets the first test phase is found in the second requirement confirmation allocation report;

[0122] The acquiring unit 35 is configured to acquire the requirement number, requirement content and use case content corresponding to the use case number from the second requirement confirmation allocation table when it is determined that the use case number of the target test case exists in the test case data corresponding to the first test phase;

[0123] The generating unit 36 ​​is used to determine the test requirement data allocated from the second test phase to the first test phase according to the use case number and the corresponding requirement number, the requirement content and the use case content, and generate a test report for tracing the test requirements.

[0124] Furthermore, the first requirement confirmation allocation report and the second requirement confirmation allocation report each include a requirement table column area, a test case table column area and a decomposition table column area.

[0125] Further, such as Figure 5 As shown, the test case table column area at least includes: a first attribute column field and a second attribute column field, the first attribute column field is used to indicate whether the test case corresponds to the current test phase, and the search unit 33 is specifically used to:

[0126] By searching the column information of the first attribute column field in the test case table column area, it is determined whether there is a test case to be checked that does not belong to the current test phase;

[0127] If so, determining whether there is a target test case that meets the requirements of the first test phase in the test case to be checked by searching the column information of the second attribute column field;

[0128] If it exists, obtain the target test case.

[0129] Further, such as Figure 5 As shown, the decomposition table column area at least includes: a third attribute column field and a fourth attribute column field, the third attribute column field is used to store the use case number, and the fourth attribute column field is used to store the use case content, and the judgment unit 34 is specifically used to:

[0130] Obtaining the case number corresponding to the target test case by searching the column information of the third attribute column field in the decomposition table column area;

[0131] The case numbers are compared one by one with the test case data corresponding to the first test phase to determine whether there are identical case numbers.

[0132] Further, such as Figure 5 As shown, the requirement table column area at least includes: a fifth attribute column field and a sixth attribute column field, the fifth attribute column field is used to store the requirement number, and the sixth attribute column field is used to store the requirement content. The acquisition unit 35 is specifically used to:

[0133] Find the requirement number corresponding to the use case number from the column information of the fifth attribute column field in the requirement table column area;

[0134] From the column information of the sixth attribute column field, search for requirement content that matches the requirement number.

[0135] Further, such as Figure 5 As shown, before generating the test report of the traceability test requirement, the device further includes:

[0136] A setting unit 37, configured to set a processing sequence for a plurality of second demand confirmation allocation tables;

[0137] A processing unit 38, configured to process the second requirement confirmation allocation table one by one according to the processing sequence, so as to obtain each test requirement allocated from the second test stage to the first test stage;

[0138] The generating unit 36 ​​is further configured to obtain the traceable test requirement data corresponding to the first test phase according to the plurality of test requirements.

[0139] In summary, a test report automatic generation device based on traceability test requirements includes a processor and a memory. The above-mentioned first export unit, second export unit, search unit, judgment unit, acquisition unit and generation unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0140] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and by adjusting the kernel parameters, a test report for tracing the test requirements assigned to this test phase in other test phases can be automatically generated, thereby providing an automated solution that is not only efficient, but also ensures the integrity and accuracy of the traceability.

[0141] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned method for automatically generating a test report based on traceability test requirements is implemented.

[0142] An embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the above-mentioned method for automatically generating a test report based on traceability test requirements is implemented.

[0143] The embodiment of the present application also provides a computer program product, which, when executed on a data processing device, is used to execute the program steps of the above-mentioned method for automatically generating a test report based on traceability test requirements.

[0144] The present application is described by flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0145] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.

[0146] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.

[0147] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0148] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0149] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0150] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for automatically generating a test report based on traceability test requirements, the method comprising: Exporting a use case table corresponding to the first test phase from the PLM system, wherein the use case table stores test case data corresponding to the first test phase; Exporting a plurality of demand confirmation allocation reports from the PLM system, wherein the plurality of demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases; Searching the second requirement confirmation allocation report for a target test case that meets the requirements of the first test phase; If so, determining whether the test case number of the target test case exists in the test case data corresponding to the first test phase; If so, obtaining the requirement number, requirement content and use case content corresponding to the use case number from the second requirement confirmation allocation table; According to the use case number and its corresponding requirement number, the requirement content and the use case content, the test requirement data assigned to the first test phase in the second test phase is determined, and a test report for tracing the test requirements is generated.

2. The method according to claim 1, characterized in that The first requirement confirmation allocation report and the second requirement confirmation allocation report each include a requirement table column area, a test case table column area and a decomposition table column area.

3. The method according to claim 2, characterized in that The test case table column area at least includes: a first attribute column field and a second attribute column field, the first attribute column field is used to indicate whether the test case corresponds to the current test phase, and the second attribute column field is used to indicate the test phase to which the test case corresponds, and the searching from the second requirement confirmation allocation report whether there is a target test case that meets the first test phase includes: By searching the column information of the first attribute column field in the test case table column area, it is determined whether there is a test case to be checked that does not belong to the current test phase; If so, determining whether there is a target test case that meets the requirements of the first test phase in the test case to be checked by searching the column information of the second attribute column field; If it exists, obtain the target test case.

4. The method according to claim 3, characterized in that The decomposition table column area at least includes: a third attribute column field and a fourth attribute column field, the third attribute column field is used to store a use case number, and the fourth attribute column field is used to store use case content, and the determining whether the use case number of the test case exists in the test case data corresponding to the first test stage includes: Obtaining the case number corresponding to the target test case by searching the column information of the third attribute column field in the decomposition table column area; The case numbers are compared one by one with the test case data corresponding to the first test phase to determine whether there are identical case numbers.

5. The method according to claim 4, characterized in that The requirement table column area at least includes: a fifth attribute column field and a sixth attribute column field, the fifth attribute column field is used to store the requirement number, the sixth attribute column field is used to store the requirement content, and the step of obtaining the requirement number, requirement content and use case content corresponding to the use case number from the second requirement confirmation allocation table includes: Find the requirement number corresponding to the use case number from the column information of the fifth attribute column field in the requirement table column area; From the column information of the sixth attribute column field, search for requirement content that matches the requirement number.

6. The method according to any one of claims 1 to 5, characterized in that Before generating the test report of the traceability test requirement, the method further includes: Confirm the allocation table for the plurality of the second requirements and set a processing sequence; According to the processing sequence, the second requirement confirmation allocation table is processed one by one to obtain each test requirement allocated from the second test stage to the first test stage; According to the plurality of test requirements, test requirement data corresponding to the traceability of the first test phase is obtained.

7. A device for automatically generating a test report based on traceability test requirements, the device comprising: A first exporting unit, configured to export a use case table corresponding to a first test phase from a PLM system, wherein the use case table stores test case data corresponding to the first test phase; A second exporting unit is used to export a plurality of demand confirmation allocation reports from the PLM system, wherein the plurality of demand confirmation allocation reports include a first demand confirmation allocation report corresponding to the first test phase and a second demand confirmation allocation report corresponding to each of the second test phases; A searching unit, configured to search the second requirement confirmation allocation report for a target test case that meets the requirements of the first test phase; A judging unit, configured to judge whether a test case number of the target test case exists in the test case data corresponding to the first test phase when a target test case that meets the first test phase is found in the second requirement confirmation allocation report; an acquisition unit, configured to acquire, when determining that the case number of the target test case exists in the test case data corresponding to the first test phase, the requirement number, requirement content and case content corresponding to the case number from the second requirement confirmation allocation table; A generating unit is used to determine the test requirement data allocated from the second test phase to the first test phase according to the use case number and its corresponding requirement number, the requirement content and the use case content, and to generate a test report for tracing the test requirements.

8. The device according to claim 7, characterized in that The first requirement confirmation allocation report and the second requirement confirmation allocation report each include a requirement table column area, a test case table column area and a decomposition table column area.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatically generating a test report based on traceability test requirements according to any one of claims 1 to 6 is implemented.

10. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method for automatically generating a test report based on traceability test requirements as described in any one of claims 1 to 6 is implemented.