Test data construction and processing methods, devices, computer equipment and storage media
By obtaining and executing data construction instructions, test data is generated and managed, which solves the problems of single application scenarios, complex operations and low construction efficiency in the existing technology, realizes efficient test data generation and management, and ensures the accuracy of software testing. .
Patent Information
- Application Number
- CN202111264370.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-10-28
AI Technical Summary
When constructing test data, the existing test data system has single application scenarios, complex operations, low construction efficiency, and cannot monitor tampered test data, which affects the accuracy of software testing.
By obtaining data construction instructions, executing number creation scenario tasks, generating target test data, determining data attributes according to the instruction trigger type, and storing them in the scene data pool for monitoring and processing, centralized management and isolation of test data is achieved.
It simplifies the test data generation operation, improves the construction efficiency, is suitable for full-link test data generation in different application scenarios, enhances the management and troubleshooting capabilities of test data, and ensures the accuracy of software testing.
Smart Images

Figure CN114020612B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a test data construction processing method, device, computer equipment and storage medium. Background Art
[0002] At present, users generally need to use a test data system to construct test data in order to complete software testing based on the constructed test data. When constructing test data, the existing test data system has the problems of single application scenario, complex operation and low construction efficiency. In addition, it is impossible to monitor tampered test data. After the test data is called, software testing will affect the accuracy of software testing. Summary of the invention
[0003] The embodiments of the present invention provide a test data construction processing method, apparatus, computer equipment and storage medium to solve the problems of single application scenario, complex operation, low construction efficiency and inconvenient troubleshooting in the existing test data construction process.
[0004] A test data construction processing method, comprising:
[0005] Acquire a data construction instruction, wherein the data construction instruction includes a target scene identifier and an instruction trigger type;
[0006] Acquire a number-making scene task corresponding to the target scene identifier, wherein the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter;
[0007] Execute the number-making scenario task, execute at least one number-making action script corresponding to the target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data;
[0008] Determining data attributes corresponding to the target test data according to the instruction trigger type;
[0009] The target test data carrying the data attribute is stored in a scene data pool corresponding to the target scene identifier, and the target test data in the scene data pool is monitored.
[0010] A test data construction processing device, comprising:
[0011] A data construction instruction acquisition module, used to acquire a data construction instruction, wherein the data construction instruction includes a target scene identifier and an instruction trigger type;
[0012] A number-making scene task acquisition module, used to acquire a number-making scene task corresponding to the target scene identifier, wherein the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter;
[0013] A target test data acquisition module is used to execute the number-making scenario task, execute at least one number-making action script corresponding to the target action according to the scenario parameter value corresponding to the scenario configuration parameter, and acquire target test data;
[0014] A data attribute determination module, used to determine the data attribute corresponding to the target test data according to the instruction trigger type;
[0015] The test data storage monitoring module is used to store the target test data carrying the data attributes in the scene data pool corresponding to the target scene identifier, and perform monitoring processing on the target test data in the scene data pool.
[0016] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the test data construction processing method when executing the computer program.
[0017] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the test data construction processing method is implemented.
[0018] The above-mentioned test data construction and processing method, device, computer equipment and storage medium only need to configure information such as target scenario identification, target action and scenario parameter value, and can call and execute at least one number-making action script under the target application scenario, and can quickly generate the target test data required for different application scenarios, so that the generation operation of the target test data is simple and the construction efficiency is high. It can be applied to the full-link test data generation of different application scenarios, and improve the scope of application of the target test data. Moreover, according to the instruction trigger type, the data attributes of the target test data can be determined, and the target test data carrying the data attributes can be stored in the scene data pool corresponding to the target scenario identification, so as to monitor and process the target test data in the scene data pool, which can not only realize the unified and centralized management of the target test data, but also effectively isolate the target test data according to the data attributes, so as to facilitate the investigation of the target test data being called or tampered with, so as to improve the investigation efficiency later. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1is a schematic diagram of an application environment of a test data construction and processing method in one embodiment of the present invention;
[0021] Figure 2 is a flow chart of a test data construction processing method in one embodiment of the present invention;
[0022] Figure 3 is another flow chart of a test data construction processing method in one embodiment of the present invention;
[0023] Figure 4 is another flow chart of a test data construction processing method in one embodiment of the present invention;
[0024] Figure 5 is another flow chart of a test data construction processing method in one embodiment of the present invention;
[0025] Figure 6 is another flow chart of a test data construction processing method in one embodiment of the present invention;
[0026] Figure 7 is another flow chart of a test data construction processing method in one embodiment of the present invention;
[0027] Figure 8 is a schematic diagram of a test data construction processing device in one embodiment of the present invention;
[0028] Fig. 9 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] The test data construction processing method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the test data construction processing method is applied in a test data system, and the test data system includes: Figure 1The client and server shown in the figure communicate with each other through the network to realize the rapid construction of the target test data required for the target application scenario, and determine the data attributes corresponding to the target test data according to the instruction trigger type corresponding to each target test data, so as to isolate the target test data based on the data attributes, so as to check the tampered target test data, and then help to ensure the accuracy of subsequent software testing. Among them, the client, also known as the user end, refers to the program corresponding to the server and providing local services to the customer. The client can be installed on but not limited to various personal computers, laptops, smart phones, tablets and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0031] In one embodiment, if Figure 2 As shown, a test data construction processing method is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps:
[0032] S201: Acquire a data construction instruction, where the data construction instruction includes a target scene identifier and an instruction trigger type;
[0033] S202: Acquire a number-making scene task corresponding to the target scene identifier, where the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter;
[0034] S203: Execute the number-making scenario task, execute the number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data;
[0035] S204: Determine data attributes corresponding to the target test data according to the instruction trigger type;
[0036] S205: storing the target test data carrying the data attributes in a scene data pool corresponding to the target scene identifier, and performing monitoring processing on the target test data in the scene data pool.
[0037] The data construction instruction is an instruction for triggering the construction of test data, specifically an instruction for triggering the execution of a number-making scenario task to construct test data.
[0038] The target scenario identifier is an identifier used to uniquely identify the target application scenario. The target application scenario is the application scenario corresponding to the test data to be constructed this time. For example, the target application scenario can be a scenario applicable to credit card system testing, or a scenario applicable to e-commerce system testing.
[0039] The instruction trigger type is the type of instruction that triggers the data construction. As an example, the instruction trigger type includes an automatic trigger type and a manual trigger type. The automatic trigger type is a type that automatically triggers the construction of test data, for example, a type that triggers the construction of test data according to a timed construction task. The manual trigger type is a type that is manually triggered by a user to construct test data, that is, a type that is manually triggered by a user to construct test data.
[0040] As an example, in step S201, the server may receive a data construction instruction triggered by a user on the client, that is, the user may select a target scene identifier from multiple scene identifiers to be selected in the data construction interface of the client, triggering the formation of a data construction instruction. At this time, the data construction instruction carries a target scene identifier, and its instruction trigger type is a manual trigger type. The scene identifier to be selected is an identifier used to uniquely identify a certain application scene to be selected. The application scene to be selected refers to an application scene pre-configured by the system for the user to select.
[0041] As another example, in step S201, the server may execute a data construction instruction triggered by a scheduled construction task, the data construction instruction carries a target scenario identifier pre-configured for the scheduled construction task, and its instruction trigger type is an automatic trigger type.
[0042] The number-generating scenario task refers to the task used to construct test data that meets the target requirements in the target application scenario. The target action refers to the action selected for this number generation. The scenario configuration parameter refers to the parameter that the user needs to configure in the process of generating the number-generating scenario task. The scenario parameter value is the parameter value configured by the user.
[0043] As an example, in step S202, the server may obtain the number-making scenario task corresponding to the target scenario identifier according to the target scenario identifier. For example, the server may control the client to display the task configuration interface corresponding to the target scenario identifier, and the user may determine at least one target action from the multiple standard actions provided in the task configuration interface. When the target actions include at least two, the order of actions also needs to be determined; the parameter configuration interface corresponding to the target action is displayed, and the scene parameter value corresponding to the scene configuration parameter is input in the parameter configuration interface to obtain the number-making scenario task corresponding to the target scenario identifier, so that the number-making scenario task includes at least one target action and the scene parameter value corresponding to the scene configuration parameter. The standard action here refers to the action included in the system to be tested corresponding to the target application scenario. For example, when the target application scenario is a scenario suitable for credit card system testing, its standard actions include card issuance, card registration and binding, activation, control and transaction, etc.; in a number-making scenario task, the standard action of card issuance can be selected as the target action to ensure that the target test data finally generated can be used to test the card issuance function of the system; in another number-making scenario task, the two standard actions of card issuance and card registration and binding can be selected as the target actions to ensure that the target test data finally generated can be used for testing the card registration and binding function after executing the card issuance action.
[0044] As another example, in step S202, the server may execute a data construction instruction triggered by a timed construction task, the data construction instruction carrying at least one target action and scene configuration parameter pre-configured for the timed construction task, and may directly obtain a number-making scene task corresponding to the target scene identifier.
[0045] The number-generating action script is a pre-configured script used to generate test data corresponding to a certain action.
[0046] As an example, in step S203, the server may use the scenario parameter value of the scenario configuration parameter as the script input parameter of the number-generating action script corresponding to at least one target action, and execute the number-generating action script corresponding to at least one target action in sequence according to the dependency relationship between at least one target action, and determine the output result of the last executed number-generating action script as the target test data, so that the target test data can be applied to scenario tests corresponding to different number-generating scenario tasks.
[0047] Understandably, users only need to independently configure information such as the target scenario identifier, target action, and scenario parameter value to call and execute at least one number-generating action script under the target application scenario, which can quickly generate the target test data required for different application scenarios, making the generation of target test data simple and highly efficient. It can be applied to the generation of full-link test data for different application scenarios, thereby improving the scope of application of target test data.
[0048] Among them, data attributes refer to the data attributes carried by the target test data when it is generated. Public attributes are attributes that can be used by all users. Private attributes are attributes that are only available to specific users.
[0049] As an example, in step S204, since the instruction trigger type includes an automatic trigger type and a manual trigger type, when the server determines the data attribute corresponding to the target test data according to the instruction trigger type, it specifically includes: if the instruction trigger type is an automatic trigger type, the data attribute corresponding to the target test data is a public attribute; if the instruction trigger type is a manual trigger type, the data attribute corresponding to the target test data is a private attribute. It can be understood that the data attribute of each target test data is determined according to the instruction trigger type corresponding to each data construction instruction, so that data isolation is performed on all target test data according to the data attribute of the target test data.
[0050] The scenario data pool is a collection of target test data for storing specific scenarios.
[0051] As an example, in step S205, the server may store the target test data carrying data attributes in the scene data pool corresponding to the target scene identifier, and then monitor all the target test data in the scene data pool to monitor whether the target test data is called by the test script to perform software testing. The server may monitor and obtain the data occupancy of the target test data in the scene data pool called by the test script, and perform overall management according to the data occupancy, for example, adding new target test data, or checking the called or tampered target test data.
[0052] It can be understood that by storing the target test data with data attributes in the scenario data pool corresponding to the target scenario identifier, the target test data can be centrally managed according to its application scenario. The target test data carries data attributes, and data isolation between different target test data can be achieved based on the data attributes. When the target test data is subsequently called or tampered with, the called or tampered target test data can be quickly checked by updating or maintaining its data attributes, so as to prevent the called or tampered target test data from being called again by the system to be tested, affecting the accuracy of the test of the system to be tested.
[0053] In the test data construction and processing method provided in this embodiment, only the target scenario identifier, target action, scenario parameter value and other information need to be configured to call and execute at least one number-making action script under the target application scenario, and the target test data required for different application scenarios can be quickly generated, making the target test data generation operation simple and the construction efficiency high. It can be applied to the full-link test data generation of different application scenarios, and improve the scope of application of the target test data. Moreover, the data attributes of the target test data can be determined according to the instruction trigger type, and the target test data carrying the data attributes can be stored in the scenario data pool corresponding to the target scenario identifier, which can not only realize the unified and centralized management of the target test data, but also effectively isolate the target test data according to the data attributes, so as to facilitate the investigation of the target test data being called or tampered with, so as to improve the investigation efficiency later.
[0054] Step S201, i.e. obtaining a data construction instruction, includes: executing a timed construction task corresponding to a target scene identifier, obtaining a data construction instruction, wherein the data construction instruction includes a target scene identifier and an automatic trigger type;
[0055] Step S202, i.e. obtaining the number-making scene task corresponding to the target scene identifier, includes:
[0056] Calling a task generation script that matches the target scene identifier to generate a number-making scene task corresponding to the target scene identifier;
[0057] Step S203, i.e., executing a number-generating action script corresponding to at least one target action according to the scene parameter value corresponding to the scene configuration parameter to obtain target test data, includes:
[0058] According to the scenario parameter value corresponding to the scenario configuration parameter, execute the number-making action script corresponding to at least one target action to obtain the target test data matching the configured number of number-making;
[0059] Step S204, i.e. determining the data attribute corresponding to the target test data according to the instruction trigger type, includes:
[0060] According to the automatic trigger type, it is determined that the data attribute corresponding to the target test data is a public attribute.
[0061] As a specific implementation of step S201, the server executes a timed construction task corresponding to the target scene identifier and obtains a data construction instruction, where the data construction instruction includes the target scene identifier and the automatic trigger type.
[0062] In one embodiment, before step S201, a timed construction task needs to be pre-configured, and the configuration process includes the following steps: (1) obtaining a task configuration instruction, which includes a target scenario identifier, a configuration execution time, a configuration number generation frequency, and a configuration number generation quantity; (2) based on the configuration execution time, the configuration number generation frequency, and the configuration number generation quantity, a timed construction task corresponding to the target scenario identifier is formed. In this example, when the current system time matches the configuration execution time and the configuration number generation frequency, the server can trigger the execution of the timed construction task corresponding to the target scenario identifier, and obtain a data construction instruction, which includes the target scenario identifier and the automatic trigger type.
[0063] Among them, the task configuration instruction is an instruction used to trigger the configuration of a scheduled task. The configuration execution time is the time configured by the user to trigger the first execution of the scheduled construction task. The configuration number generation frequency is the frequency configured by the user to control the frequency of two consecutive executions of the scheduled construction task, which can be understood as the interval time between two consecutive executions of the scheduled construction task. For example, the configuration number generation frequency can be set to once a week or once on Sunday, etc. The configuration number generation quantity is the number of test data configured by the user to control the number of test data required to be constructed each time the scheduled construction task is executed. The scheduled construction task is a task used to implement the scheduled number generation.
[0064] As an example, the server may receive a task configuration instruction triggered by a user, and the task configuration instruction includes task configuration information such as a target scenario identifier, a configuration execution time, a configuration frequency of number generation, and a configuration number of number generation set by the user. After obtaining the task configuration information such as the target scenario identifier, the configuration execution time, the configuration frequency of number generation, and the configuration number of number generation, the server may call a pre-set scheduled task generation program to process the above task configuration information, so as to quickly generate a scheduled construction task corresponding to the target scenario identifier.
[0065] For example, if the execution time is configured as Monday and the numbering frequency is configured as once a week, when the current system time is every Monday, the scheduled construction task corresponding to the target scene identifier is triggered to execute, and the data construction instruction is obtained. The target scene identifier in the scheduled construction task can be directly determined as the target scene identifier in the data construction instruction. Since the data construction instruction is a timed triggered instruction, its instruction trigger type can be set to an automatic trigger type. Therefore, the data construction instruction includes a target scene identifier and an automatic trigger type.
[0066] As a specific implementation of step S202, after the server triggers the data construction instruction corresponding to the target scenario identifier at a fixed time, it can call the task generation script matching the target scenario identifier to automatically generate the number-making scenario task corresponding to the target scenario identifier. In this example, the task generation script is a pre-configured script for generating the number-making scenario task, that is, the script that can execute steps S301-S304 configured before the current time of the system to generate the number-making scenario task.
[0067] As a specific implementation of step S203, the server can execute a number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data that matches the configured number of number-making, so that each time the number-making scenario task is executed, the target test data that matches the configured number of number-making can be obtained, thereby achieving the purpose of generating target test data on demand.
[0068] As a specific implementation of step S204, when the server generates data construction instructions according to the scheduled construction task, its instruction trigger type is an automatic trigger type. Therefore, the data attributes corresponding to the target test data need to be determined as public attributes so that the constructed target test data can be used by all users.
[0069] In the test data construction processing method provided in this embodiment, according to the timed construction task configured by the user, the target test data matching the configured number of numbers can be automatically and regularly generated to ensure the construction efficiency of the target test data and achieve the purpose of constructing the target test data on demand. When the target test data is generated regularly, the target test data is made to carry public attributes so that it is effectively isolated from the target test data carrying private attributes to improve the availability of the target test data and facilitate the investigation of the target test data that has been called or tampered with.
[0070] In one embodiment, if Figure 3 As shown, before step S201, before obtaining the data construction instruction, the test data construction processing method further includes:
[0071] S301: Acquire a script generation instruction, where the script generation instruction includes a target scene identifier and a target action;
[0072] S302: Acquire a target scene action tree corresponding to the target scene identifier, where the target scene action tree is a tree structure formed by sorting all standard actions according to the business logic of the target scene identifier;
[0073] S303: Determine whether the target action has a dependent action according to the target position of the target action in the target scene action tree;
[0074] S304: If the target action has a dependent action, determine the to-be-configured parameters corresponding to the target action based on the action output parameters corresponding to the dependent action and the action input parameters corresponding to the target action;
[0075] S305: If the target action does not have a dependent action, determine the to-be-configured parameters corresponding to the target action based on the action input parameters corresponding to the target action;
[0076] S306: Generate a number-making action script corresponding to the target action according to the data construction rule corresponding to the target action and the parameters to be configured.
[0077] The script generation instruction is an instruction for triggering the generation of a number-generating action script.
[0078] As an example, in step S301, the server may receive a script generation instruction triggered by a user, wherein the script generation instruction carries a target scenario identifier and a target action, so as to generate a number-generating action script corresponding to the target action in the target application scenario.
[0079] The target scenario action tree is a tree structure formed by sorting all standard actions according to the business logic of the target scenario identifier.
[0080] As an example, in step S302, the server pre-stores the scene action trees corresponding to different scene identifiers, and each scene action tree refers to a tree structure formed by sorting all standard actions in the scene based on the business logic corresponding to the scene identifier. After receiving the script generation instruction, the server only needs to determine the scene action tree that matches the target scene identifier as the target scene action tree according to the target scene identifier carried in the script generation instruction.
[0081] The dependent action refers to the action that must be executed before the target action is executed.
[0082] As an example, in step S303, the server may query the target scene action tree according to the target action, determine the target position of the target action in the target scene action tree, and determine whether there are other standard actions between the target position and the root node; if there are other standard actions between the target position and the root node, it is determined that there is a dependent action; if there are no other standard actions between the target position and the root node, it is determined that there is no dependent action. It can be understood that the target action is one of all the standard actions in the target scene action tree, and according to the target position of the target action in the target scene action tree, the one closest to the target action among all the standard actions from the root node to the target position can be determined as its dependent action.
[0083] Among them, the action output parameters of the dependent action refer to the parameters output after the dependent action is executed for the target action to call. The action input parameters corresponding to the target action refer to the parameters that need to be input during the execution of the target action. The parameters to be configured corresponding to the target action refer to the parameters that need to be configured to execute the number-making action script corresponding to the target action.
[0084] As an example, in step S304, when the target action has a dependent action, the server needs to determine the action output parameters corresponding to the dependent action and the action input parameters corresponding to the target action as the to-be-configured parameters corresponding to the target action. That is, in the number-generating process of each target action, the action output parameters corresponding to the dependent action and the action input parameters corresponding to the target action need to be pre-configured to ensure that the to-be-configured parameters of the number-generating action script can be configured independently without relying on the execution of the dependent action, thereby ensuring the independence of the execution of the number-generating action script.
[0085] As an example, in step S305, when there is no dependent action for the target action, the server only needs to determine the action input parameters corresponding to the target action as the to-be-configured parameters corresponding to the target action.
[0086] The data construction rules refer to the rules that are pre-set to meet the target action construction requirements. For example, in the target action of credit card issuance, the data construction rules are required to generate the corresponding credit card number according to the credit card number generation rules.
[0087] As an example, in step S306, the server may obtain a number-generating action script corresponding to the target action by encoding the data construction rules and parameters to be configured corresponding to the target action. The number-generating action script may be executed on the server to generate target test data matching the target action.
[0088] In the test data construction and processing method provided in the present embodiment, it is possible to determine whether there is a dependent action based on the target position of the target action in the target scene action tree, and then determine the parameters to be configured corresponding to the target action in different ways, and then generate a number-generating action script corresponding to the target action based on the data construction rules and the parameters to be configured. The independence of the number-generating action script can be guaranteed so that all number-generating action scripts can run independently, and the combined number-generating of at least one target action can be realized, so that the acquired target test data can more easily meet user needs.
[0089] In one embodiment, if Figure 4 As shown, step S202, i.e. obtaining the number-making scene task corresponding to the target scene identifier, includes:
[0090] S401: Controlling the display of a task configuration interface corresponding to the target scene identifier, where all standard actions corresponding to the target scene identifier are displayed on the task configuration interface;
[0091] S402: Determine at least one target action from all standard actions, each target action corresponding to a parameter to be configured;
[0092] S403: Determine a scene configuration parameter based on the to-be-configured parameter corresponding to the at least one target action, and obtain a scene parameter value corresponding to the scene configuration parameter;
[0093] S404: Determine a number-generating scene task based on at least one target action and a scene parameter value corresponding to the scene configuration parameter.
[0094] The task configuration interface is used to implement the task configuration of the number-making scenario. The standard action refers to the action included in the system to be tested corresponding to the target application scenario.
[0095] As an example, in step S401, after receiving the data construction instruction, the server can control the client to display the task configuration interface corresponding to the target scene identifier, and the task configuration interface displays all standard actions corresponding to the target scene identifier for the user to select and determine the target action selected for this number generation.
[0096] As an example, in step S402, the user may select and determine at least one target action from among all standard actions displayed on the task configuration interface. The target action may be understood as an action that needs to be executed for the target test data to be generated this time.
[0097] In this example, when the server receives at least two target actions selected by the user, it needs to obtain the configuration order of the at least two target actions determined independently by the user, perform an action verification on the configuration order of the at least two target actions, and obtain the action verification result; if the action verification result is that the verification passes, it is determined that the at least two target actions are successfully determined; if the action verification result is that the verification fails, an action configuration error message is prompted so that the user can make modifications based on the action configuration error message.
[0098] In this example, the server performs action verification on the configuration sequence of at least two target actions, specifically to verify whether the configuration sequence of at least two target actions conforms to the business logic of the target application scenario. For example, when the target application scenario is a scenario suitable for credit card system testing, according to its business logic, it is necessary to go through standard actions such as card issuance, card registration and binding, activation, control and transaction in sequence. If the user selects the two standard actions of card issuance and card registration and binding as the target actions, that is, card issuance comes first and card registration and binding comes later, it is determined to conform to the business logic and obtain the action verification result of passing the verification; if card registration and binding comes first and card issuance comes later, it is determined to be inconsistent with the business logic and obtain the action verification result of failing the verification.
[0099] As an example, in step S402, when determining at least one target action, the server needs to determine a parameter to be configured corresponding to at least one target action, where the parameter to be configured is a parameter that needs to be configured during the execution of each target action, that is, a parameter that needs to be input during the execution of the number-generating action script corresponding to each target action.
[0100] The scene configuration parameters refer to the parameters that need to be configured in the current number-making scene task. The scene parameter values corresponding to the scene configuration parameters refer to the specific parameter values corresponding to the scene configuration parameters configured by the user.
[0101] As an example, in step S403, when the server determines the parameters to be configured corresponding to at least one target action, since the parameters to be configured corresponding to at least one target action may be the same or different, if the specific parameter values of the parameters to be configured are configured separately for the target action, the configuration process will be inefficient. Therefore, the server needs to integrate all the parameters to be configured according to the parameters to be configured corresponding to at least one target action, so as to remove overlapping parameters to be configured and determine the final scene configuration parameters. This can achieve that when multiple target actions correspond to the same parameter to be configured, only the scene parameter value corresponding to the scene configuration parameter needs to be configured.
[0102] Furthermore, when executing at least two target actions, there may be a situation where the output result of the previous target action is the parameter to be configured for the next target action. If the specific parameter value of the parameter to be configured is configured only for the target action, the configuration process efficiency will be low. Therefore, the server can obtain the action output parameters of the number-generating action script corresponding to the at least two target actions, and use the action output parameters to filter the above-mentioned scene configuration parameters to obtain the scene configuration parameters after filtering out the action output parameters, which can further reduce the number of scene configuration parameters that need to be configured and help improve configuration efficiency.
[0103] As an example, in step S404, the server may determine a number-making scenario task based on a scenario parameter value corresponding to at least one target action and a scenario configuration parameter determined autonomously by the user, so that when the system is subsequently adjusted to execute the number-making scenario task, a number-making action script corresponding to at least one target action may be executed according to the scenario parameter value corresponding to the scenario configuration parameter to obtain target test data.
[0104] Understandably, the user can flexibly configure at least one target action according to the target application scenario, and can implement a combination of at least one target action to make the acquired target test data more easily meet the user's needs.
[0105] In the test data construction and processing method provided in this embodiment, all standard actions are displayed on the task configuration interface corresponding to the target scenario identifier for the user to determine the target action, which helps to improve the simplicity of the task configuration operation so as to improve the operation efficiency. The parameters to be configured corresponding to at least one target action are integrated to form a scene configuration parameter, which helps to improve the configuration efficiency of the scene parameter value. Then, based on all target actions and their scene parameter values, a number-making scene task is formed, so that when executing the number-making scene task, the number-making action script corresponding to at least one target action can be called, and the target test data required for different application scenarios can be quickly generated, so that the generation operation of the target test data is simple and the construction efficiency is high. It can be applied to the generation of full-link test data for different application scenarios, and the scope of application of the target test data is improved.
[0106] In one embodiment, if Figure 5 As shown, in step S205, the target test data in the scene data pool is monitored and processed, including:
[0107] S501: monitoring the scene data pool to obtain the current state of the target test data;
[0108] S502: If the current state of the target test data is changed from the available state to the occupied state, the data attribute of the target test data is maintained or updated.
[0109] As an example, in step S501, the server may monitor all target test data in the scene data pool according to the state monitoring task to obtain the current state corresponding to each target test data. The state monitoring task is used to monitor whether the target test data is occupied. The current state is a state used to reflect whether the target test data is occupied. It can be understood that the current state of the target test data can be any one of an occupied state and an available state, where the occupied state refers to the state in which the target test data has been occupied for testing, and the available state refers to the state in which the target test data has not been occupied for testing.
[0110] As an example, in step S502, when the server monitors that the current state of the target test data is changed from the available state to the occupied state, it indicates that the target test data has been occupied. At this time, the data attributes of the target test data need to be maintained or updated.
[0111] In this example, when the server monitors that the current state of the target test data has changed from an available state to an occupied state, and the data attribute corresponding to the target test data is a public attribute, the server needs to update the data attribute corresponding to the target test data to a private attribute to indicate that the target test data has been occupied, to prevent it from being occupied and modified by other third parties again, which helps to ensure the accuracy and reliability of testing based on the target test data.
[0112] In this example, when the server monitors that the current state of the target test data has changed from an available state to an occupied state, and the data attributes corresponding to the target test data are private attributes, the server can maintain the data attributes corresponding to the target test data as private attributes to avoid being occupied and modified by other third parties again, which helps to ensure the accuracy and reliability of testing based on the target test data.
[0113] In one embodiment, if Figure 6 As shown, in step S205, the target test data in the scene data pool is monitored and processed, including:
[0114] S601: Monitor the scene data pool to obtain the current state of the target test data;
[0115] S602: Determine the target test data whose current state is an available state and whose data attribute is a public attribute as valid test data;
[0116] S603: Count the number of all valid test data in the scenario data pool to determine the current supply quantity;
[0117] S604: Obtain the current demand quantity corresponding to the current supply cycle;
[0118] S605: If the current supply quantity is less than the current demand quantity, determine the target additional quantity according to the current demand quantity and the current supply quantity;
[0119] S606: Execute the number-generating scenario task, execute the number-generating action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data matching the target additional quantity.
[0120] As an example, in step S601, the server may monitor all target test data in the scene data pool according to the state monitoring task to obtain the current state corresponding to each target test data. The state monitoring task is used to monitor whether the target test data is occupied. The current state is a state used to reflect whether the target test data is occupied. It is understandable that the current state of the target test data can be any one of an occupied state and an available state, where the occupied state refers to the state in which the target test data has been occupied for testing, and the available state refers to the state in which the target test data has not been occupied for testing.
[0121] Among them, valid test data refers to test data that can be used by all users.
[0122] As an example, in step S602, the server needs to determine whether it is valid test data based on the current status corresponding to each target test data monitored in real time and the data attributes carried by each target test data. Specifically, the target test data whose current status is an available status and whose data attributes are public attributes is determined as valid test data, indicating that the valid test data has not been occupied and is available to all users and can be called by all users.
[0123] As an example, in step S603, after the server determines whether each target test data is valid test data according to the current state and data attributes, it needs to count the number of all valid test data in the scene data pool corresponding to the target scene identifier to determine the current supply quantity. The current supply quantity can be understood as the number of unoccupied target test data provided to all users.
[0124] Among them, the current supply cycle refers to the cycle of providing target test data formed after the current time of the system. It can be understood that the current supply cycle can match the configuration number generation frequency in the above steps. For example, if the configuration number generation frequency is once a week, then its current supply cycle is one week; if the configuration number generation frequency is once a month, then its current supply cycle is one month. The current demand quantity refers to the number of test data that needs to be constructed in the current supply cycle. For example, the current supply cycle can be September, and the current demand quantity refers to the number of valid test data that needs to be provided in September.
[0125] As an example, in step S604, the server may determine the default demand quantity preset by the system as the current demand quantity, or may statistically determine the current demand quantity corresponding to the current supply cycle based on the number of all test data that were in an occupied state before the current time of the system.
[0126] In this example, obtaining the current demand quantity corresponding to the current supply cycle specifically includes: (1) determining the target test data whose current state is occupied as occupied test data. (2) Obtaining the historical occupation time corresponding to the occupied test data. The historical occupation time can be understood as the time when a certain target test data is monitored to change from an available state to an occupied state. (3) According to the historical occupation time corresponding to each occupied test data, determine the historical supply cycle to which the occupied test data belongs. The current supply cycle refers to the cycle for providing target test data formed before the current time of the system. (4) Counting the number of all occupied test data corresponding to each historical supply cycle to determine the historical demand quantity corresponding to the historical supply cycle. For example, when the current supply cycle is September, August, July or other previous months are all historical supply cycles, and the historical demand quantities corresponding to these historical supply cycles need to be obtained accordingly. (5) Calculating the average of the historical demand quantities corresponding to all historical supply cycles, so as to determine the average of all historical demand quantities as the current demand quantity corresponding to the current supply cycle, so as to dynamically determine the current demand quantity based on historical experience.
[0127] As an example, in step S605, after obtaining the current supply quantity and the current demand quantity corresponding to the current supply cycle, the server needs to compare the current supply quantity with the current demand quantity to determine whether the number of valid test data in the scenario data pool can meet the test demand. In this example, when the current supply quantity is less than the current demand quantity, it is determined that the valid test data in the scenario data pool cannot meet the test demand and the target test data needs to be increased. Therefore, the difference between the current demand quantity and the current supply quantity can be determined as the target additional quantity. The target additional quantity can be understood as the number of test data that needs to be added this time.
[0128] As an example, in step S606, after determining the target additional quantity, the server can execute the number-making scenario task, execute the number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain the target test data matching the target additional quantity, that is, execute step S203 to reconstruct the target test data matching the target additional quantity. It can be understood that in the target test data reconstructed by executing the number-making scenario task, since its execution process is an automatic trigger type, the data attribute of the newly constructed target test data is a public attribute; since the target test data is newly constructed data, its current state defaults to an available state; therefore, executing step S606 can generate valid test data matching the target additional quantity, so as to realize the automatic expansion of the number of target test data in the scenario data pool corresponding to the target scenario identifier.
[0129] In the test data construction and processing method provided in this embodiment, the current status of the target test data can be dynamically monitored to determine the valid test data and its current supply quantity. When the current supply quantity is less than the current demand quantity, the target test data corresponding to the target additional quantity needs to be reconstructed and stored in the scenario data pool to realize intelligent monitoring of whether the number of valid test data in the scenario data pool is sufficient. If it is insufficient, the number-making scenario task can be intelligently triggered to supplement the missing target test data to avoid the lack of valid test data in the scenario data pool affecting the smooth progress of the system test.
[0130] In one embodiment, if Figure 7 As shown, in step S205, the target test data in the scene data pool is monitored and processed, including:
[0131] S701: Monitor the scene data pool to obtain the current state of the target test data;
[0132] S702: Determine the target test data whose current state is occupied as occupied test data;
[0133] S703: Count the number of all occupancy test data in the scene data pool to determine the scene occupancy number corresponding to the target scene identifier;
[0134] S704: Determine the scene priority corresponding to the target scene identifier according to the scene occupancy quantity corresponding to the target scene identifier;
[0135] S705: According to the scene priorities corresponding to all the target scene identifiers, adjust the scene interface position corresponding to the target scene identifier in the scene selection interface.
[0136] As an example, in step S701, the server may monitor all target test data in the scene data pool according to the state monitoring task to obtain the current state corresponding to each target test data. The state monitoring task is used to monitor whether the target test data is occupied. The current state is a state used to reflect whether the target test data is occupied. It is understandable that the current state of the target test data can be any one of an occupied state and an available state, where the occupied state refers to a state in which the target test data has been occupied for testing, and the available state refers to a state in which the target test data has not been occupied for testing.
[0137] As an example, in step S702, the server needs to determine whether the target test data is occupied test data based on the current status corresponding to each target test data monitored in real time. Specifically, the target test data whose current status is occupied is determined as occupied test data, indicating that the occupied test data has been occupied before the current time of the system.
[0138] As an example, in step S703, after determining whether each target test data is occupied test data, the server needs to count the number of all occupied test data in the scene data pool corresponding to the target scene identifier to determine the scene occupancy number corresponding to the target scene identifier. Generally speaking, the larger the scene occupancy number corresponding to the target scene identifier, the more often the target test data corresponding to the target scene identifier is occupied; conversely, the smaller the scene occupancy number corresponding to the target scene identifier, the less often the target test data corresponding to the target scene identifier is occupied.
[0139] As an example, in step S704, when the server obtains the scene occupancy quantities corresponding to all target scene identifiers, it can determine the scene priorities corresponding to all target scene identifiers according to the order of the scene occupancy quantities corresponding to all target scene identifiers. Generally speaking, the larger the scene occupancy quantity corresponding to the target scene identifier, the greater the scene priority corresponding to the target scene identifier; the smaller the scene occupancy quantity corresponding to the target scene identifier, the smaller the scene priority corresponding to the target scene identifier.
[0140] The scenario selection interface refers to the interface provided by the test data system for users to select test data for different application scenarios.
[0141] As an example, in step S705, when the server obtains the scene priorities corresponding to all target scene identifiers, it can sort the scene interface positions corresponding to all target scene identifiers in the scene selection interface according to the order of the scene priorities corresponding to all target scene identifiers, so as to dynamically adjust the scene interface positions corresponding to the target scene identifiers in the scene selection interface. For example, the scene interface positions of the first few scene priorities corresponding to the target scene identifiers can be placed in the common scene quick entry interface, so as to improve the efficiency of the user's selection of target test data with the first scene priority corresponding to the target scene identifier, thereby helping to improve the test efficiency.
[0142] This embodiment can determine the scene priority according to the number of occupancy tests corresponding to each target scene identifier, that is, according to the scene occupancy number corresponding to the target scene identifier, so as to dynamically adjust the scene interface position in the scene selection interface according to the scene priority, which helps to facilitate the calling of target test data with earlier scene priority, thereby helping to improve test efficiency.
[0143] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0144] In one embodiment, a test data construction processing device is provided, and the test data construction processing device corresponds one-to-one to the test data construction processing method in the above embodiment. Figure 8 As shown, the test data construction processing device includes a data construction instruction acquisition module 801, a number-making scenario task acquisition module 802, a target test data acquisition module 803, a data attribute determination module 804 and a test data storage monitoring module 805. The functional modules are described in detail as follows:
[0145] The data construction instruction acquisition module 801 is used to acquire the data construction instruction, where the data construction instruction includes a target scene identifier and an instruction trigger type;
[0146] A number-making scene task acquisition module 802 is used to acquire a number-making scene task corresponding to a target scene identifier, where the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter;
[0147] The target test data acquisition module 803 is used to execute the number-making scenario task, execute the number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and acquire the target test data;
[0148] The data attribute determination module 804 is used to determine the data attribute corresponding to the target test data according to the instruction trigger type;
[0149] The test data storage monitoring module 805 is used to store the target test data carrying data attributes in the scene data pool corresponding to the target scene identifier, and perform monitoring processing on the target test data in the scene data pool.
[0150] In one embodiment, the data construction instruction acquisition module 801 is used to execute the timed construction task corresponding to the target scene identifier and acquire the data construction instruction, where the data construction instruction includes the target scene identifier and the automatic trigger type;
[0151] A number-making scenario task acquisition module 802 is used to call a task generation script that matches a target scenario identifier and generate a number-making scenario task corresponding to the target scenario identifier;
[0152] The target test data acquisition module 803 is used to execute a number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data matching the configured number of numbers;
[0153] The data attribute determination module 804 is used to determine, according to the automatic trigger type, that the data attribute corresponding to the target test data is a public attribute.
[0154] In one embodiment, the test data construction processing device further includes:
[0155] A script generation instruction acquisition unit, used to acquire a script generation instruction, the script generation instruction including a target scene identifier and a target action;
[0156] A script generation instruction acquisition unit is used to acquire a target scene action tree corresponding to the target scene identifier, where the target scene action tree is a tree structure formed by sorting all standard actions according to the business logic of the target scene identifier;
[0157] A dependent action judgment unit, used to determine whether a target action has a dependent action according to a target position of the target action in a target scene action tree;
[0158] A first parameter determination unit, configured to determine, if the target action has a dependent action, a parameter to be configured corresponding to the target action based on an action output parameter corresponding to the dependent action and an action input parameter corresponding to the target action;
[0159] A second parameter determination unit, configured to determine a parameter to be configured corresponding to the target action based on an action input parameter corresponding to the target action if the target action has no dependent action;
[0160] The number-making action script generating unit is used to generate a number-making action script corresponding to the target action according to the data construction rules and the parameters to be configured corresponding to the target action.
[0161] In one embodiment, the number-making scenario task acquisition module 802 includes:
[0162] A configuration interface display unit, used to control the display of a task configuration interface corresponding to the target scene identifier, and display all standard actions corresponding to the target scene identifier on the task configuration interface;
[0163] A target action determination unit, used to determine at least one target action from all standard actions, each target action corresponding to a parameter to be configured;
[0164] A scene configuration parameter determination unit, configured to determine a scene configuration parameter based on a parameter to be configured corresponding to at least one target action, and obtain a scene parameter value corresponding to the scene configuration parameter;
[0165] The number-making scene task determination unit is used to determine the number-making scene task based on at least one target action and a scene parameter value corresponding to the scene configuration parameter.
[0166] In one embodiment, the test data storage monitoring module 805 includes:
[0167] The current state monitoring unit is used to monitor the scene data pool and obtain the current state of the target test data;
[0168] The data attribute adjustment unit is used to maintain or update the data attribute of the target test data if the current state of the target test data is changed from the available state to the occupied state.
[0169] In one embodiment, the test data storage monitoring module 805 includes:
[0170] The current state monitoring unit is used to monitor the scene data pool and obtain the current state of the target test data;
[0171] A valid test data determination unit, used for determining target test data whose current state is an available state and whose data attribute is a public attribute as valid test data;
[0172] The valid test data determination unit is used to count the number of all valid test data in the scenario data pool and determine the current supply quantity;
[0173] A current demand quantity determination unit, used to obtain the current demand quantity corresponding to the current supply cycle;
[0174] A target additional quantity determination unit is used to determine the target additional quantity according to the current demand quantity and the current supply quantity if the current supply quantity is less than the current demand quantity;
[0175] The test data addition processing unit is used to execute the number-making scenario task, execute the number-making action script corresponding to at least one target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain the target test data matching the target additional quantity.
[0176] In one embodiment, the test data storage monitoring module 805 includes:
[0177] The current state monitoring unit is used to monitor the scene data pool and obtain the current state of the target test data;
[0178] An occupied test data determining unit, used for determining target test data whose current state is an occupied state as occupied test data;
[0179] A scene occupancy quantity determination unit, used to count the quantity of all occupancy test data in the scene data pool, and determine the scene occupancy quantity corresponding to the target scene identifier;
[0180] A scene priority determination unit, used to determine the scene priority corresponding to the target scene identifier according to the scene occupancy quantity corresponding to the target scene identifier;
[0181] The scene interface position adjustment unit is used to adjust the scene interface position corresponding to the target scene identifier in the scene selection interface according to the scene priorities corresponding to all the target scene identifiers.
[0182] For the specific definition of the test data construction processing device, please refer to the definition of the test data construction processing method above, which will not be repeated here. Each module in the above-mentioned test data construction processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules 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 of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0183] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, 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 used or generated during the execution of the test data construction processing method. The network 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 test data construction processing method is implemented.
[0184] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the test data construction processing method in the above embodiment is implemented, for example Figure 2 S201-S205 as shown, or Figures 3 to 7 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the test data construction processing device are realized, for example Figure 8 The functions of the data construction instruction acquisition module 801, number-making scenario task acquisition module 802, target test data acquisition module 803, data attribute determination module 804 and test data storage monitoring module 805 are not described here in detail to avoid repetition.
[0185] 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 test data construction processing method in the above embodiment is implemented, for example Figure 2 S201-S205 as shown, or Figures 3 to 7Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the above-mentioned test data construction processing device are realized, for example Figure 8 The functions of the data construction instruction acquisition module 801, number-making scenario task acquisition module 802, target test data acquisition module 803, data attribute determination module 804 and test data storage monitoring module 805 are not described here in detail to avoid repetition.
[0186] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0187] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0188] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A test data construction and processing method, characterized in that: include: Obtaining a script generation instruction, wherein the script generation instruction includes a target scene identifier and a target action; Acquire a target scene action tree corresponding to the target scene identifier, wherein the target scene action tree is a tree structure formed by sorting all standard actions according to the business logic of the target scene identifier; Determine whether the target action has a dependent action according to the target position of the target action in the target scene action tree; If the target action has a dependent action, determining the to-be-configured parameters corresponding to the target action based on the action output parameters corresponding to the dependent action and the action input parameters corresponding to the target action; If the target action does not have a dependent action, determining the to-be-configured parameters corresponding to the target action based on the action input parameters corresponding to the target action; Generate a number-making action script corresponding to the target action according to the data construction rule corresponding to the target action and the parameters to be configured; Execute a timed construction task corresponding to the target scene identifier, and obtain a data construction instruction, wherein the data construction instruction includes the target scene identifier, an automatic trigger type, and an instruction trigger type; Obtaining a number-making scene task corresponding to the target scene identifier, wherein the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter, including: calling a task generation script that matches the target scene identifier to generate a number-making scene task corresponding to the target scene identifier; or controlling to display a task configuration interface corresponding to the target scene identifier, wherein all standard actions corresponding to the target scene identifier are displayed on the task configuration interface; determining at least one target action from all the standard actions, wherein each target action corresponds to a parameter to be configured; determining a scene configuration parameter based on the parameter to be configured corresponding to at least one target action, and obtaining a scene parameter value corresponding to the scene configuration parameter; determining the number-making scene task based on at least one target action and the scene parameter value corresponding to the scene configuration parameter; Execute the number-making scenario task, execute at least one number-making action script corresponding to the target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data matching the configured number-making quantity; the configured number-making quantity is the number of test data configured by the user to control the number of test data required to be constructed each time the timed construction task is executed; Determining, according to the instruction trigger type, a data attribute corresponding to the target test data, including: determining, according to the automatic trigger type, that the data attribute corresponding to the target test data is a public attribute; The target test data carrying the data attribute is stored in a scene data pool corresponding to the target scene identifier, and the target test data in the scene data pool is monitored.
2. The test data construction processing method according to claim 1, characterized in that: The monitoring and processing of the target test data in the scene data pool includes: Monitor the scene data pool to obtain the current state of the target test data; If the current state of the target test data is changed from the available state to the occupied state, the data attribute of the target test data is maintained or updated.
3. The test data construction processing method according to claim 1, characterized in that: The monitoring and processing of the target test data in the scene data pool includes: Monitor the scene data pool to obtain the current state of the target test data; Determine the target test data whose current state is an available state and whose data attribute is a public attribute as valid test data; Counting the number of all the valid test data in the scenario data pool to determine the current supply quantity; Get the current demand quantity corresponding to the current supply cycle; If the current supply quantity is less than the current demand quantity, determining the target additional quantity according to the current demand quantity and the current supply quantity; Execute the number-making scenario task, execute at least one number-making action script corresponding to the target action according to the scenario parameter value corresponding to the scenario configuration parameter, and obtain target test data matching the target additional quantity.
4. The test data construction processing method according to claim 1, characterized in that: The monitoring and processing of the target test data in the scene data pool includes: Monitor the scene data pool to obtain the current state of the target test data; Determine the target test data whose current state is an occupied state as occupied test data; Counting the number of all the occupancy test data in the scene data pool, and determining the scene occupancy number corresponding to the target scene identifier; Determining the scene priority corresponding to the target scene identifier according to the scene occupancy quantity corresponding to the target scene identifier; According to the scene priorities corresponding to all the target scene identifiers, the scene interface position corresponding to the target scene identifier in the scene selection interface is adjusted.
5. A test data construction processing device, the device being used to implement the test data construction processing method according to any one of claims 1 to 4, characterized in that: The device comprises: A data construction instruction acquisition module, used to acquire a data construction instruction, wherein the data construction instruction includes a target scene identifier and an instruction trigger type; A number-making scene task acquisition module, used to acquire a number-making scene task corresponding to the target scene identifier, wherein the number-making scene task includes at least one target action and a scene parameter value corresponding to a scene configuration parameter; A target test data acquisition module is used to execute the number-making scenario task, execute at least one number-making action script corresponding to the target action according to the scenario parameter value corresponding to the scenario configuration parameter, and acquire target test data; A data attribute determination module, used to determine the data attribute corresponding to the target test data according to the instruction trigger type; The test data storage monitoring module is used to store the target test data carrying the data attributes in the scene data pool corresponding to the target scene identifier, and perform monitoring processing on the target test data in the scene data pool.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the test data construction processing method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the test data construction processing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Test data generation method and device, storage medium and intelligent equipment
CN111221726A
Multiple interface scripting language
US6658646B1
Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
WO2020119434A1
