Method and system for automatically generating and managing test cases based on exploratory testing

By using the RDP protocol to generate automated test scripts and manage test cases in exploratory testing, the problem of difficult tracing and reviewing exploratory test cases is solved, and an integrated process of test execution, result recording and case backtracking is realized, thereby improving testing efficiency.

CN113900957BActive Publication Date: 2025-09-16CHENGDU DBAPP SECURITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111275191.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2025-09-16
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

Exploratory testing has the problem of difficulty in reviewing test cases and repeating the same tests.

Method used

Establish a connection with the operation record module through the RDP protocol, extract the control information package and font information package, generate an automated test script, and combine the test report results with the operation table to generate a test case, which is pushed to the use case management platform for storage management.

Benefits of technology

It enables the tracing and review of exploratory test cases and improves the efficiency of the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900957B_ABST
    Figure CN113900957B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of exploratory testing, and discloses a method for automatically generating and managing test cases based on exploratory testing, comprising: establishing a connection with an operation record module via an RDP protocol; extracting a control information packet and a font information packet from an RDP protocol message; determining whether it is a mouse operation event based on the control information packet; obtaining the contents of a graphic text table as an operation object parameter and the contents of a keyboard operation table as an event input parameter according to a script generation module, and combining them to generate an automatic test script; obtaining the test report results after the execution of the automatic test script as a test case result according to a use case generation module, generating a test case, and pushing it to a use case management platform via an API for storage management. The present invention also discloses a system for automatically generating and managing test cases based on exploratory testing. The present invention can solve the problem that it is difficult to review test cases and repeat the same test in exploratory testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of exploratory testing, and in particular to a method and system for automatically managing test cases based on exploratory testing, which solves the problem that it is difficult to review test cases and repeatedly execute the same test in exploratory testing. Background Art

[0002] With the development and advancement of technology, a testing technique widely used in agile development processes has emerged to ensure optimal user experience and stable functionality: exploratory testing. Exploratory testing, which lacks pre-designed test plans and test cases, emphasizes the tester's creativity, autonomy, and skills. Because it saves time on test planning and test case development, exploratory testing is less time-consuming than conventional scripted testing. However, its drawback is that it can be difficult to trace back and retest test cases.

[0003] Therefore, there is an urgent need for a method that can solve the problem that exploratory testing is difficult to review test cases and difficult to repeatedly execute the same test. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and system for automatically generating and managing test cases based on exploratory testing, so as to solve the problem that it is difficult to review test cases and repeat the same test in exploratory testing.

[0005] The present invention is implemented through the following technical solution: a method for automatically generating and managing test cases based on exploratory testing, comprising:

[0006] Step S1. The tester establishes a connection with the operation recording module through the RDP protocol;

[0007] Step S2 extracts the control information packet and font information packet in the RDP protocol message according to the operation record module;

[0008] Step S3 determines whether it is a mouse operation event according to the control information packet. If so, the font information packet content is stored in the graphic text table. If not, the mouse and keyboard code values ​​in the RDP protocol message are extracted and stored in the keyboard operation table.

[0009] Step S4. According to the script generation module, the contents of the graphic text table are obtained as the operation object parameter, the contents of the keyboard operation table are obtained as the event input parameter, and the combination is used to generate an automatic test script;

[0010] Step S5. Obtain the test report results after the automatic test script is executed according to the use case generation module, use them as test case results, combine them with the graphic text table and keyboard operation table, generate test cases, and push them to the use case management platform through the API for storage management.

[0011] This technical solution provides a method for automatically generating and managing test cases based on exploratory testing. It takes advantage of the fact that exploratory testing activities such as test learning, test design, test execution, and test result evaluation are carried out simultaneously. After the test is completed, the corresponding test cases are automatically generated by obtaining specific fields in the test result report and pushed to the use case management platform for recording. This solves the use case tracing and review problems of exploratory testing and realizes the integrated process of exploratory test execution, result recording, and use case backtracking.

[0012] In order to better implement the present invention, further, step S1 includes:

[0013] Deploy the intermediate server of the operation recording module on the operation server;

[0014] Log in to the intermediate server through remote desktop connection;

[0015] The client connects to the intermediate server and then to the operation server to establish a connection.

[0016] In this technical solution, the operation logging module service is deployed on a Windows server. The connection process is similar to connecting remotely to a Windows server, logging in via Remote Desktop. For clarity, this server will be referred to as the intermediate server, while the server performing the test will be referred to as the operation server. Throughout the testing process, the client connects to the intermediate server first, then to the operation server.

[0017] In order to better implement the present invention, further, step S2 includes:

[0018] The client performs the test after connecting to the intermediate server;

[0019] The operations during test execution are transmitted to the operation server via the RDP protocol;

[0020] The operation record module intercepts all RDP protocol message data at this time, backs up all RDP protocol message data and forwards it to the operation server.

[0021] In this technical solution, when testing, the module extracts the control information packet and font information packet contents in the protocol message, and determines whether it is a mouse operation event based on the control information packet. If so, the font information packet content is stored in the graphic text table; the KeyCode field content in the protocol message is extracted and stored in the keyboard operation table.

[0022] In order to better implement the present invention, further, the control information packet in step S2 includes the event type currently being transmitted;

[0023] Event types include mouse setting type, keyboard input type, font type, drawing command format type and graphic display type.

[0024] In order to better implement the present invention, further, the font information packet in step S2 includes the text content currently being transmitted;

[0025] The text content includes the character content input by the current operation event, the control information content corresponding to the character content, and the font information content.

[0026] In this technical solution, the content of the font information package is the transmitted text content. For example, the current operation event is the keyboard input of the character test, then the control information is the keyboard event, and the font information is test.

[0027] In order to better implement the present invention, further, step S3 includes:

[0028] It is determined whether the event type in the control information packet is a mouse operation event according to the data type flag in the RDP protocol message.

[0029] In this technical solution, the data sent by RDP has a data type flag, which is used to determine the type of event, including mouse settings, keyboard input, font type, drawing command format, graphic display, and other types.

[0030] In order to better implement the present invention, further, the method of obtaining the graphic character table and the keyboard operation table in step S3 includes:

[0031] Create a database in the operation record module;

[0032] Record operation data according to the database;

[0033] The operation data includes a graphic text table and a keyboard record table.

[0034] In this technical solution, when the operation record module service is deployed, a database is initialized to record operation data, which includes a graphic text table and a keyboard recording table.

[0035] In order to better implement the present invention, further, step S4 includes:

[0036] An automated test script is pre-written, but the input parameters are missing from the automated test script.

[0037] Connect the automated test script to the database of the operation record module, use SQL statements to query and read the database table content of the module part tested by the current automated test script, pass the content into the automated test script as an input parameter, and complete the automated test script combination.

[0038] In this technical solution, the test script assembly involves pre-writing an automated test script, which lacks input parameters and only outlines the steps. The script connects to the database of the operating module, uses SQL statements to query and read the database table content of the module being tested by the current test script, and passes this content into the script as an input parameter to complete the script assembly.

[0039] In order to better implement the present invention, further, step S5 includes: sorting and combining the data with the same characters in the graphic character table and the keyboard operation table according to time to generate a test step;

[0040] Combine the test report results and test steps to generate test cases.

[0041] In this technical solution, a test case combination consists of data with identical characters in the graphic text table and keyboard operation table, sorted by time, representing a test step. The expected result is the test report after the script is executed; the combination of steps and results constitutes a test case.

[0042] In order to better implement the present invention, the present invention further provides a system for automatically managing test cases based on exploratory testing, comprising a client, an operation recording module, a script generation module, a use case generation module and a use case management platform, wherein;

[0043] The client is used to connect to the intermediate server and then to the operation server to establish a connection, and is used to perform tests after connecting to the intermediate server;

[0044] An operation recording module is used to extract the control information packet and font information packet from the RDP protocol message, and to determine whether it is a mouse operation event based on the control information packet. If so, the font information packet content is stored in the graphic character table. If not, the mouse and keyboard code values ​​in the RDP protocol message are extracted and stored in the keyboard operation table.

[0045] The script generation module is used to obtain the content of the graphic text table as the operation object parameter, obtain the content of the keyboard operation table as the event input parameter, and combine them to generate an automatic test script;

[0046] The use case generation module is used to obtain the test report results after the automatic test script is executed, and use them as test case results to combine with the graphic text table and keyboard operation table to generate test cases;

[0047] Use case management platform, used to receive test cases and manage them in the repository.

[0048] This technical solution realizes the integrated operation of exploratory test execution, result analysis, script and use case backtracking steps through three modules: operation recording module, script generation module, and use case generation module.

[0049] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0050] (1) The present invention can automatically manage test cases, solving the problems of difficult traceability and retesting of exploratory test cases;

[0051] (2) The present invention can improve the efficiency of the test process by integrating test execution, result analysis, script and use case improvement steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The present invention is further described in conjunction with the following drawings and embodiments, and all concepts and innovations of the present invention should be regarded as disclosed contents and the protection scope of the present invention.

[0053] Figure 1 This is a flow chart of a method for automatically managing test cases based on exploratory testing provided by the present invention.

[0054] Figure 2 This is a structural diagram of a system for automatically managing test cases based on exploratory testing provided by the present invention.

[0055] Among them: 10. Client; 11. Operation record module; 12. Script generation module; 13. Use case generation module; 14. Use case management platform. DETAILED DESCRIPTION

[0056] Example 1:

[0057] This embodiment provides a method for automatically generating and managing test cases based on exploratory testing, such as Figure 1 As shown, a method for automatically generating and managing test cases based on exploratory testing is provided. By utilizing the characteristics of exploratory testing in which test learning, test design, test execution, and test result evaluation are carried out simultaneously, after the test is completed, the corresponding test cases are automatically generated by obtaining specific fields in the test result report, and the test cases are pushed to the use case management platform for recording, thereby solving the use case tracing and review problems of exploratory testing and realizing the integrated process of exploratory test execution, result recording, and use case backtracking.

[0058] Example 2:

[0059] This embodiment further optimizes Example 1, deploying the operation logging module service on a Windows server. The connection establishment process is the same as for remotely connecting to a Windows server, logging in to the server via Remote Desktop. For clarity, this server will be referred to as the intermediate server, while the server performing the test will be referred to as the operation server. Throughout the test process, the client connects to the intermediate server first, then to the operation server.

[0060] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0061] Example 3:

[0062] This embodiment is further optimized based on embodiment 1. During testing, the module extracts the contents of the control information packet and font information packet in the protocol message, determines whether it is a mouse operation event based on the control information packet, and if so, stores the contents of the font information packet in the graphic text table; extracts the contents of the KeyCode field in the protocol message and stores it in the keyboard operation table.

[0063] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0064] Example 4:

[0065] This embodiment is further optimized based on embodiment 1. The control information packet includes the event type currently transmitted, such as mouse setting type, keyboard input type, font type, drawing command format type and graphic display type. If the test operation is inputting characters, the type is order; if the test operation is clicking a button, the type is control; if the operation is moving the mouse to a certain place, the type is pointer.

[0066] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0067] Example 5:

[0068] This embodiment is further optimized based on the first embodiment. The content of the font information package is the transmitted text content. For example, if the current operation event is keyboard input of the character test, the control information is a keyboard event and the font information is test.

[0069] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0070] Example 6:

[0071] This embodiment is a further optimization based on the first embodiment. The data sent by RDP has a data type flag, which is used to determine the type of event, including mouse settings, keyboard input, font type, drawing command format, graphic display, and other types.

[0072] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0073] Example 7:

[0074] This embodiment is further optimized based on the embodiment 1. When the operation record module service is deployed, a database is initialized to record operation data, which includes a graphic text table and a keyboard record table.

[0075] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0076] Example 8:

[0077] This embodiment further optimizes the test script assembly based on Example 1. An automated test script is pre-written, but the script lacks input parameters and only contains general steps. The script is connected to the database of the operation module, and SQL statements are used to query and read the database table content of the module tested by the current test script. This content is passed into the script as an input parameter to complete the script assembly. The rest of this embodiment is the same as Example 1 and will not be repeated here.

[0078] Example 9:

[0079] This embodiment further optimizes Example 1. The combination of test cases: Data with identical characters in the graphic character table and keyboard operation table, sorted by time, constitutes a test step. The expected result is the test report after script execution; the combination of steps and results constitutes a test case.

[0080] The rest of this embodiment is the same as that of embodiment 1, so it will not be described again.

[0081] Example 10:

[0082] This embodiment is further optimized based on embodiment 1. In this embodiment, in the operation recording module, the tester establishes a connection with the operation recording module through the RDP protocol. When performing the test, the module extracts the control information packet and font information packet content in the protocol message, and determines whether it is a mouse operation event based on the control information packet. If so, the font information packet content is stored in the graphic text table; the KeyCode field content in the protocol message is extracted and stored in the keyboard operation table.

[0083] The script generation module obtains the content of the graphic text table as an operation object parameter and the content of the keyboard operation table as an event input parameter, and combines them to generate an automatic test script.

[0084] The use case generation module obtains the test report results after the automatic test script is executed. As the test case results, it combines them with the graphic text table and keyboard operation table to generate test cases. The test cases are then pushed to the use case management platform through the API for storage and management. This enables the integrated operation of exploratory test execution, result analysis, and use case improvement steps.

[0085] This embodiment is a system for automatically generating and managing test cases based on exploratory testing, such as Figure 2 As shown,.

[0086] The above are only preferred embodiments of the present invention and do not limit the present invention in any form. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention fall within the scope of protection of the present invention.

Claims

1. A method for automatically generating and managing test cases based on exploratory testing, characterized in that: The following steps are involved: Step S1. The tester establishes a connection with the operation recording module through the RDP protocol; Step S2 extracts the control information packet and font information packet in the RDP protocol message according to the operation record module; Step S3 determines whether it is a mouse operation event according to the control information packet. If so, the font information packet content is stored in the graphic text table. If not, the mouse and keyboard code values ​​in the RDP protocol message are extracted and stored in the keyboard operation table. Step S4. According to the script generation module, the contents of the graphic text table are obtained as the operation object parameter, the contents of the keyboard operation table are obtained as the event input parameter, and the combination is used to generate an automatic test script; Step S5. The test report results after the automatic test script execution are obtained according to the use case generation module. This is used as the test case result, combined with the graphic text table and keyboard operation table to generate a test case, which is pushed to the use case management platform through the API for storage management; When testing, the control information packet and font information packet contents in the protocol message are extracted, and whether it is a mouse operation event is determined based on the control information packet. If so, the font information packet contents are stored in the graphic character table; Extract the KeyCode field content in the protocol message and store it in the keyboard operation table; The step S5 includes: sorting and combining the data with the same characters in the graphic character table and the keyboard operation table according to time to generate a test step; Combine the test report results and test steps to generate test cases; The control information packet in step S2 includes the event type currently being transmitted; the event type includes mouse setting type, keyboard input type, font type, drawing command format type and graphic display type.

2. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The step S1 includes: deploying an intermediate server of the operation recording module on the operation server; logging into the intermediate server via a remote desktop connection; The client connects to the intermediate server and then to the operation server to establish a connection.

3. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The step S2 includes: the client performs a test after connecting to the intermediate server; the operations during the test are transmitted to the operation server via the RDP protocol; the operation recording module intercepts all RDP protocol message data at this time, backs up all RDP protocol message data, and forwards it to the operation server.

4. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The font information package in step S2 includes the text content currently being transmitted; the text content includes the character content input by the current operation event, the control information content corresponding to the character content, and the font information content.

5. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The step S3 includes: judging whether the event type in the control information packet is a mouse operation event according to the data type flag in the RDP protocol message.

6. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The method for obtaining the graphic character table and the keyboard operation table in step S3 includes: creating a database in an operation record module; recording operation data according to the database; and the operation data includes the graphic character table and the keyboard record table.

7. The method for automatically managing test cases based on exploratory testing according to claim 1, characterized in that: The step S4 includes: pre-writing an automated test script, in which the input parameters are missing; connecting the automated test script to the database of the operation recording module, reading the database table content of the module part tested by the current automated test script through SQL statement query, and passing the content into the automated test script as an input parameter to complete the automatic test script combination.

8. A system for automatically managing test cases based on exploratory testing, configured to execute the method for automatically managing test cases based on exploratory testing as claimed in any one of claims 1 to 7; characterized in that: It includes client, operation record module, script generation module, use case generation module and use case management platform, among which; The client is configured to connect to the intermediate server and then to the operation server to establish a connection, and to perform a test after connecting to the intermediate server; the operation recording module is configured to extract the control information packet and the font information packet from the RDP protocol message, and to determine whether the control information packet is a mouse operation event. If so, the font information packet content is stored in the graphic character table; if not, the mouse and keyboard code values ​​in the RDP protocol message are extracted and stored in the keyboard operation table; The script generation module is used to obtain the content of the graphic text table as the operation object parameter, obtain the content of the keyboard operation table as the event input parameter, and combine them to generate an automatic test script; The use case generation module is used to obtain the test report results after the automatic test script is executed, and use them as test case results to combine with the graphic text table and keyboard operation table to generate test cases; Use case management platform, used to receive test cases and manage them in the repository.

Citation Information

Patent Citations

  • Intelligent auditing method and device

    CN106713494A

  • Industrial control protocol fuzzy test case generation method based on flow tracing

    CN110401581A

  • Test case generation method and device, equipment and storage medium

    CN111400193A