Software testing method, device, equipment, storage medium and program product
By obtaining and converting software testing requirements documents and using asynchronous threads to generate test outline files and data, the problem of low efficiency in the generation of test data in the existing technology is solved, and more efficient and accurate test data generation is achieved.
Patent Information
- Application Number
- CN202411987918.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-04
AI Technical Summary
In the prior art, the generation efficiency of software test data is low and error-prone, mainly because it is time-consuming and labor-intensive for manual processing of test data files.
By obtaining the requirements documents of the target testing software, converting them into structured data, and turning them on asynchronous threads in the thread pool to generate test outline files and test data.
It greatly improves the generation speed of the test outline and the generation efficiency of test data, and reduces the occurrence of manual errors.
Smart Images

Figure CN119759793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a software testing method, device, equipment, storage medium and program product. Background Art
[0002] With the development of computer technology, more and more software with various functions have emerged. In order to ensure the normal operation of each functional point in the software, software testing has become an indispensable link before the normal operation of the software.
[0003] In the related art, the test data obtained by performing various tests on the functional points of the software relies on manual processing, and test data files of various formats need to be manually created and maintained. However, manual test data processing is not only time-consuming and labor-intensive, but also prone to errors, resulting in low test data generation efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a software testing method, device, equipment, storage medium and program product that can improve the efficiency of test data generation in response to the above technical problems.
[0005] In a first aspect, the present application provides a software testing method, comprising:
[0006] Obtaining a requirement document of a target test software, wherein the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software;
[0007] Converting information of multiple to-be-tested functional points in the requirement document into structured data;
[0008] According to the structured data, an asynchronous thread is started in a thread pool, and a test outline file corresponding to the requirement document is generated through the asynchronous thread, wherein the test outline file includes test cases and test intentions corresponding to the multiple function points to be tested respectively;
[0009] According to the test intent corresponding to each to-be-tested function point, the test case corresponding to each to-be-tested function point is tested to obtain the test data of the target test software.
[0010] In one embodiment, generating a test outline file corresponding to the requirement document includes:
[0011] Acquire the names of the multiple function points to be tested from the structured data;
[0012] Classifying the multiple test function points according to the names of the multiple function points to be tested, and determining the function point types respectively corresponding to the multiple test function points;
[0013] Determine a test item corresponding to each test function point according to the function point types respectively corresponding to the multiple test function points;
[0014] Generate test cases and test intents for each function point to be tested according to the test items corresponding to each test function point;
[0015] A test outline file corresponding to the requirement document is generated according to the test cases and test intentions corresponding to each functional point to be tested.
[0016] In one of the embodiments, the test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rule, transaction input and output, business interface, business voucher or report.
[0017] In one embodiment, generating test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes:
[0018] If the test item is a transaction input and output, a test case is generated for each transaction input and output field corresponding to the transaction input and output;
[0019] For the test case corresponding to each transaction input and output field, a first test intent is generated, and the first test intent is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
[0020] In one embodiment, generating test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes:
[0021] If the test item is a business interface, a test case is generated for each calling interface of the business interface;
[0022] For each test case corresponding to the calling interface, a second test intention is generated, and the second test intention is used to verify the accuracy of the output parameters, output parameters and interface calling logic of the corresponding calling interface.
[0023] In one embodiment, generating test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes:
[0024] If the test item is not a business interface or a transaction input and output, a test case is generated for each test item corresponding to each test function point;
[0025] For the test case corresponding to each test item, a third test intent is generated, and the third test intent is used to verify the accuracy of the corresponding test item.
[0026] In a second aspect, the present application provides a software testing device, comprising:
[0027] An acquisition module is used to acquire a requirement document of a target test software, wherein the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software;
[0028] A conversion module, used to convert information of multiple to-be-tested functional points in the requirement document into structured data;
[0029] A generating module, configured to start an asynchronous thread in a thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread, wherein the test outline file includes test cases and test intentions corresponding to the plurality of function points to be tested respectively;
[0030] The test module is used to test the test case corresponding to each function point to be tested according to the test intention corresponding to each function point to be tested, so as to obtain the test data of the target test software.
[0031] In one of the embodiments, the generation module is further used to obtain the names of the multiple function points to be tested from the structured data; classify the multiple test function points according to the names of the multiple function points to be tested, and determine the function point types corresponding to the multiple test function points; determine the test items corresponding to each test function point according to the function point types corresponding to the multiple test function points; generate test cases and test intentions corresponding to each function point to be tested according to the test items corresponding to each test function point; generate a test outline file corresponding to the requirement document according to the test cases and test intentions corresponding to each function point to be tested.
[0032] In one of the embodiments, the test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rule, transaction input and output, business interface, business voucher or report.
[0033] In one of the embodiments, the generation module is also used to generate a test case for each transaction input and output field corresponding to the transaction input and output if the test item is a transaction input and output; and generate a first test intention for the test case corresponding to each transaction input and output field, wherein the first test intention is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
[0034] In one embodiment, the generation module is also used to generate a test case for each calling interface of the business interface if the test item is a business interface; and generate a second test intention for the test case corresponding to each calling interface, wherein the second test intention is used to verify the accuracy of the output parameters, output parameters and interface calling logic of the corresponding calling interface.
[0035] In one of the embodiments, the generation module is also used to generate a test case for each test item corresponding to each test function point if the test item is not a business interface or transaction input and output; and to generate a third test intention for the test case corresponding to each test item, wherein the third test intention is used to verify the accuracy of the corresponding test item.
[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the software testing method of the first aspect when executing the computer program.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the software testing method of the first aspect described above.
[0038] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the software testing method of the first aspect when executed by a processor.
[0039] The software testing method, device, equipment, storage medium and program product described above obtain the requirement document of the target test software, which includes information of multiple to-be-tested functional points corresponding to the target test software; convert the information of multiple to-be-tested functional points in the requirement document into structured data; start an asynchronous thread in the thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread, wherein the test outline file includes test cases and test intentions corresponding to multiple to-be-tested functional points respectively; test the test case corresponding to each to-be-tested functional point according to the test intention corresponding to each to-be-tested functional point, and obtain the test data of the target test software. Since the information of multiple to-be-tested functional points in the requirement document is automatically converted into structured data, and then the structured data is processed through the asynchronous thread to obtain the test outline file, the generation speed of the test outline is greatly improved compared to the manual generation of the test outline, thereby improving the subsequent generation efficiency of test data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 An application environment diagram of a software testing method provided in an embodiment of the present application;
[0042] Figure 2 A flowchart of a software testing method provided in an embodiment of the present application;
[0043] Figure 3 A flowchart of another software testing method provided in an embodiment of the present application;
[0044] Figure 4 A structural block diagram of a software testing device provided in an embodiment of the present application;
[0045] Figure 5 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] 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.
[0047] The software testing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0048] When software testing is required, the terminal 102 can send a requirement document of the target test software to the server 104. The server 104 can first obtain the requirement document of the target test software, which includes information of multiple to-be-tested functional points corresponding to the target test software. Secondly, the server 104 can convert the information of multiple to-be-tested functional points in the requirement document into structured data. Thirdly, the server 104 can start an asynchronous thread in the thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread. The test outline file includes test cases and test intentions corresponding to multiple to-be-tested functional points. Finally, the server 104 can test the test case corresponding to each to-be-tested functional point according to the test intention corresponding to each to-be-tested functional point, and obtain the test data of the target test software.
[0049] The terminal 102 may be, but is not limited to, various personal computers, laptop computers, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0050] In an exemplary embodiment, Figure 2 As shown, a software testing method is provided, which is applied to Figure 1 Taking the server in as an example, the software testing method includes S201-S204:
[0051] S201. Obtain the requirement document of the target test software.
[0052] In the present application, when software testing is required, the server can obtain the requirement document of the target test software.
[0053] The requirement document includes information on multiple to-be-tested functional points corresponding to the target test software.
[0054] In the embodiment of the present application, the target test software can be any type of software, including application systems deployed within a specific object, video playback software, instant messaging software, customer service software, shopping software, etc.
[0055] It should be understood that the embodiments of the present application do not limit the information of the function points to be tested. By way of example, the information of the function points to be tested may include at least one of the following: function point name, function point number, function description, business process, interface prototype, system rules, transaction input and output, calling interface, voucher or report.
[0056] Among them, transaction input and output, call interface, voucher or report can be used as a function point to be tested. Function point name, function point number, function description, business process, interface prototype, system rules can be used as the description information of each function point to be tested.
[0057] It should be understood that the embodiments of the present application do not limit how to obtain the requirement document of the target test software. In some embodiments, the terminal can send a request to generate a test outline file to the server, and the request to generate the test outline file includes the requirement document of the target test software. The requirement asset management platform deployed on the server can extract the requirement document of the target test software from the request to generate the test outline file, so as to facilitate the subsequent generation of the test outline file based on the requirement document of the target test software.
[0058] S202: Convert information of multiple to-be-tested functional points in the requirement document into structured data.
[0059] In this step, after the server obtains the requirement document of the target test software, the information of multiple to-be-tested functional points in the requirement document may be converted into structured data.
[0060] In some embodiments, after receiving the requirement document of the target test software, the server can upload the requirement document of the target test software to the requirement asset management platform for requirement storage. The requirement asset management platform can parse the requirement document of the target test software, determine the information of multiple functional points to be tested in the requirement document of the target test software, and then fill the information of the multiple functional points to be tested into the structured data template, thereby converting the information of the multiple functional points to be tested in the requirement document into structured data.
[0061] The structured data template may be pre-set and may be partially or completely updated by inputting relevant instruction information to the server. Exemplarily, the structured data template may be composed of multiple data tables, and structured data may be obtained by splitting the information of multiple function points to be tested into different data tables.
[0062] S203. According to the structured data, an asynchronous thread is started in the thread pool, and a test outline file corresponding to the requirement document is generated through the asynchronous thread.
[0063] In this step, after the server converts the information of multiple to-be-tested functional points in the requirement document into structured data, it can start an asynchronous thread in the thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread.
[0064] The test outline file includes test cases and test intentions corresponding to multiple functional points to be tested.
[0065] It should be understood that the thread pool is a form of multi-threaded processing. The thread pool can add tasks to the queue and then create threads to automatically start these tasks. The thread pool can improve efficiency, reduce the consumption of system resources, and improve response speed. By reusing threads in the thread pool, the overhead caused by frequent creation and destruction of threads can be avoided, thereby reducing the consumption of system resources.
[0066] Correspondingly, asynchronous threads are other threads that can continue to execute before the task in one thread is completed. The asynchronous thread method allows the program to continue to execute other tasks while waiting for an event or resource, thereby allowing threads to process tasks in parallel, thereby improving the execution efficiency of the program, reducing the user's waiting time, and making full use of the computing power of multi-core processors.
[0067] It should be understood that the embodiments of the present application do not limit how to generate a test outline file corresponding to a requirement document. In some embodiments, through an asynchronous thread, the names of multiple function points to be tested can be first obtained from structured data, and the multiple test function points can be classified according to the names of the multiple function points to be tested, and the function point types corresponding to the multiple test function points can be determined. Secondly, the test items corresponding to each test function point can be determined according to the function point types corresponding to the multiple test function points. Thirdly, the test cases and test intentions corresponding to each function point to be tested can be generated according to the test items corresponding to each test function point. Finally, the test outline file corresponding to the requirement document can be generated according to the test cases and test intentions corresponding to each function point to be tested.
[0068] Among them, the above-mentioned function point types can be specifically set according to actual conditions. For example, they can be divided into multiple function points such as online, batch, and interface.
[0069] Among them, the above test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rules, transaction input and output, business interface, business voucher or report.
[0070] It should be understood that in the present application, the names of the function points to be tested of different function point types are different. The asynchronous thread can obtain the names of multiple function points to be tested from the structured data, and then determine the function point types corresponding to the multiple test function points by identifying the key characters in the names of the multiple function points to be tested.
[0071] In some embodiments, for test function points of different function point types, the corresponding test items are different. The server can generate different test cases and test intentions based on the test items corresponding to the test function points through asynchronous threads.
[0072] In some embodiments, if the test item is a transaction input and output, the server generates a test case for each transaction input and output field corresponding to the transaction input and output through an asynchronous thread. Subsequently, the server generates a first test intent for the test case corresponding to each transaction input and output field through an asynchronous thread, and the first test intent is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
[0073] The information in the transaction input and output fields may include the name, type, length, etc. of the transaction input and output fields.
[0074] Exemplarily, in the transaction input and output, for each corresponding transaction input and output field, a test case is generated. Accordingly, the first test intention corresponding to the transaction input and output field is to verify the name, type, length, and whether it is required, and to verify whether the value logic is correct.
[0075] In some embodiments, if the test item is a business interface, the server generates a test case for each calling interface of the business interface through an asynchronous thread. Subsequently, the server generates a second test intent for the test case corresponding to each calling interface through an asynchronous thread, and the second test intent is used to verify the accuracy of the output parameters, output parameters and interface calling logic of the corresponding calling interface.
[0076] Exemplarily, in a business interface, a test case is generated for each calling interface, and the second test corresponding to the calling interface is intended to verify the accuracy of the input parameters, output parameters, and logic of the interface.
[0077] In some embodiments, the server may generate a test case for each of the other test items in addition to generating test cases for the business interface and transaction input and output through an asynchronous thread. Subsequently, the server generates a third test intent for the test cases corresponding to the other test items through an asynchronous thread, and the third test intent is used to verify the accuracy of the corresponding test item.
[0078] Exemplarily, a test case can be generated for each test function point's business process, business interface prototype, business system rule, business voucher, business report and other test items, so as to verify the accuracy of the business process, business interface prototype, business system rule, business voucher, business report, etc. through the third test intention.
[0079] In the present application, after the asynchronous thread generates test cases and test intentions corresponding to multiple function points to be tested, the test cases and test intentions can be combined into a test outline file, wherein the test outline file can be presented in the form of a table file.
[0080] In this application, the demand asset management platform can use thread pool technology to start a thread to asynchronously execute the generation task of the test outline file when the demand is entered into the warehouse. The user does not need to wait for the test outline to be generated, which improves the user experience. Later, in the demand entry record, you can also view the generation status of the test outline file and download the file. In addition, the task corresponding to viewing the generation status of the test outline file can also be called separately using the interface call method.
[0081] S204: According to the test intent corresponding to each to-be-tested function point, test the test case corresponding to each to-be-tested function point to obtain test data of the target test software.
[0082] In this step, when the server starts an asynchronous thread in the thread pool according to the structured data by the demand asset management platform, and generates a test outline file corresponding to the demand document through the asynchronous thread, the software testing system can then test the test case corresponding to each function point to be tested according to the test intent corresponding to each function point to be tested, and obtain the test data of the target test software.
[0083] In some embodiments, after the test outline file is generated by the demand asset management platform, the software testing system can determine the corresponding test script based on different test intentions. Subsequently, the software testing system can test the test case corresponding to each function point to be tested by executing different test scripts respectively, thereby obtaining the test data of the target test software.
[0084] In other embodiments, the software testing system may also render the test data corresponding to each test case into the same spreadsheet file through a simplified spreadsheet (EasyExcel) operation, and automatically upload the generated spreadsheet file to a file server for downloading by users.
[0085] The software testing method provided in the embodiment of the present application is that when the demand asset management platform enters the demand into the database, it helps the user to seamlessly generate a test outline file that matches the demand content, which not only improves the user experience, but also helps the user save a lot of work in writing test outlines, thereby improving the efficiency of test data generation.
[0086] The software testing method provided by the embodiment of the present application obtains the requirement document of the target test software, wherein the requirement document includes information of multiple to-be-tested functional points corresponding to the target test software; converts the information of multiple to-be-tested functional points in the requirement document into structured data; based on the structured data, starts an asynchronous thread in the thread pool, and generates a test outline file corresponding to the requirement document through the asynchronous thread, wherein the test outline file includes test cases and test intents corresponding to multiple to-be-tested functional points respectively; based on the test intent corresponding to each to-be-tested functional point, tests the test case corresponding to each to-be-tested functional point to obtain the test data of the target test software. Since the information of multiple to-be-tested functional points in the requirement document is automatically converted into structured data, and then the structured data is processed through the asynchronous thread to obtain the test outline file, the generation speed of the test outline is greatly improved compared to the manual generation of the test outline, thereby improving the generation efficiency of subsequent test data.
[0087] The following describes how to generate the test outline file corresponding to the requirement document. Figure 3 A flowchart of another software testing method provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the software testing method includes S301-S309:
[0088] S301 . Obtain a requirement document of a target test software, where the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software.
[0089] S302: Convert information of multiple to-be-tested functional points in the requirement document into structured data.
[0090] S303. Start an asynchronous thread in the thread pool according to the structured data.
[0091] S304: Obtain names of multiple to-be-tested function points from structured data through an asynchronous thread.
[0092] S305 , classifying the multiple test function points according to the names of the multiple function points to be tested through an asynchronous thread, and determining the function point types corresponding to the multiple test function points.
[0093] S306: Determine the test item corresponding to each test function point according to the function point types respectively corresponding to the multiple test function points through an asynchronous thread.
[0094] In some embodiments, the test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rule, transaction input and output, business interface, business voucher or report.
[0095] S307: Generate test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point through an asynchronous thread.
[0096] In some embodiments, if the test item is transaction input and output, a test case is generated for each transaction input and output field corresponding to the transaction input and output; then, a first test intention is generated for the test case corresponding to each transaction input and output field, and the first test intention is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
[0097] In one embodiment, if the test item is a business interface, a test case is generated for each calling interface of the business interface, and then a second test intention is generated for the test case corresponding to each calling interface. The second test intention is used to verify the accuracy of the input parameters, output parameters and interface calling logic of the corresponding calling interface.
[0098] In one embodiment, if the test item is not a business interface or a transaction input and output, a test case is generated for each test item corresponding to each test function point. Subsequently, a third test intent is generated for each test case corresponding to the test item, and the third test intent is used to verify the accuracy of the corresponding test item.
[0099] S308. Generate a test outline file corresponding to the requirement document according to the test cases and test intentions corresponding to each function point to be tested through an asynchronous thread.
[0100] S309: According to the test intent corresponding to each to-be-tested function point, test the test case corresponding to each to-be-tested function point to obtain the test data of the target test software.
[0101] The software testing method provided by the embodiment of the present application obtains the requirement document of the target test software, wherein the requirement document includes information of multiple to-be-tested functional points corresponding to the target test software; converts the information of multiple to-be-tested functional points in the requirement document into structured data; based on the structured data, starts an asynchronous thread in the thread pool, and generates a test outline file corresponding to the requirement document through the asynchronous thread, wherein the test outline file includes test cases and test intents corresponding to multiple to-be-tested functional points respectively; based on the test intent corresponding to each to-be-tested functional point, tests the test case corresponding to each to-be-tested functional point to obtain the test data of the target test software. Since the information of multiple to-be-tested functional points in the requirement document is automatically converted into structured data, and then the structured data is processed through the asynchronous thread to obtain the test outline file, the generation speed of the test outline is greatly improved compared to the manual generation of the test outline, thereby improving the generation efficiency of subsequent test data.
[0102] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0103] Based on the same inventive concept, the embodiment of the present application also provides a software testing device for implementing the software testing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more software testing device embodiments provided below can refer to the limitations on the software testing method above, and will not be repeated here.
[0104] In an exemplary embodiment, Figure 4 As shown, a software testing device 400 is provided, comprising: an acquisition module 401, a conversion module 402, a generation module 403 and a testing module 404, wherein:
[0105] The acquisition module 401 is used to acquire a requirement document of the target test software, where the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software.
[0106] The conversion module 402 is used to convert the information of multiple to-be-tested functional points in the requirement document into structured data.
[0107] The generation module 403 is used to start an asynchronous thread in the thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread. The test outline file includes test cases and test intentions corresponding to multiple functional points to be tested.
[0108] The testing module 404 is used to test the test case corresponding to each function point to be tested according to the test intent corresponding to each function point to be tested, so as to obtain the test data of the target test software.
[0109] In one of the embodiments, the generation module 403 is also used to obtain the names of multiple function points to be tested from the structured data; classify the multiple test function points according to the names of the multiple function points to be tested, and determine the function point types corresponding to the multiple test function points; determine the test items corresponding to each test function point according to the function point types corresponding to the multiple test function points; generate test cases and test intentions corresponding to each function point to be tested according to the test items corresponding to each test function point; generate a test outline file corresponding to the requirement document according to the test cases and test intentions corresponding to each function point to be tested.
[0110] In one of the embodiments, the test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rule, transaction input and output, business interface, business voucher or report.
[0111] In one embodiment, the generation module 403 is also used to generate a test case for each transaction input and output field corresponding to the transaction input and output if the test item is a transaction input and output; for the test case corresponding to each transaction input and output field, a first test intention is generated, and the first test intention is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
[0112] In one embodiment, the generation module 403 is also used to generate a test case for each calling interface of the business interface if the test item is a business interface; for the test case corresponding to each calling interface, a second test intention is generated, and the second test intention is used to verify the accuracy of the output parameters, output parameters and interface calling logic of the corresponding calling interface.
[0113] In one embodiment, the generation module 403 is also used to generate a test case for each test item corresponding to each test function point if the test item is not a business interface or transaction input and output; and to generate a third test intention for each test case corresponding to the test item, and the third test intention is used to verify the accuracy of the corresponding test item.
[0114] Each module in the above software testing device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0115] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a software testing method is implemented.
[0116] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned software testing method when executing the computer program.
[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned software testing method is implemented.
[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the above software testing method when executed by a processor.
[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0121] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A software testing method, characterized in that: The method comprises: Obtaining a requirement document of a target test software, wherein the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software; Converting information of multiple to-be-tested functional points in the requirement document into structured data; According to the structured data, an asynchronous thread is started in a thread pool, and a test outline file corresponding to the requirement document is generated through the asynchronous thread, wherein the test outline file includes test cases and test intentions corresponding to the multiple function points to be tested respectively; According to the test intent corresponding to each to-be-tested function point, the test case corresponding to each to-be-tested function point is tested to obtain the test data of the target test software.
2. The method according to claim 1, characterized in that The generating of the test outline file corresponding to the requirement document comprises: Acquire the names of the multiple function points to be tested from the structured data; Classifying the multiple test function points according to the names of the multiple function points to be tested, and determining the function point types respectively corresponding to the multiple test function points; Determine a test item corresponding to each test function point according to the function point types respectively corresponding to the multiple test function points; Generate test cases and test intents for each function point to be tested according to the test items corresponding to each test function point; A test outline file corresponding to the requirement document is generated according to the test cases and test intentions corresponding to each functional point to be tested.
3. The method according to claim 2, characterized in that The test items include at least one of the following: function point name, function point number, function description, business process, business interface prototype, business system rules, transaction input and output, business interface, business voucher or report.
4. The method according to claim 3, characterized in that The generating of test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes: If the test item is a transaction input and output, a test case is generated for each transaction input and output field corresponding to the transaction input and output; For the test case corresponding to each transaction input and output field, a first test intent is generated, and the first test intent is used to verify whether the information in the corresponding transaction input and output field is required information and to verify the value logic of the transaction input and output field.
5. The method according to claim 3, characterized in that: The generating of test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes: If the test item is a business interface, a test case is generated for each calling interface of the business interface; For each test case corresponding to the calling interface, a second test intention is generated, and the second test intention is used to verify the accuracy of the output parameters, output parameters and interface calling logic of the corresponding calling interface.
6. The method according to claim 2, characterized in that The generating of test cases and test intentions corresponding to each to-be-tested function point according to the test items corresponding to each test function point includes: If the test item is not a business interface or a transaction input and output, a test case is generated for each test item corresponding to each test function point; For the test case corresponding to each test item, a third test intent is generated, and the third test intent is used to verify the accuracy of the corresponding test item.
7. A software testing device, characterized in that: The device comprises: An acquisition module is used to acquire a requirement document of a target test software, wherein the requirement document includes information of a plurality of to-be-tested functional points corresponding to the target test software; A conversion module, used to convert information of multiple to-be-tested functional points in the requirement document into structured data; A generating module, configured to start an asynchronous thread in a thread pool according to the structured data, and generate a test outline file corresponding to the requirement document through the asynchronous thread, wherein the test outline file includes test cases and test intentions corresponding to the plurality of function points to be tested respectively; The test module is used to test the test case corresponding to each function point to be tested according to the test intention corresponding to each function point to be tested, so as to obtain the test data of the target test software.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.