Method and system for generating test case document of complex information system

By extracting the general content of functional test cases, forming a use case template, and combining data sample templates and test item summary data for testing, the time-consuming and labor-consuming problem of compiling test cases for complex information system is solved, efficient and accurate document generation is achieved, and software quality is improved.

CN120066975AInactive Publication Date: 2025-05-30NO 15 INST OF CHINA ELECTRONICS TECH GRP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510549546.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the development of large and complex information systems, the compilation of test case documents consumes a lot of resources, and the existing technology is difficult to generate documents quickly and efficiently, resulting in insufficient test execution time and affecting the quality of the software.

Method used

By extracting the general content of each type of functional test cases, forming a use case template, combining the data sample template and test items to summarize the data, perform data legality detection, and generate test case documents.

Benefits of technology

It reduces the workload and difficulty of document compilation, reduces the error rate of manual compilation, and improves the efficiency and quality of document compilation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066975A_ABST
    Figure CN120066975A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for generating a test case document of a complex information system, and relates to the computer technology, the method comprises the following steps: extracting general content of each type of function test case to form a case template, the case template comprising static content and dynamic content; according to the dynamic content required by the use case template, test item summary data are set; providing a data sample template so as to compile a normal sample and an abnormal sample of each type of control of the tested software, and copying the sample template to a correct position in a test case document generation process; and based on the case template and the data sample template, performing data legality detection on the test item summarized data, so as to generate a test case document after the detection is passed. According to the test case document generation method, the document content compiling workload and the use difficulty can be effectively reduced, compiling errors caused by manual compiling are reduced, and the document compiling efficiency and quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method and system for generating test case documents for complex information systems. Background Art

[0002] The development process of large-scale complex information systems often has obvious stage divisions. A large number of test documents need to be prepared according to documents such as software requirement specifications in each stage, among which the scale of test case documents is the largest. Test case documents usually describe the test steps and input data of the items to be tested level by level according to chapters, and are presented in the form of test procedure tables and data sample tables. Compiling test case documents requires a large amount of test resources. However, considering the actual situation of each project, test resources and test time are often insufficient. How to quickly compile test case documents is a difficult problem that many research and development units urgently need to solve. Currently, many units write test case documents manually, which takes a long time, resulting in often insufficient time for test execution in the later stage, affecting the test effect and software quality.

[0003] To address the above problems, document generation technology can be used to improve the document compilation efficiency. Currently, there are the following several technical solutions:

[0004] Adopt the bookmark placeholder method to automatically replace the dynamic content of the Word template.

[0005] Make a template in XML (Extensible Markup Language) format, and then use engine technology to generate documents.

[0006] Batch convert Excel documents to generate custom format Word documents.

[0007] With the help of test process management tools, use the test case design data already entered into the tool to complete the automatic identification processing of test data and the generation of test case document formats and dynamic content.

[0008] However, the existing technologies have the following defects:

[0009] Maintaining the use case template in the form of bookmarks is still difficult to use and is suitable for experienced testers with development experience.

[0010] Making a template in XML format has better generation efficiency, but the template preparation process is long. Corresponding tag instructions need to be used in the template, with a high learning cost, and the maintenance workload is large when the template changes.

[0011] Using tools to batch convert Excel documents to generate custom format Word documents does not consider the compilation problem of data samples.

[0012] Using a test design data entry test management tool to generate a test case document. This method requires entering all the content of the test design in the tool and then generating it, and the workload of document preparation is still relatively large. Summary of the Invention

[0013] The embodiments of the present application provide a method and system for generating a test case document for a complex information system, so as to reduce the workload and usage difficulty of document preparation, reduce writing errors in manual preparation, and improve the writing efficiency and quality of the document.

[0014] The embodiments of the present application provide a method for generating a test case document for a complex information system, including:

[0015] Extracting the common content of each type of functional test case to form a use case template, where the use case template includes static content and dynamic content, the static content includes the description information possessed by the same functional type of different test items, and the dynamic content is written in abbreviation; and,

[0016] Setting the summary data of test items according to the dynamic content required by the use case template;

[0017] Providing a data sample template to compile the normal samples and abnormal samples of each type of control of the software under test, and used to copy the sample template to the correct position during the generation process of the test case document;

[0018] Based on the use case template and the data sample template, performing data legality detection on the summary data of test items, so as to generate a test case document after passing the detection.

[0019] The embodiments of the present application also propose a system for generating a test case document for a complex information system, including a processor and a memory, where a computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the method as described above are implemented.

[0020] The method for generating a test case document in the embodiments of the present application can effectively reduce the workload and usage difficulty of document preparation, reduce writing errors in manual preparation, and improve the writing efficiency and quality of the document.

[0021] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically described below. Brief Description of the Drawings

[0022] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0023] Figure 1 Schematic composition of the test case document generation method for the complex information system according to the embodiment of the present application;

[0024] Figure 2 Schematic basic process of the test case document generation method for the complex information system according to the embodiment of the present application;

[0025] Figure 3 Schematic functional composition of the test case document generation tool for the complex information system according to the embodiment of the present application;

[0026] Figure 4 Schematic functional relationship of the test case document generation tool for the complex information system according to the embodiment of the present application;

[0027] Figure 5 Schematic software operation process of the test case document generation tool for the complex information system according to the embodiment of the present application. Detailed implementation manners

[0028] Hereinafter, the exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be completely conveyed to those skilled in the art.

[0029] The embodiment of the present application provides a test case document generation method for a complex information system. The specific implementation scheme may include: providing a data resource design method, including use case template data, test item summary data, and use case type and location correspondence data; providing a data conflict detection and processing method during document generation to ensure data accuracy and reduce the workload of subsequent manual verification. As Figure 1 shown, in some specific examples, a test case document generation tool can also be developed to basically realize automatically reading the content of various data resource files and automatically generating test case documents according to the configuration, thereby improving the document compilation efficiency.

[0030] This application designs three types of data resources: use case template data, test item summary data, and use case type and location correspondence data. Among them, the use case template data is stored as a file in the docm format (Word document with macros enabled); the test item summary data and the use case type and location correspondence data are stored in two Sheet tables of an Excel file. The summary content of each type of use case template, test items, and the correspondence between use case types and test procedures and data samples are separated, so that a loose coupling relationship is maintained between the data resources. When the test items or use case templates change, other data does not need to be modified. Specifically, as Figure 2 shown, the method of the embodiment of this application includes the following steps:

[0031] Large and complex information systems usually focus on functions such as addition, modification, deletion, viewing, and querying. There is a lot of repetitive work in the process of writing test case documents. The test case design methods for similar functions are relatively similar, and the content has a large correlation. During the manual writing process, it is often necessary to copy and paste multiple times, and then perform multiple content replacements and modifications, which are prone to omissions, slow speed, and low sense of achievement. In step S101 of this application, the common content of each type of function test case is extracted to form a use case template, where the use case template includes static content and dynamic content. The static content includes the description information (such as the same description information) possessed by the same function type of different test items, and the dynamic content is written in abbreviations. For example, "use case name / identifier" is written as YLMCBZ, and it needs to be consistent with the abbreviated line content of the test item summary data. The test item summary data can be quickly sorted and refined from test basis documents such as software requirements (soft requirements). During the document generation process, this content is used to replace the letter abbreviations in the template.

[0032] In step S102, the test item summary data is set according to the dynamic content required by the use case template. In some embodiments, the test case document can be generated based on the test item summary data set by the use case template.

[0033] In step S103, a data sample template is provided to compile the normal samples and abnormal samples of each type of control of the software under test, which is used to copy the sample template to the correct position during the test case document generation process. The method of the embodiment of this application does not limit the specific execution order of related steps, and can be adjusted according to the actual application.

[0034] In addition to the above test procedure template, a data sample template is also provided. In a high-quality test case document, the content of the data sample table is essential. Each input item described in the data sample is closely related to the actual software under test and has low generality. However, the function interface of the software under test usually consists of controls such as text boxes, text areas, drop-down list selection boxes, time controls, and attachment upload selection boxes. Generally, the various controls used for the same software under test are the same, and the verification rules are also basically the same. The embodiment of the present application provides a data sample template to write normal samples and abnormal samples for each type of control, and copy the sample template to the correct position during the generation process of the test case document, so as to reduce the workload of testers modifying the data sample according to the actual functions as much as possible.

[0035] In step S104, based on the use case template and the data sample template, data legality detection is performed on the test item summary data to generate a test case document after passing the detection.

[0036] The test case document generation method of the embodiment of the present application can effectively reduce the workload and usage difficulty of compiling document content, reduce writing errors in manual compilation, and improve the efficiency and quality of document writing.

[0037] In some embodiments, it further includes extracting and forming test item summary data based on a test basis document, so as to use the test item summary data to replace the dynamic content in the use case template during the generation process of the test case document. For example, the test item summary data can be quickly sorted and refined according to test basis documents such as software requirements. During the document generation process, this content is used to replace the letter abbreviations in the template.

[0038] In some embodiments, it further includes providing other types of use case templates as a supplement to the typical function use case template. Only the general content of the test procedure table is filled in the other type of use case template, and the other content is left blank. Users can supplement the other content according to the summary prompt at the end of the tool operation, so as to reduce the workload of manually supplementing such use cases as much as possible while ensuring the quality of writing test cases.

[0039] In some embodiments, the set test item summary data includes: serial number, function type, module name / identifier, test key point name / identifier, menu name, use case name / identifier, use case name. The positions of the serial number and function type columns are fixed. In a specific example, the content and positions of other columns can be adjusted, and columns can be added or reduced as needed, or can be set to be empty as needed. Such data can be quickly sorted and refined from software requirements or other equivalent document content with the help of common string processing functions and data column splitting functions in Excel.

[0040] This application designs use case type and location corresponding data to better adapt to changes. When there are changes in soft requirements or other equivalent documents or when writing test case documents for different projects, users do not need to read and modify macro code. In some embodiments, it also includes configuring use case type and location corresponding data after the content of the use case template is determined during the document generation process;

[0041] The location corresponding data includes function point type, test procedure table index number, and data sample table index number. The index number refers to the table sequence number of the test procedure table or data sample table corresponding to the function type in the use case template document. Here, it is agreed that the table index of "other type use case template" is filled in the first row.

[0042] In some embodiments, based on the use case template and the data sample template, the data legality detection of the test item summary data includes:

[0043] Detect whether the content of the function point type of the test item summary data is filled. If not filled, give a prompt and continue to execute the generation only after modification;

[0044] Detect whether the use case type and location corresponding data are filled. If not filled, give a prompt.

[0045] The accurate and complete filling of data resources is the basis for generating high-quality test case documents. The embodiments of this application further provide a data legality detection and processing scheme during document generation. In some embodiments, it also includes:

[0046] In the case where the function point type data of the test item summary data is filled with content that does not exist in the use case type and location corresponding data, copy the test procedure template of other types to complete the document generation;

[0047] When the function point type of the use case type and location corresponding data lacks the "other" type, give a prompt.

[0048] Specifically for the detection and processing of the situation where the function point type is not filled, etc. In a specific example, for the test item summary data, the content of the function point type is necessary. If this data is not filled, the tool cannot copy the corresponding type of use case template. This application detects whether it is filled. If not filled, give the user the corresponding prompt information, and the user can continue to generate only after modification.

[0049] For the use case type and location corresponding data, if the function point type, test procedure table index number, etc. are not filled, it will affect the document generation. This application detects whether the above content is filled and will give the corresponding prompt if not filled.

[0050] Further processing for the illegal filling of the function point type, test procedure table index number, etc.:

[0051] Automatically detect during generation to ensure the validity of data. When the function point type data of the test item summary data is filled with content that does not exist in the use case type and location corresponding data, the processing method of the embodiment of this application is to copy the template of other types of test procedure tables to complete the document generation.

[0052] When the function point type column of the use case type and location corresponding data lacks the "other" type, the software will also give the user corresponding prompt information. The filling of the test procedure table index number should also be legal, that is, there should be a corresponding table in the use case template file. When the filling is illegal, the user will also be given corresponding prompts.

[0053] The method of this application provides a method for quickly generating test case documents. The method of this application has a small data preparation workload and high compilation efficiency. This application considers the compilation problem of data samples, further improves the quality of the generated documents, and reduces the workload of subsequent manual modification and improvement by testers.

[0054] This application provides a method for automatically generating document content applicable to different scenarios. For the generation scenarios of different document templates, a general method of copying templates and replacing dynamic content is adopted. When the template changes, users do not need to read and modify macro codes. The method of this application is also applicable to the compilation scenarios of document content such as problem handling reports and detailed test results. It supports flexible configuration of table relationships, table number styles, whether to generate titles, and initial title levels, etc.

[0055] The method of this application can assist users in quickly completing the compilation of test case documents, functional use case modeling documents of software requirement specifications, problem handling reports, etc., effectively improving the document writing efficiency, reducing the workload of testers, improving the quality of document compilation, and reducing the error rate of manual writing.

[0056] The embodiment of this application also proposes a test case document generation system for a complex information system, including a processor and a memory. A computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the method as described above are implemented.

[0057] The embodiment of this application also proposes an example of a test case document generation tool. In this embodiment, a test case document generation tool is designed and implemented by writing macro codes. Macros organize a group of commands and complete a specific task through a single command. These commands can be formed by recording or writing VBA scripts. Macros can assist users in completing many operations, reducing the workload and improving work efficiency.

[0058] (1) Software function composition

[0059] The software consists of four functional modules. During operation, it will automatically read three types of data resources. The specific functional components are as Figure 3 shown, specifically including:

[0060] 1) Data access function

[0061] The data access function realizes functions such as generating headings at all levels, calling other functional modules, and giving a summary prompt for the insufficient content of the use case template.

[0062] The use case template is in Word format. For the convenience of data processing, the summary data of test items and the corresponding data of use case types and positions are stored in Excel. Therefore, the function uses a mixed programming method of Word and Excel for data interaction.

[0063] 2) Parameter setting interface

[0064] For greater flexibility and to adapt to changes, this tool provides a parameter setting interface. For details, see Figure 4 .

[0065] Users can manually configure key parameters, including setting which columns of the test item summary table need to generate headings, need to be replaced in the test procedure, and need to be replaced in the data sample, and the default starting level from which the heading content is generated step by step, and reasonable default values are provided to improve usability.

[0066] 3) Function to obtain table index

[0067] The function to obtain table index provides the function of finding the corresponding test procedure template and data sample template table indexes in the corresponding data of use case types and positions according to the function type.

[0068] 4) Function to replace dynamic content

[0069] It realizes automatically replacing the dynamic information of the generated test procedure table and data sample table with the specified columns of the test item summary data. Specifically, which columns need to be replaced can be set in the parameter setting interface.

[0070] (2) Software operation process

[0071] The intended users of this tool are testers without programming experience. After the user runs the data access module, the tool will automatically read the summary data of test items, the corresponding data of use case types and positions in the data resource file, display the parameter setting interface, and automatically generate headings at all levels of the document according to the user settings. Copy the corresponding type of use case template to the end of the document, replace the dynamic content in the table, and then copy the data sample template as needed and replace the dynamic content to complete the document compilation. The software operation process is as Figure 5 shown.

[0072] The specific usage steps are as follows:

[0073] 1) Modify each use case template according to project requirements;

[0074] 2) With the help of common functions in Excel, data column splitting and other functions, and based on software requirements or other equivalent documents, form summary data of test items;

[0075] 3) Write data corresponding to use case types and positions according to the use case template;

[0076] 4) Click "View" >> "Macros" >> "View Macros" in the use case template document. By default, the mainSub macro is already selected. Click the "Run" button, and the test case document generation tool starts to run;

[0077] 5) Set various parameters as required in the parameter setting interface, or use the default parameter values, and submit;

[0078] 6) (Optional) After the operation ends, if summary prompt information is displayed, relevant content needs to be modified according to the prompt information;

[0079] 7) Further modify and improve content such as data samples according to the actual situation of each function.

[0080] It should be noted that in each embodiment of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including that element.

[0081] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0082] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0083] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims. All of these fall within the protection scope of the present application.

Claims

1. A method for generating test case documents for a complex information system, characterized in that: include: Extracting common content of each type of functional test case to form a case template, wherein the case template includes static content and dynamic content, the static content includes description information of the same functional type of different test items, and the dynamic content is written in abbreviations; as well as, According to the dynamic content required by the use case template, set the test item summary data; Provide data sample templates to compile normal samples and abnormal samples for each type of control in the tested software, so as to copy the sample templates to the correct location during the test case document generation process; Based on the use case template and the data sample template, data legitimacy detection is performed on the test item summary data to generate a test case document after passing the detection.

2. The method for generating test case documents for a complex information system according to claim 1, characterized in that: It also includes extracting test item summary data based on the test basis document, so as to replace the dynamic content in the test case template with the test item summary data during the test case document generation process.

3. The method for generating test case documents for a complex information system according to claim 1, characterized in that: It also includes providing other types of use case templates as a supplement to the typical functional use case templates, in which only the general content of the test procedure table is filled in the other types of use case templates, and other content is left blank.

4. The method for generating test case documents for a complex information system according to claim 1, characterized in that: The test item summary data set includes: serial number, function type, module name / ID, test point name / ID, menu name, use case name / ID, use case name, and the positions of the serial number and function type columns are fixed.

5. The method for generating test case documents for a complex information system according to claim 4, characterized in that: A test case document is generated based on the test item summary data set in the test case template.

6. The method for generating test case documents for a complex information system according to claim 1, characterized in that: It also includes configuring the use case type and location corresponding data after the content of the use case template is determined during the document generation process; The position corresponding data includes function point type, test procedure table index number, and data sample table index number.

7. The method for generating test case documents for a complex information system according to claim 1, characterized in that: Based on the use case template and the data sample template, performing data legitimacy detection on the test item summary data includes: Check whether the function point type of the test item summary data is filled in. If not, prompt and continue to generate after modification; Check whether the corresponding data of the use case type and location are filled in, and give a prompt if not filled in.

8. The method for generating test case documents for a complex information system according to claim 7, characterized in that: Also includes: When the function point type data of the test item summary data is filled with content that does not exist in the use case type and position corresponding data, copy other types of test procedure templates to complete document generation; When the function point type of the data corresponding to the use case type and location lacks the "other" type, a prompt will be given.

9. A test case document generation system for a complex information system, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • A method and related apparatus for generating test cases

    CN114936167A

  • Test sample generation method and device, readable storage medium and electronic equipment

    CN115827497A

  • Automatic test case generation platform

    CN117112400A

  • Automatic testing method and device and electronic equipment

    CN117827637A

  • Vehicle function test apparatus and method of controlling the same

    US20210001870A1