A software test case method, device, electronic device and storage medium

Through the software test case method for home design, it provides project management, demand management and use case editing modules, which solves the shortcomings of the existing platform in home design software, achieves more efficient test case design and reuse, and improves testing efficiency and user experience.

CN117785698BActive Publication Date: 2024-10-01广州极点三维信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311824290.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-10-01
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

The existing software test case platform is difficult to meet the needs of home design software, especially the lack of support in user interface design and interactive testing, and it is inconvenient to write test cases and cannot reuse test requirements.

Method used

Provides a software test case method for home design, including project management, demand management, use case management and use case editing modules, supporting use case design, review and reuse, using the Vue framework and Java development, and using page caching to implement use case temporary storage. Improve testing efficiency.

Benefits of technology

It improves the testing efficiency of home design software, reduces labor and time costs, provides a more intuitive and flexible test case editing experience, and supports quick copying and pasting of test requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785698B_ABST
    Figure CN117785698B_ABST
Patent Text Reader

Abstract

The present invention discloses a software test case method, device, electronic device and storage medium. The present invention focuses on improving the design efficiency of software test cases, is suitable for software test case design of home three-dimensional software with strong repeatability and similar requirements, supports test case design of software function testing and software home product testing, supports temporary page caching of test cases, supports users to use page functions to speed up test case design efficiency, and can be widely used in the field of computer technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of the software industry, software test case platforms are becoming increasingly important in improving software quality and stability. These platforms provide software development teams with functions such as test case creation, management, and execution to ensure the reliability and stability of software products.

[0003] Software test case platforms usually have a range of functions, including creating and managing test case libraries, automating test execution, generating detailed test reports, and tracking and monitoring test progress. These platforms support various testing methods, such as unit testing, integration testing, and system testing, to meet the needs of different projects. By using these platforms, software development teams can manage and execute test cases more effectively, thereby improving software quality and reducing error rates.

[0004] However, the relevant software test case platforms and methods have the following disadvantages:

[0005] 1. Not suitable for home design software scenarios: Related software test case platforms are usually used for software test management, while home design software focuses more on design and user experience, which does not fully match the needs of software test management. In home design software scenarios, more attention is usually paid to the testing and verification of design elements, layout, interaction, etc., while the existing platforms are mainly used to manage and track test cases to ensure the functional correctness of the software. Therefore, in home design software scenarios, existing technologies may not meet actual needs, and it is necessary to adopt test management tools that are more suitable for home design software. In addition, home design software usually involves a lot of user interface design and interaction, which require detailed testing and verification. The existing testing platforms mainly focus on the functional testing of software, and may not provide sufficient support for user interface and interaction testing.

[0006] 2. Inconvenient test case writing: For a home design software, the number of products may be huge. Each time the software is released, a large number of home improvement products are designed, so the time spent on writing test cases for product testing will be very long. The test case editing operation provided by the test platform of the prior art is not convenient. Steps can only be added line by line. Editing steps also requires clicking multiple buttons to edit the content and then save. It does not support arbitrary adjustment of the order of use case steps. The graphical interface design is outdated, and the page functions are not intuitive, etc., resulting in a poor test case editing experience and poor flexibility.

[0007] 3. Inability to reuse test requirements: Since existing testing platforms or tools are not specifically designed for home design software, they do not provide the function of quickly copying existing test requirements and their test cases. Summary of the invention

[0008] In view of this, the embodiments of the present invention provide a software test case method, device, electronic device and storage medium for home design, which can improve test efficiency and reduce labor and time costs.

[0009] An aspect of an embodiment of the present invention provides a software test case method, comprising:

[0010] In response to the project management operation instruction, a project management operation is performed on the software project information in the project management interface, wherein the project management operation includes adding, deleting, modifying and querying operations for the target project;

[0011] In response to the demand management operation instruction, the demand management operation is performed on the test demand in the demand management interface, and the demand management operation includes a new operation, a modification operation, a deletion operation and a query operation for the target demand; the demand management interface displays demand summary information, demand detailed information, an edit case entry, a download case entry, a share case entry, and an assignment tester entry;

[0012] In response to the use case management operation instruction, perform a use case management operation on the use case management interface, wherein the use case management operation includes browsing, filtering and querying the use case information, and jumping to the use case editing interface;

[0013] In response to the use case editing instruction, a use case editing operation is performed on the use case editing interface, wherein the use case editing operation is used to design and write the test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps;

[0014] In response to the use case review instruction, a use case review operation is performed on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page;

[0015] In response to the test case design instruction, a test case design operation is performed, wherein the test case design operation includes creating requirements, creating test items, and creating use cases.

[0016] Optionally, the creation of requirements in the test case design operation includes: associating software projects, filling in requirement information, and generating test requirements;

[0017] The test item creation in the test case design operation includes: selecting requirements to enter the case design, creating a new test item, filling in the test item name and sorting, and generating a test item folder;

[0018] The creation of a test case in the test case design operation includes: selecting a test item, creating a new test case under the test item, filling in the test case information and test steps, and submitting the test case after checking that everything is correct;

[0019] Among them, a test requirement includes multiple test items, and a test item includes multiple test cases.

[0020] Optionally, the method further includes a process of creating new requirements and test cases, the process including:

[0021] When a user creates a new test requirement on the front end, a new piece of information is recorded in the requirement table of the database;

[0022] Create a new test item under the requirements, create and fill in the test item name, and the newly created test item is temporarily stored in the front-end cache of the page;

[0023] Create a new test case under the test item, fill in the test steps, submit the test case, and add the basic information of the test case and the test items to which the test case belongs to the test case table in the database;

[0024] Completed the design storage of a test case;

[0025] Among them, the test item is one of the fields in the test case table, which is used to indicate that the test case belongs to a test item under this newly created requirement; the test steps are stored separately in the test step table of the database, and the test step table contains the use case field to which the steps belong, the order of the steps in the current test case, and the unique number in the database table.

[0026] Optionally, the method further includes a process of querying existing test requirements and test cases, the process including:

[0027] When the user queries for a specific test requirement on the front end, the database will search the test requirement table for the specified requirement based on the given test requirement number and requirement name combination. If it exists, the database will continue with the subsequent query. Otherwise, the database will inform the front end that the requirement does not exist.

[0028] If the requirement exists, continue to search the test case table for a test case whose fields completely match the specified test requirement number and name combination;

[0029] All the queried test cases are put into a temporary column for processing; the queried test cases contain information about the test items and test requirements to which they belong;

[0030] Traverse the test cases one by one, summarize the test cases under the same test item, sort the different test items, and finally integrate them to form a three-layer hierarchical structure of "test requirements-test items-test cases";

[0031] The processed results are returned to the front-end for processing and display according to a specific JSON structure.

[0032] Optionally, the step of creating new requirements and test cases further includes:

[0033] Add processing logic to the front-end page to intercept users from submitting incomplete information; intercepted behaviors include: no test items filled in, incomplete test case information, and test cases not corresponding to test steps.

[0034] Optionally, the method further comprises a test step of demonstrating a use case, the step comprising:

[0035] After the front end displays the hierarchical information of the requirement use case, in response to the user clicking on a test case, a request to query all the test steps of the use case is initiated on the front end;

[0036] After receiving the request, the backend will query all the associated test steps in the test case step table according to the ID number of the specified test case, and sort them according to the numerical size of the test step ID numbers in the records. A test step contains three ID field information, one is the primary key ID, one is the test step ID, and the test case ID;

[0037] After sorting the relevant information of the test steps, organize it into a specific JSON structure and return it to the front-end for processing and display;

[0038] Among them, the primary key id is used to ensure that the current step has unique identity information in the test step table; the test step id is used to record the order of this step under the use case; the test case id is used to associate all steps under the specified test case.

[0039] Optionally, the method further includes a step of implementing temporary storage of use cases using a page cache, the step comprising:

[0040] Adopting the Vue framework's Vuex state mode storage and the browser's Session storage, when the use case design module detects relevant change actions or drag actions, the use case information, step content, and sorting information are stored in the session in real time in the form of json;

[0041] Mark the uncommitted use case IDs so that when the user switches use cases, the uncommitted use case information has been stored in the session cache and the user can browse other use cases;

[0042] When the user switches back to the unsubmitted use case, the front end automatically identifies the use case ID selected by the user and queries whether the information related to this use case is stored in the front end cache record. If so, it is loaded and displayed; otherwise, it is determined that the information needs to be queried from the database.

[0043] Another aspect of the embodiment of the present invention further provides a software test case device, including:

[0044] The first module is used to perform a project management operation on the software project information in the project management interface in response to a project management operation instruction, wherein the project management operation includes an add operation, a delete operation, a modify operation, and a query operation for a target project;

[0045] The second module is used to respond to the demand management operation instruction and perform demand management operations on the test requirements in the demand management interface, wherein the demand management operations include creating, modifying, deleting and querying operations for the target requirements; the demand management interface displays demand summary information, demand detailed information, editing case entry, downloading case entry, sharing case entry and assigning testers entry;

[0046] A third module is used to perform a use case management operation on the use case management interface in response to a use case management operation instruction, wherein the use case management operation includes browsing, filtering and querying use case information, and jumping to a use case editing interface;

[0047] The fourth module is used to perform a use case editing operation on the use case editing interface in response to a use case editing instruction, wherein the use case editing operation is used to design and write a test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps;

[0048] The fifth module is used to respond to the use case review instruction and perform a use case review operation on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page;

[0049] The sixth module is used to perform test case design operations in response to test case design instructions, and the test case design operations include creating requirements, creating test items, and creating use cases.

[0050] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;

[0051] The memory is used to store programs;

[0052] The processor executes the program to implement the method described above.

[0053] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0054] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0055] In an embodiment of the present invention, in response to a project management operation instruction, a project management operation is performed on the software project information on the project management interface, and the project management operation includes an add operation, a delete operation, a modify operation, and a query operation for a target project; in response to a requirement management operation instruction, a requirement management operation is performed on the test requirement on the requirement management interface, and the requirement management operation includes a create operation, a modify operation, a delete operation, and a query operation for a target requirement; the requirement management interface displays requirement summary information, requirement detailed information, an edit case entry, a download case entry, a share case entry, and a tester transfer entry; in response to a use case management operation instruction, a use case management operation is performed on the use case management interface, and the use case management operation includes browsing, filtering, and querying use case information, and jumping to a use case editing interface. The user interface is operated; in response to the use case editing instruction, the use case editing operation is performed on the use case editing interface, and the use case editing operation is used to design and write test cases, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and the addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps; in response to the use case review instruction, the use case review interface is operated from the use case review operation, and the use case review operation includes obtaining the use case information query results corresponding to the test requirements by sharing the requirement link for the use case information and steps that have been entered into the test case platform and displaying them on the front-end page; in response to the test case design instruction, the test case design operation is performed, and the test case design operation includes creating requirements, creating test items, and creating use cases. The present invention can be applied to related scenarios such as home design, can improve test efficiency, and reduce labor and time costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0057] Figure 1 An overall step flow chart provided for an embodiment of the present invention;

[0058] Figure 2 A schematic diagram of a platform architecture provided by an embodiment of the present invention;

[0059] Figure 3 A schematic diagram of the structure of a test case design module provided by an embodiment of the present invention;

[0060] Figure 4 A flowchart of new requirements and test cases provided for an embodiment of the present invention;

[0061] Figure 5 A flowchart for querying existing test requirements and test cases provided by an embodiment of the present invention;

[0062] Figure 6 A flowchart of the test steps for processing a demonstration use case provided by an embodiment of the present invention;

[0063] Figure 7 A functional schematic diagram of improving the efficiency of test case design provided by an embodiment of the present invention; DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0065] In view of the problems existing in the prior art, the present invention is developed using Java and Vue languages ​​(Java is a compiled, interpreted, object-oriented, cross-platform high-level programming language). By applying the technical platform provided by the present invention, users can quickly write test cases and steps on the platform according to test needs, reuse similar types of test requirements and cases, review cases and other functions. Specifically, the front end of the present invention is developed based on Vue, ElementUI and Vxe-Table, and the back end is developed based on Java, SpringBoot and Mybatis, and the data is stored in the MySql database. The code can be debugged in the Java language environment (it is necessary to introduce relevant front-end and back-end dependency frameworks).

[0066] like Figure 1As shown, one aspect of an embodiment of the present invention provides a software test case method, including:

[0067] In response to the project management operation instruction, a project management operation is performed on the software project information in the project management interface, wherein the project management operation includes adding, deleting, modifying and querying operations for the target project;

[0068] In response to the demand management operation instruction, the demand management operation is performed on the test demand in the demand management interface, and the demand management operation includes a new operation, a modification operation, a deletion operation and a query operation for the target demand; the demand management interface displays demand summary information, demand detailed information, an edit case entry, a download case entry, a share case entry, and an assignment tester entry;

[0069] In response to the use case management operation instruction, perform a use case management operation on the use case management interface, wherein the use case management operation includes browsing, filtering and querying the use case information, and jumping to the use case editing interface;

[0070] In response to the use case editing instruction, a use case editing operation is performed on the use case editing interface, wherein the use case editing operation is used to design and write the test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps;

[0071] In response to the use case review instruction, a use case review operation is performed on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page;

[0072] In response to the test case design instruction, a test case design operation is performed, wherein the test case design operation includes creating requirements, creating test items, and creating use cases.

[0073] Optionally, the creation of requirements in the test case design operation includes: associating software projects, filling in requirement information, and generating test requirements;

[0074] The test item creation in the test case design operation includes: selecting requirements to enter the case design, creating a new test item, filling in the test item name and sorting, and generating a test item folder;

[0075] The creation of a test case in the test case design operation includes: selecting a test item, creating a new test case under the test item, filling in the test case information and test steps, and submitting the test case after checking that everything is correct;

[0076] Among them, a test requirement includes multiple test items, and a test item includes multiple test cases.

[0077] Optionally, the method further includes a process of creating new requirements and test cases, the process including:

[0078] When a user creates a new test requirement on the front end, a new piece of information is recorded in the requirement table of the database;

[0079] Create a new test item under the requirements, create and fill in the test item name, and the newly created test item is temporarily stored in the front-end cache of the page;

[0080] Create a new test case under the test item, fill in the test steps, submit the test case, and add the basic information of the test case and the test items to which the test case belongs to the test case table in the database;

[0081] Completed the design storage of a test case;

[0082] Among them, the test item is one of the fields in the test case table, which is used to indicate that the test case belongs to a test item under this newly created requirement; the test steps are stored separately in the test step table of the database, and the test step table contains the use case field to which the steps belong, the order of the steps in the current test case, and the unique number in the database table.

[0083] Optionally, the method further includes a process of querying existing test requirements and test cases, the process including:

[0084] When the user queries for a specific test requirement on the front end, the database will search the test requirement table for the specified requirement based on the given test requirement number and requirement name combination. If it exists, the database will continue with the subsequent query. Otherwise, the database will inform the front end that the requirement does not exist.

[0085] If the requirement exists, continue to search the test case table for a test case whose fields completely match the specified test requirement number and name combination;

[0086] All the queried test cases are put into a temporary column for processing; the queried test cases contain information about the test items and test requirements to which they belong;

[0087] Traverse the test cases one by one, summarize the test cases under the same test item, sort the different test items, and finally integrate them to form a three-layer hierarchical structure of "test requirements-test items-test cases";

[0088] The processed results are returned to the front-end for processing and display according to a specific JSON structure.

[0089] Optionally, the step of creating new requirements and test cases further includes:

[0090] Add processing logic to the front-end page to intercept users from submitting incomplete information; intercepted behaviors include: no test items filled in, incomplete test case information, and test cases not corresponding to test steps.

[0091] Optionally, the method further comprises a test step of demonstrating a use case, the step comprising:

[0092] After the front end displays the hierarchical information of the requirement use case, in response to the user clicking on a test case, a request to query all the test steps of the use case is initiated on the front end;

[0093] After receiving the request, the backend will query all the associated test steps in the test case step table according to the ID number of the specified test case, and sort them according to the numerical size of the test step ID numbers in the records. A test step contains three ID field information, one is the primary key ID, one is the test step ID, and the test case ID;

[0094] After sorting the relevant information of the test steps, organize it into a specific JSON structure and return it to the front-end for processing and display;

[0095] Among them, the primary key id is used to ensure that the current step has unique identity information in the test step table; the test step id is used to record the order of this step under the use case; the test case id is used to associate all steps under the specified test case.

[0096] Optionally, the method further includes a step of implementing temporary storage of use cases using a page cache, the step comprising:

[0097] Adopting the Vue framework's Vuex state mode storage and the browser's Session storage, when the use case design module detects relevant change actions or drag actions, the use case information, step content, and sorting information are stored in the session in real time in the form of json;

[0098] Mark the uncommitted use case IDs so that when the user switches use cases, the uncommitted use case information has been stored in the session cache and the user can browse other use cases;

[0099] When the user switches back to the unsubmitted use case, the front end automatically identifies the use case ID selected by the user and queries whether the information related to this use case is stored in the front end cache record. If so, it is loaded and displayed; otherwise, it is determined that the information needs to be queried from the database.

[0100] Another aspect of the embodiment of the present invention further provides a software test case device, including:

[0101] The first module is used to perform a project management operation on the software project information in the project management interface in response to a project management operation instruction, wherein the project management operation includes an add operation, a delete operation, a modify operation, and a query operation for a target project;

[0102] The second module is used to respond to the demand management operation instruction and perform demand management operations on the test requirements in the demand management interface, wherein the demand management operations include creating, modifying, deleting and querying operations for the target requirements; the demand management interface displays demand summary information, demand detailed information, editing case entry, downloading case entry, sharing case entry and assigning testers entry;

[0103] A third module is used to perform a use case management operation on the use case management interface in response to a use case management operation instruction, wherein the use case management operation includes browsing, filtering and querying use case information, and jumping to a use case editing interface;

[0104] The fourth module is used to perform a use case editing operation on the use case editing interface in response to a use case editing instruction, wherein the use case editing operation is used to design and write a test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps;

[0105] The fifth module is used to respond to the use case review instruction and perform a use case review operation on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page;

[0106] The sixth module is used to perform test case design operations in response to test case design instructions, and the test case design operations include creating requirements, creating test items, and creating use cases.

[0107] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;

[0108] The memory is used to store programs;

[0109] The processor executes the program to implement the method described above.

[0110] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0111] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0112] The specific implementation process of the present invention is described in detail below in conjunction with the accompanying drawings:

[0113] In the present invention, the use process is relatively simple and clear: after creating a new test requirement, create a test case, fill in the case information, fill in the case steps and expected results, submit the case, check whether the submission is successful, otherwise it needs to be processed, and finally end with the case review link. Figure 2 In the system structure of the test platform of the present invention, in order to achieve a more efficient and convenient test case design link, the present invention applies the "project-requirement-test case" model for development, and optimizes the common operations in the case editing link to improve the design efficiency when editing the step content. The modules mainly include: project management, requirement management, case management and account role management modules, among which the case management module mainly includes two major functions: case editing and case review, which aims to help users design and execute test cases more efficiently and ensure the accuracy and effectiveness of software testing.

[0114] 1. The web page mainly has the following operation interfaces:

[0115] (1) Project management: The project management interface includes operations for adding, deleting, modifying, and checking software project information. This interface uniformly records and manages the project information corresponding to different functional modules of the software. The creation of test requirements requires the selection of specific projects.

[0116] (2) Requirements Management: The requirements management module includes functions such as creating, modifying, deleting and querying test requirements, displaying summary and detailed information of requirements, and providing sub-functions such as editing use cases, downloading use cases, sharing use cases, and assigning testers. This module provides functions for collecting, organizing, analyzing and tracking requirements.

[0117] (3) Use Case Management: The use case management module includes the functions of browsing, filtering and querying use case information, as well as jumping to the use case step interface.

[0118] (4) Use case editing: As the core module of the test case platform, the use case editing module aims to improve the efficiency of test case design and writing. Therefore, this module includes functions such as test item division, test case creation, submission, deletion, and modification, and test step addition, deletion, modification, drag-and-drop sorting, quick copy and paste, and clearing.

[0119] (5) Use Case Review: The use case review module is to query and display the use case information corresponding to the test requirements on the front-end page by sharing the requirement link, so that relevant personnel can review the test cases together.

[0120] 2. Test case design module:

[0121] like Figure 3 As shown, in the test case design module of the present invention, a test requirement includes multiple test items, and a test item includes multiple test cases. The multiple test items of the requirement represent the need to test multiple test contents, such as functional testing, data testing, material testing, order testing and other categories, and one test item corresponds to one category. One test item includes multiple test cases.

[0122] 3. How to organize test requirements and use case hierarchy

[0123] The front-end page queries and displays the hierarchical structure of the test cases, processes the test cases submitted by the user and forms a new hierarchical structure, ensures that the content is not lost, the modules are correct, and the hierarchies are not chaotic, which is the core processing logic of the design module. Taking more than 20,000 test cases currently stored in the database as an example, the present invention is divided into two main processes: one is the process of creating new requirements and test cases, and the other is the process of querying existing test requirements and test cases.

[0124] Process 1: When the user creates a new test requirement on the front end, the requirement table in the database will record a new information. At this time, the user then creates a new test item under the requirement, fills in the test item name and creates it. At this time, the test item is temporarily stored in the front-end cache of the page and is not stored in the database.

[0125] The user continues to create a new test case under the test item, fills in the test steps, and clicks the test case submission. At this time, the basic information of the test case and the test item to which the test case belongs will be added to the test case table of the database. The test item is one of the fields in the test case table, indicating that the test case belongs to a test item under this new requirement, and the test steps will be stored separately in the test step table of the database. The test step table contains the test case field to which the step belongs, as well as its order in this test case, and the unique number in the database table. In this way, the design storage of a test case is completed. The above process is shown in the algorithm flow chart of the present invention. Figure 4 shown.

[0126] Process 2: When the user queries for a specified test requirement on the front end, the database will search the test requirement table for the specified requirement based on the given test requirement number and requirement name combination. If it exists, the subsequent query will continue; otherwise, the front end will be informed that the requirement does not exist.

[0127] If the requirement exists, continue to search for test cases in the test case table whose fields fully match the specified test requirement number and name combination, and put all the searched test cases into the temporary column for processing. At this time, the test case contains the information of the test item and the test requirement to which it belongs, so the test cases are traversed in turn, the test cases under the same test item are summarized, and the different test items are sorted. Finally, a three-layer hierarchical structure of "test requirement-test item-test case" is formed, and the processed results are returned to the front end for processing and display according to a specific json structure. The above process is shown in the algorithm flow chart of the present invention. Figure 5 shown.

[0128] In process one, you also need to add processing logic to the front-end page to intercept users from submitting incomplete information, otherwise the data stored in the database will be incomplete, resulting in dirty data. Intercepted behaviors include test items not being filled in, test case information being incomplete, and test cases and steps not corresponding to each other, which all need to be intercepted and prompted on the front-end.

[0129] 4. How to handle the test steps of the demonstration case

[0130] In the present invention, it is necessary to ensure that all steps of the test case are stored and transmitted in the order in which the user creates the new test case, and there is also a situation where the user customizes the order of the steps, so specific information is required to record the order of the steps. After the front end displays the hierarchical information of the required test case, when the user clicks on a test case, the front end will initiate a request to query all the test steps of the test case.

[0131] After the backend receives the request, it will query all the associated test steps in the test case step table according to the id number of the specified test case, and sort them according to the numerical size of the test step id numbers in the record. A test case step contains three id field information, one is the primary key id, one is the test step id, and the test case id.

[0132] The primary key id ensures that this step has unique identity information among tens of thousands of information in the test step table, and the test step id records the order of this step in the test case. This id is a repeatable number, that is, different test cases have an order starting from sequence number 1. Finally, the test case id is used to associate all steps under a specified test case. After the above step information is sorted, it is organized into a specific json structure and returned to the front-end for processing and display. The schematic diagram of the above process is as follows Figure 6 shown.

[0133] 5. How to improve the efficiency of test case design

[0134] In the present invention, improving the design efficiency of test cases and serving home design software is the core purpose of the invention. Therefore, we have developed a series of front-end functions to allow users to complete the case design process more efficiently. Specifically, the functional schematic diagram of improving the efficiency of test case design is as follows: Figure 7 As shown, in an embodiment of the present invention, some functional manifestations of right-click menu and step table operations are exemplarily provided, which can improve user design efficiency.

[0135] 6. How to use page cache to achieve temporary storage of use cases

[0136] In the present invention, if the user fails to submit the use case information in time, the information will be lost. It is necessary to intercept and remind the user to submit the use case before writing other use cases. However, this will cause two problems. First, the user's freedom of operation will be greatly limited, and it must be submitted in time every time the change is completed, which is troublesome. Second, in the process of designing use cases, the user may need to view other use cases for reference, or reuse steps. If interception is performed, the user will not be able to perform such scenarios. Therefore, it is necessary to introduce a page cache function to realize automatic temporary storage of use cases, so that users can directly modify without submitting immediately, and switch to view other use cases.

[0137] The technical solution mainly adopts the Vuex state mode storage of the Vue framework and the browser's Session storage. When the use case design module detects changes, dragging, etc. to any information such as use case information and test steps, the use case information, step content and sorting information will be stored in the session in json format, and the use case ID of the uncommitted change will be marked. When the user switches the use case, the uncommitted use case information has been stored in the session cache, and the user can browse other use cases at this time.

[0138] When the user switches back to the unsubmitted use case, the front end will automatically identify which use case ID the user selected, and check whether the information related to this use case is stored in the front end cache record. If so, it will be loaded and displayed; otherwise, it will be determined that the information needs to be queried from the database.

[0139] To sum up, the present invention focuses on improving the design efficiency of software test cases, is suitable for the design of software test cases for home three-dimensional software with strong repeatability and similar requirements, supports the design of test cases for software function testing and software home product testing, supports temporary page caching of test cases, and supports users to use page functions to speed up the efficiency of test case design.

[0140] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0141] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0144] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0145] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0146] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0147] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0148] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A software test case method, characterized in that: include: In response to the project management operation instruction, a project management operation is performed on the software project information in the project management interface, wherein the project management operation includes adding, deleting, modifying and querying operations for the target project; In response to the requirement management operation instruction, a requirement management operation is performed on the test requirement of the requirement management interface, wherein the requirement management operation includes a new creation operation, a modification operation, a deletion operation and a query operation for the target requirement; The requirement management interface displays requirement summary information, requirement detailed information, use case editing entry, use case download entry, use case sharing entry, and tester assignment entry; In response to the use case management operation instruction, perform a use case management operation on the use case management interface, wherein the use case management operation includes browsing, filtering and querying the use case information, and jumping to the use case editing interface; In response to the use case editing instruction, a use case editing operation is performed on the use case editing interface, wherein the use case editing operation is used to design and write the test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps; In response to the use case review instruction, a use case review operation is performed on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page; In response to the test case design instruction, perform a test case design operation, wherein the test case design operation includes creating requirements, creating test items, and creating use cases; The method also includes a process of creating new requirements and test cases, which includes: Add processing logic to the front-end page to intercept users from submitting incomplete information. The intercepted behaviors include: not filling in the test items, incomplete test case information, and the test case not corresponding to the test steps. The method further includes a step of implementing temporary storage of use cases by using a page cache, the step comprising: Adopting the Vue framework's Vuex state mode storage and the browser's Session storage, when the use case design module detects relevant change actions or drag actions, the use case information, step content, and sorting information are stored in the session in real time in the form of json; Mark the uncommitted use case IDs so that when the user switches use cases, the uncommitted use case information has been stored in the session cache and the user can browse other use cases; When the user switches back to the unsubmitted use case, the front end automatically identifies the use case ID selected by the user and checks whether the information related to this use case is stored in the front end cache record. If so, it is loaded and displayed. Otherwise, it is determined that the information needs to be queried from the database. The method also includes a test step of demonstrating a use case, the step comprising: After the front end displays the hierarchical information of the requirement use case, in response to the user clicking on a test case, a request to query all the test steps of the use case is initiated on the front end; After receiving the request, the backend will query all the associated test steps in the test case step table according to the ID number of the specified test case, and sort them according to the numerical size of the test step ID numbers in the records. A test step contains three ID field information, one is the primary key ID, one is the test step ID, and the test case ID; After sorting the relevant information of the test steps, organize it into a JSON structure and return it to the front-end for processing and display; Among them, the primary key id is used to ensure that the current step has unique identity information in the test step table; the test step id is used to record the order of this step under the use case; the test case id is used to associate all steps under the specified test case.

2. A software test case method according to claim 1, characterized in that: The creation of requirements in the test case design operation includes: associating software projects, filling in requirement information, and generating test requirements; The test item creation in the test case design operation includes: selecting requirements to enter the case design, creating a new test item, filling in the test item name and sorting, and generating a test item folder; The creation of a test case in the test case design operation includes: selecting a test item, creating a new test case under the test item, filling in the test case information and test steps, and submitting the test case after checking that everything is correct; Among them, a test requirement includes multiple test items, and a test item includes multiple test cases.

3. A software test case method according to claim 1, characterized in that: The method also includes a process of creating new requirements and test cases, which includes: When a user creates a new test requirement on the front end, a new piece of information is recorded in the requirement table of the database; Create a new test item under the requirements, create and fill in the test item name, and the newly created test item is temporarily stored in the front-end cache of the page; Create a new test case under the test item, fill in the test steps, submit the test case, and add the basic information of the test case and the test items to which the test case belongs to the test case table in the database; Completed the design storage of a test case; Among them, the test item is one of the fields in the test case table, which is used to indicate that the test case belongs to a test item under this newly created requirement; the test steps are stored separately in the test step table of the database, and the test step table contains the use case field to which the steps belong, the order of the steps in the current test case, and the unique number in the database table.

4. A software test case method according to claim 1, characterized in that: The method also includes a process of querying existing test requirements and test cases, which includes: When the user queries for a specific test requirement on the front end, the database will search the test requirement table for the specified requirement based on the given test requirement number and requirement name combination. If it exists, the database will continue with the subsequent query. Otherwise, the database will inform the front end that the requirement does not exist. If the requirement exists, continue to search the test case table for a test case whose fields completely match the specified test requirement number and name combination; All the queried test cases are put into a temporary column for processing; the queried test cases contain information about the test items and test requirements to which they belong; Traverse the test cases one by one, summarize the test cases under the same test item, sort the different test items, and finally integrate them to form a three-layer hierarchical structure of "test requirements-test items-test cases"; The processed results are returned to the front-end for processing and display in JSON structure.

5. A software test case device, characterized in that: include: The first module is used to perform a project management operation on the software project information in the project management interface in response to a project management operation instruction, wherein the project management operation includes an add operation, a delete operation, a modify operation, and a query operation for a target project; The second module is used to perform a demand management operation on the test requirements of the demand management interface in response to the demand management operation instruction, wherein the demand management operation includes a new operation, a modification operation, a deletion operation and a query operation for the target requirement; The requirement management interface displays requirement summary information, requirement detailed information, use case editing entry, use case download entry, use case sharing entry, and tester assignment entry; A third module is used to perform a use case management operation on the use case management interface in response to a use case management operation instruction, wherein the use case management operation includes browsing, filtering and querying use case information, and jumping to a use case editing interface; The fourth module is used to perform a use case editing operation on the use case editing interface in response to a use case editing instruction, wherein the use case editing operation is used to design and write a test case, and the use case editing operation includes test case creation, test case submission, test case deletion, test case modification, and addition, deletion, modification, drag and sort, quick copy and paste, and clearing of test steps; The fifth module is used to respond to the use case review instruction and perform a use case review operation on the use case review interface, wherein the use case review operation includes obtaining the use case information query result corresponding to the test requirement by sharing the requirement link, and displaying it on the front-end page; A sixth module is used to perform a test case design operation in response to a test case design instruction, wherein the test case design operation includes creating requirements, creating test items, and creating use cases; It also includes the process of creating new requirements and test cases, which includes: Add processing logic to the front-end page to intercept users from submitting incomplete information. The intercepted behaviors include: not filling in the test items, incomplete test case information, and the test case not corresponding to the test steps. The step of using page cache to implement use case temporary storage is also included, and the step includes: Adopting the Vue framework's Vuex state mode storage and the browser's Session storage, when the use case design module detects relevant change actions or drag actions, the use case information, step content, and sorting information are stored in the session in real time in the form of json; Mark the uncommitted use case IDs so that when the user switches use cases, the uncommitted use case information has been stored in the session cache and the user can browse other use cases; When the user switches back to the unsubmitted use case, the front end automatically identifies the use case ID selected by the user and checks whether the information related to this use case is stored in the front end cache record. If so, it is loaded and displayed. Otherwise, it is determined that the information needs to be queried from the database. It also includes a test step that demonstrates the use case, which includes: After the front end displays the hierarchical information of the requirement use case, in response to the user clicking on a test case, a request to query all the test steps of the use case is initiated on the front end; After receiving the request, the backend will query all the associated test steps in the test case step table according to the ID number of the specified test case, and sort them according to the numerical size of the test step ID numbers in the records. A test step contains three ID field information, one is the primary key ID, one is the test step ID, and the test case ID; After sorting the relevant information of the test steps, organize it into a JSON structure and return it to the front-end for processing and display; Among them, the primary key id is used to ensure that the current step has unique identity information in the test step table; the test step id is used to record the order of this step under the use case; the test case id is used to associate all steps under the specified test case.

6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 4.