Test tool generation method and apparatus, electronic device, and storage medium
By defining the functional modules and data of the testing tool, the testing tool is automatically built, solving the problems of complex construction and slow updates in existing technologies, and realizing a testing tool that can be built quickly and adapted to multiple scenarios.
Patent Information
- Application Number
- CN202210833292.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-07-14
AI Technical Summary
Existing testing tools rely on hard-coded implementations, which require a high level of expertise, involve complex build processes, require code rewriting for logic changes, have poor multi-scenario coverage capabilities, and cannot quickly respond to tool updates.
By identifying the functional modules and their logical relationships required by the target testing tool, acquiring basic and business data, and automatically building the testing tool based on the logical relationship information, the professional threshold is lowered, and the construction and updating of the testing tool can be achieved conveniently and quickly.
It enables rapid construction and multi-scenario coverage of testing tools, lowers the professional threshold, improves the response speed of tool updates, and facilitates management and maintenance.
Smart Images

Figure CN115237690B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer technology, and in particular to a test tool generation method, device, electronic equipment and storage medium. Background Art
[0002] In testing scenarios, testers need to use testing tools to assist them in testing business functions. Testing tools can be considered convenient tools that combine common, public functions. They can directly generate the desired data without requiring complex, step-by-step operations. Therefore, with testing tools, testers can be freed from complex data generation and operations.
[0003] In the process of implementing the present invention, the inventors found that the current construction of testing tools mainly relies on hard-coding, which has high professional requirements and a complex construction process; any logical changes involved in the testing tools require code rewriting, which is very inconvenient to manage and maintain, has poor multi-scenario coverage capabilities, and cannot quickly respond to tool updates. Summary of the Invention
[0004] The embodiments of the present invention provide a test tool generation method, device, electronic device and storage medium, which can quickly and conveniently construct a test tool.
[0005] In a first aspect, an embodiment of the present invention provides a test tool generation method, comprising:
[0006] Determine the various functional modules required for the target test tool to be created, and determine the logical relationship information between the various functional modules;
[0007] Obtaining basic data and business data of each functional module;
[0008] Construct each functional module based on the basic data and business data of each functional module;
[0009] The functional modules are associated based on the logical relationship information to generate the target testing tool.
[0010] Optionally, obtaining basic data of each functional module includes:
[0011] Obtaining data call information configured for each functional module;
[0012] The basic data of the corresponding functional module is acquired based on the data calling information.
[0013] Optionally, the acquiring of data call information respectively configured for each functional module includes:
[0014] Determining the interface type selected for each functional module;
[0015] Display the information acquisition page corresponding to the interface type;
[0016] The data call information configured for the corresponding functional module is obtained based on the information acquisition page.
[0017] Optionally, the data call information includes basic interface information, call interface information, interface input parameters, and interface return data information, and acquiring basic data of the corresponding functional module based on the data call information includes:
[0018] Determining a basic interface based on the basic interface information, and determining a calling interface based on the calling interface information;
[0019] Based on the interface input parameters and the interface return data information, the calling interface is called through the basic interface to obtain the basic data of the corresponding functional module.
[0020] Optionally, the data call information includes database connection information, database operation information, and database return data information, and acquiring basic data of a corresponding functional module based on the data call information includes:
[0021] Connecting to a corresponding database based on the database connection information;
[0022] performing operations in the database based on the database operation information;
[0023] The basic data of the corresponding functional module returned after the data information acquisition operation is returned based on the database.
[0024] Optionally, obtaining the business data of each functional module includes:
[0025] Obtaining page construction information configured for the target testing tool;
[0026] constructing a business page based on the page construction information and displaying the business page;
[0027] The business data of each functional module is obtained based on the business page.
[0028] Optionally, the method further includes:
[0029] Determining a tool type of the target test tool;
[0030] The target test tool is published to a toolset corresponding to the tool type.
[0031] In a second aspect, an embodiment of the present invention provides a test tool generating device, the device comprising:
[0032] A determination module, configured to determine the various functional modules required for the target test tool to be created, and to determine the logical relationship information between the various functional modules;
[0033] An acquisition module, used to acquire basic data and business data of each functional module;
[0034] A construction module, configured to construct each functional module based on the basic data and business data of each functional module;
[0035] An associating module is used to associate the functional modules based on the logical relationship information to generate the target testing tool.
[0036] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a test tool generation method as described in any one of the embodiments of the present invention is implemented.
[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the test tool generation method as described in any one of the embodiments of the present invention.
[0038] In an embodiment of the present invention, it is possible to determine the various functional modules required for the target test tool to be created, and determine the logical relationship information between the various functional modules; obtain the basic data and business data of each functional module; construct each functional module based on the basic data and business data of each functional module; and associate each functional module based on the logical relationship information to generate a target test tool. The embodiment of the present invention is equivalent to templating the construction process of the test tool. After the relevant personnel provide the logical relationship information between the various functional modules required for the target test tool to be created, the basic data and business data of each functional module through page visualization operations such as configuration, input, and selection, the construction of the test tool can be automatically realized. The construction of the test tool no longer needs to be implemented through hard coding, which lowers the professional threshold and is convenient and fast. Changes to the test tool can be achieved by modifying page operations such as configuration, input, and options, which improves the response speed of the test tool update and provides convenience for the management and maintenance of the test tool. Through the method provided by the embodiment of the present invention, a test tool suitable for different scenarios can be quickly constructed, improving the multi-scenario coverage capability of the test tool. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of a test tool generation method provided by an embodiment of the present invention;
[0040] Figure 2is another flowchart of the test tool generation method provided by an embodiment of the present invention;
[0041] Figures 3 to 8 Schematic diagrams of some pages of the test tool generation method provided by an embodiment of the present invention;
[0042] Figure 9 This is a structural diagram of a test tool generating device provided by an embodiment of the present invention;
[0043] Figure 10 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0045] Figure 1 This is a flow chart of a test tool generation method provided in an embodiment of the present invention. This method can be executed by a test tool generation device provided in an embodiment of the present invention, which can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, such as a personal computer, a computer, etc. The following embodiments will be described using the device integrated into an electronic device as an example. Figure 1 , the method may specifically include the following steps:
[0046] Step 101: determine the functional modules required by the target test tool to be created, and determine the logical relationship information between the functional modules.
[0047] Among them, the target test tool can be any test tool that needs to be created, such as a real-name user acquisition tool, a card binding tool, etc., which is not specifically limited here. Generally speaking, a test tool consists of multiple functional modules. After determining the target test tool that needs to be created, the target test tool can be functionally disassembled to determine the various functional modules required by the target test tool and the logical relationship information between the various functional modules. The logical relationship information can represent the mutual call relationship, execution logic relationship, execution order, etc. between the various functional modules. For example, a certain test tool requires four functional modules, functional modules A, B, C and D. The logical relationship information of these four functional modules is: execute A and B first, execute C based on the execution results of A and B, and execute D based on the execution result of C.
[0048] For example, a test tool generation application (or a test tool generation system) can be installed on an electronic device. The test tool generation application can template the process of test tool generation. When a test tool needs to be built, relevant personnel (such as R&D personnel, designers or testers) can start the test tool generation application. The electronic device can obtain user operation information through the page of the test tool generation application, determine the various functional modules required for the target test tool to be created based on the user operation information, and determine the logical relationship information between the various functional modules. The user operation information can be, for example, user input, setting, and selection information. For example, after the test tool generation application is started, the relevant page can be displayed, and the relevant personnel can enter the name of each functional module on the relevant page and set the execution logic of each functional module. The electronic device can determine the various functional modules required for the target test tool based on the user input and setting information on the test tool generation application, and determine the logical relationship information between the various functional modules.
[0049] Step 102: Obtain basic data and business data of each functional module.
[0050] Basic data can be understood as data unrelated to the specific services provided by the corresponding functional module, such as data generation rules; business data can be understood as data related to the specific services provided by the corresponding functional module, such as specific card numbers and names. For example, basic data and business data can also be obtained based on user operation information on the application page generated by the test tool.
[0051] For example, the acquisition of basic information depends on data calling. The interface type selected for each functional module can be determined, and the information acquisition page corresponding to the interface type can be displayed. Based on the information acquisition page, the data call information configured for the corresponding functional module can be obtained, and finally, the basic data of the corresponding functional module can be obtained based on the data call information. Among them, the interface type can include but is not limited to the Java Server Faces (JSF) interface, the Hypertext Transfer Protocol (HTTP) interface, the Structured Query Language (SQL) interface, the Lucene-based search server (ElasticSearch, ES) interface, and the Redis interface. Through the corresponding type of interface selected for each functional module, the basic data of the corresponding functional module can be directly or indirectly called based on the data call information.
[0052] For example, the acquisition of basic information mainly relies on user operations. It can obtain the page construction information configured for the target testing tool; construct and display the business page based on the page construction information; and obtain the business data of each functional module based on the business page. The page construction information can include page elements (such as input boxes, radio buttons, drop-down boxes, etc.), labels, page layout (such as one row and two columns, one row and three columns, etc.), page style, and other information. Based on the user selection information and user input information on the business page, the business data of each functional module can be obtained.
[0053] Step 103: construct each functional module based on its basic data and business data.
[0054] For example, the basic data and business data of each functional module can be written into the corresponding functional generation template, and the corresponding functional generation template can be run to construct the corresponding functional module. For example, functional module A can be generated based on the basic data and business data of functional module A, and functional module B can be generated based on the basic data and business data of functional module B.
[0055] Step 104 : Associating the functional modules based on the logical relationship information to generate a target test tool.
[0056] For example, the various functional modules may be combined and assembled according to the logical relationship information to associate the various functional modules, thereby generating a target test tool.
[0057] The embodiment of the present invention templates the construction process of the test tool. After the relevant personnel provide the logical relationship information between the various functional modules required for the target test tool to be created, the basic data and business data of each functional module through configuration, input, selection and other operations, the construction of the test tool can be automatically realized. The construction of the test tool no longer needs to be implemented through hard coding, which lowers the professional threshold and is convenient and fast. Changes to the test tool can be achieved by modifying the configuration, input, options, etc., which improves the response speed of the test tool update and provides convenience for the management and maintenance of the test tool. Through the method provided by the embodiment of the present invention, test tools suitable for different scenarios can be quickly constructed, thereby improving the multi-scenario coverage capability of the test tool.
[0058] The test tool generation method provided by the embodiment of the present invention is further described below with reference to specific examples. The test tool generation method can also be used in electronic devices, and a test tool generation application can be installed on the electronic device, such as Figure 2 As shown, the method may include the following steps:
[0059] Step 201 : determining the functional modules required by the target test tool to be created, and determining the logical relationship information between the functional modules.
[0060] A test tool typically consists of multiple functional modules. After determining the target test tool to be created, the target test tool can be functionally disassembled to determine the functional modules required by the target test tool and the logical relationships between the functional modules. This logical relationship information can indicate the mutual call relationships, execution logic relationships, and execution order between the functional modules. The electronic device can obtain user operation information through the test tool generation application, and based on the user operation information, determine the functional modules required for the target test tool to be created and the logical relationships between the functional modules.
[0061] For example, let's create a card binding tool. This tool is used to bind users to bank card information. By breaking down the functions of the tool, we can obtain the following functional modules and the logical relationship between the modules: (1) Create user information (2) Create bank card information (3) Get the type of bank card (4) Bind the bank card number information to the user (5) Query the binding status information.
[0062] When the test tool generation application on the electronic device is started, the function editing page can be displayed. On the function editing page, relevant personnel can enter the names of the various function modules required by the target test tool and set the logical relationship information of each function module. Taking the creation of the card binding tool as an example, the function editing page can be as follows Figure 3 As shown, relevant personnel can enter the name of the corresponding functional module under each step of the function editing page according to the disassembly results of the card binding tool. The sequence of steps reflects the logical relationship information of each functional module. The electronic device determines the functional modules required for the card binding tool and the logical relationship information between each functional module based on the user input information.
[0063] Step 202: Determine the interface type selected for each functional module.
[0064] For example, the implementation of different functional modules involves calling different types of interfaces. Therefore, a page can be provided for users to select the interface type for each functional module. Common interface types include JSF, HTTP, SQL, ES, and Redis. JSF and HTTP interfaces require indirect interface calls to obtain the basic data of the corresponding functional module, while SQL, ES, and Redis interfaces can be directly called to obtain the basic data of the corresponding functional module.
[0065] Step 203: Display the information acquisition page corresponding to the interface type.
[0066] For example, different functional modules may be configured with different interface types, and different interface types may correspond to different information acquisition pages.
[0067] Step 204: Acquire data call information configured for the corresponding functional module based on the information acquisition page.
[0068] Specifically, when it is necessary to obtain the basic data of the corresponding functional module through an indirect call of the interface, the data call information of the corresponding functional module obtained may include basic interface information, calling interface information, interface input parameters and interface return data information; when the basic data of the corresponding functional module can be obtained through a direct call of the interface, the data call information of the corresponding functional module obtained may include database connection information, database operation information and database return data information.
[0069] For example, following the previous example of creating a card binding tool, you can configure or select the JSF interface type for the "Create User Information" function module. The information acquisition page corresponding to the JSF interface type can be as follows: Figure 4 As shown in the figure, it includes basic interface information acquisition items (such as basic interface address), call interface information acquisition items (such as call interface alias, call method), interface input parameter acquisition items and interface return data information acquisition items (such as return data extraction path, variable value). The information obtained by these acquisition items is data call information. For another example, you can configure or select the SQL interface type for the "Get bank card type" function module, and the information acquisition page corresponding to the SQL interface type can be as follows: Figure 5 As shown, it includes database connection information acquisition items (such as database address, name), database operation information acquisition items (operation statements, operation parameters) and database return data information acquisition items (such as return data extraction path, variable value). The information acquired by these acquisition items is data call information.
[0070] Specifically, when the interface type selected for a functional module is a JSF interface or an HTTP interface, the function or execution logic of the acquired data call information may be as follows:
[0071] 1) Define the basic interface for implementing the functional module;
[0072] 2) Define the calling interface and calling method of the basic interface;
[0073] 3) Define the data and template field parameters that the basic interface passes to the calling interface;
[0074] 4) Define the data returned by the calling interface.
[0075] When the interface type selected for a functional module is the SQL interface, ES interface, or Redis interface, the function or execution logic of the acquired data call information can be as follows:
[0076] 1) Define the database connection information for implementing the functional module;
[0077] 2) Define the operation statements (SQL statements for SQL interface, nosql statements for ES interface, and redis statements for Redis interface) and parameter fields to implement the functional module;
[0078] 3) Define the data returned by the interface.
[0079] Step 205: Acquire basic data of the corresponding functional module based on the data call information.
[0080] Among them, basic data can be understood as data that is unrelated to the specific business provided by the corresponding functional module, such as data generation rules.
[0081] Step 206: Obtain page construction information configured for the target testing tool.
[0082] Page construction information may include page elements (such as input boxes, radio buttons, drop-down boxes, etc.), labels, page layout (such as one row and two columns, one row and three columns, etc.), page style and other information. Specifically, a construction information acquisition page can be provided to obtain page construction information based on user operation information of relevant personnel on the construction information acquisition page. For example, the construction information acquisition page is such as Figure 6 As shown, it includes information acquisition items such as page layout, tag name, variable name, type, and location.
[0083] Step 207: construct a business page based on the page construction information and display the business page.
[0084] The business page displayed is used to obtain the business data of each functional module. For example, for the card binding tool, its business page can be as follows Figure 7 As shown, it is used to obtain business data such as card number, name, ID number, etc.
[0085] Step 208: Acquire business data of each functional module based on the business page.
[0086] Business data can be understood as data related to the specific business provided by the corresponding functional module, such as specific card number, name, etc.
[0087] Step 209: construct each functional module based on its basic data and business data.
[0088] For example, the basic data and business data of each functional module may be written into a corresponding functional generation template, and the corresponding functional generation template may be run to construct the corresponding functional module.
[0089] Step 210 : Associating the functional modules based on the logical relationship information to generate a target test tool.
[0090] For example, the various functional modules may be combined and assembled according to the logical relationship information to associate the various functional modules, thereby generating a target test tool.
[0091] Step 211: Determine the tool type of the target testing tool.
[0092] By way of example, tool types may include, but are not limited to, marketing tools, user tools, wallet tools, and the like.
[0093] Step 212: Publish the target test tool to the toolset corresponding to the tool type.
[0094] Publishing the target test tools to the toolset corresponding to the tool type can facilitate the management and maintenance of the test tools and form a test toolset commonly used in the test environment. For example, the toolset page is such as Figure 8 As shown, it includes marketing tools, user tools, wallet tools, etc.
[0095] Furthermore, when a built test tool requires logic adjustments or detail changes, relevant personnel can implement them through visual input, option modification, or configuration through the page. The entire test tool can be built or modified through user input, selection, or configuration on the browser page, which is simple and fast.
[0096] The embodiment of the present invention templates the construction process of the test tool. After the relevant personnel provide the logical relationship information between the various functional modules required for the target test tool to be created, the basic data and business data of each functional module through configuration, input, selection and other operations, the construction of the test tool can be automatically realized. The construction of the test tool no longer needs to be implemented through hard coding, which lowers the professional threshold and is convenient and fast. Changes to the test tool can be achieved by modifying the configuration, input, options, etc., which improves the response speed of the test tool update and provides convenience for the management and maintenance of the test tool. Through the method provided by the embodiment of the present invention, test tools suitable for different scenarios can be quickly constructed, thereby improving the multi-scenario coverage capability of the test tool.
[0097] Figure 9 This is a structural diagram of a test tool generation device provided by an embodiment of the present invention, which is suitable for executing the test tool generation method provided by an embodiment of the present invention. Figure 9 As shown, the device may specifically include:
[0098] Determination module 301, used to determine the various functional modules required by the target test tool to be created, and to determine the logical relationship information between the various functional modules;
[0099] An acquisition module 302 is used to acquire basic data and business data of each functional module;
[0100] A construction module 303 is configured to construct each functional module based on the basic data and business data of each functional module;
[0101] The associating module 304 is configured to associate the functional modules based on the logical relationship information to generate the target testing tool.
[0102] In one embodiment, the acquisition module 302 acquires the basic data of each functional module, including:
[0103] Obtaining data call information configured for each functional module;
[0104] The basic data of the corresponding functional module is acquired based on the data calling information.
[0105] In one embodiment, the acquisition module 302 acquires the data call information configured for each functional module, including:
[0106] Determining the interface type selected for each functional module;
[0107] Display the information acquisition page corresponding to the interface type;
[0108] The data call information configured for the corresponding functional module is obtained based on the information acquisition page.
[0109] In one embodiment, the data call information includes basic interface information, call interface information, interface input parameters, and interface return data information. The acquisition module 302 acquires basic data of the corresponding functional module based on the data call information, including:
[0110] Determining a basic interface based on the basic interface information, and determining a calling interface based on the calling interface information;
[0111] Based on the interface input parameters and the interface return data information, the calling interface is called through the basic interface to obtain the basic data of the corresponding functional module.
[0112] In one embodiment, the data call information includes database connection information, database operation information, and database return data information. The acquisition module 302 acquires basic data of the corresponding functional module based on the data call information, including:
[0113] Connecting to a corresponding database based on the database connection information;
[0114] performing operations in the database based on the database operation information;
[0115] The basic data of the corresponding functional module returned after the data information acquisition operation is returned based on the database.
[0116] In one embodiment, the acquisition module 302 acquires the business data of each functional module, including:
[0117] Obtaining page construction information configured for the target testing tool;
[0118] constructing a business page based on the page construction information and displaying the business page;
[0119] The business data of each functional module is obtained based on the business page.
[0120] In one embodiment, the device further comprises:
[0121] The publishing module is configured to determine a tool type of the target testing tool and publish the target testing tool to a toolset corresponding to the tool type.
[0122] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0123] The device of the embodiment of the present invention templates the construction process of the test tool. After the relevant personnel provide the logical relationship information between the various functional modules required for the target test tool to be created, the basic data and business data of each functional module through configuration, input, selection and other operations, the construction of the test tool can be automatically realized. The construction of the test tool no longer needs to be implemented through hard coding, which lowers the professional threshold and is convenient and fast. Changes to the test tool can be achieved by modifying the configuration, input, options, etc., which improves the response speed of the test tool update and provides convenience for the management and maintenance of the test tool. Through the method provided by the embodiment of the present invention, test tools suitable for different scenarios can be quickly constructed, thereby improving the multi-scenario coverage capability of the test tool.
[0124] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the test tool generation method provided in any of the above embodiments when executing the program.
[0125] An embodiment of the present invention further provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the test tool generation method provided in any of the above embodiments is implemented.
[0126] Reference below Figure 10 , which shows a schematic structural diagram of a computer system 400 of an electronic device suitable for implementing an embodiment of the present invention. Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0127] like Figure 10 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage unit 408 into a random access memory (RAM) 403. Various programs and data required for the operation of the system 400 are also stored in the RAM 403. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0128] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.
[0129] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present invention are performed.
[0130] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0132] The modules and / or units described in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, a processor may be described as including a determination module, an acquisition module, a construction module, and an association module. The names of these modules do not, in some cases, limit the modules themselves.
[0133] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently without being incorporated into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by the device, the device includes:
[0134] Determine the various functional modules required for the target test tool to be created, and determine the logical relationship information between the various functional modules; obtain the basic data and business data of the various functional modules; construct the various functional modules based on the basic data and business data of the various functional modules; associate the various functional modules based on the logical relationship information to generate the target test tool.
[0135] According to the technical solution of the embodiment of the present invention, the construction process of the test tool is templated. After the relevant personnel provide the logical relationship information between the various functional modules required for the target test tool to be created, the basic data and business data of each functional module through configuration, input, selection and other operations, the construction of the test tool can be automatically realized. The construction of the test tool no longer needs to be implemented through hard coding, which lowers the professional threshold and is convenient and fast. Changes to the test tool can be achieved by modifying the configuration, input, options, etc., which improves the response speed of the test tool update and provides convenience for the management and maintenance of the test tool. Through the method provided by the embodiment of the present invention, test tools suitable for different scenarios can be quickly constructed, thereby improving the multi-scenario coverage capability of the test tool.
[0136] The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations. The above specific implementation methods do not constitute a limitation on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A test tool generation method, characterized in that: Test tool generation application for installation on electronic devices, including: Displaying a function editing page, determining the function modules required for the target test tool to be created based on the names of the function modules required by the target test tool input by the user on the function editing page, and determining the logical relationship information between the function modules based on the logical relationship information of the function modules set by the user on the function editing page; Acquiring basic data and business data of each functional module based on user operation information on a page of the application generated by the testing tool; Construct each functional module based on the basic data and business data of each functional module; The functional modules are associated based on the logical relationship information to generate the target testing tool.
2. The method according to claim 1, characterized in that The obtaining of basic data of each functional module includes: Obtaining data call information configured for each functional module; The basic data of the corresponding functional module is acquired based on the data calling information.
3. The method according to claim 2, characterized in that The acquiring of data call information respectively configured for each functional module includes: Determining the interface type selected for each functional module; Display the information acquisition page corresponding to the interface type; The data call information configured for the corresponding functional module is obtained based on the information acquisition page.
4. The method according to claim 2, characterized in that The data call information includes basic interface information, call interface information, interface input parameters and interface return data information. The basic data of the corresponding functional module is obtained based on the data call information, including: Determining a basic interface based on the basic interface information, and determining a calling interface based on the calling interface information; Based on the interface input parameters and the interface return data information, the calling interface is called through the basic interface to obtain the basic data of the corresponding functional module.
5. The method according to claim 2, characterized in that The data call information includes database connection information, database operation information and database return data information. The basic data of the corresponding functional module is obtained based on the data call information, including: Connecting to a corresponding database based on the database connection information; performing operations in the database based on the database operation information; The basic data of the corresponding functional module returned after the data information acquisition operation is returned based on the database.
6. The method according to claim 1, characterized in that The obtaining of the business data of each functional module includes: Obtaining page construction information configured for the target testing tool; constructing a business page based on the page construction information and displaying the business page; The business data of each functional module is obtained based on the business page.
7. The method according to claim 1, characterized in that The method further comprises: Determining a tool type of the target test tool; The target test tool is published to a toolset corresponding to the tool type.
8. A test tool generating device, characterized in that: Test tool generation application for installation on electronic devices, including: a determination module for displaying a function editing page, determining the function modules required for the target testing tool to be created based on the names of the function modules required for the target testing tool input by the user on the function editing page, and determining the logical relationship information between the function modules based on the logical relationship information of the function modules set by the user on the function editing page; An acquisition module, configured to acquire basic data and business data of each functional module based on user operation information on a page of an application generated by the test tool; A construction module, configured to construct each functional module based on the basic data and business data of each functional module; An associating module is used to associate the functional modules based on the logical relationship information to generate the target testing tool.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the test tool generating method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the test tool generating method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Automatic testing device and method incorporating a variety of testing tools
CN101212362A