Data processing method and device, equipment and storage medium

By constructing test data and environment information, it solves the problems of low test case construction efficiency and poor reusability in big data real-time computing, and achieves efficient test case construction and automated testing.

CN119357044APending Publication Date: 2025-01-24BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411170919.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the real-time big data computing scenario, the construction efficiency of test cases is low and cannot be reused, especially when processing multi-field queue data, the data construction and result inspection efficiency are inefficient.

Method used

By building test data based on test case build requests, and building initial test cases based on test data, preset inspection strategies, and expected test results. Then, determine the target environment information and build target test cases to achieve reuse of test cases in different environments.

Benefits of technology

Improve the construction efficiency and test efficiency of test cases, realize the reuse of test cases in different environments, and simplify the data processing and results inspection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357044A_ABST
    Figure CN119357044A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, equipment and a storage medium, and the method comprises the steps: constructing test data based on a test case construction request; according to the test data, a preset check strategy and an expected test result corresponding to the test data, constructing an initial test case; determining target environment information based on a target theme queue corresponding to the initial test case; constructing a target test case based on the initial test case and the target environment information; the target environment information comprises information of a target theme queue with the same function in different environments; therefore, multiplexing of the target test case in different environments can be realized; executing the target test case in the target theme queue to obtain a target test result of the target test case; and based on a preset check strategy, performing comparison check on the target test result and the expected test result to obtain a use case test result. According to the invention, the construction efficiency and the test efficiency of the test case are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, equipment and storage medium. Background Art

[0002] In the related technology, in the big data real-time computing scenario, an application needs to be deployed as a data task to provide services. A task relies on the data input of the upstream message queue, and sends the processed data to the message queue as the data input of the downstream task. Multiple tasks form a complete functional link, and provide the final output data to the downstream system after completing the data processing in sequence. Queue data is mostly defined in a data exchange format, with dozens of fields and hundreds of fields. Which queues each application reads and writes can be specified through configuration parameters. The specific configuration parameters used by an application when it is deployed as a task determine in which environment link the service is finally provided.

[0003] The test data constructed during testing, the inspection rules for the output data, and the expected results constitute a test case. In the big data real-time computing scenario, the execution of a test case includes sending the constructed test data to the queue, obtaining the data after task processing, and judging whether the field value of the data is consistent with the expected result according to the inspection rules specified in the case. If it is consistent, the case passes, otherwise it fails. As mentioned above, there are many fields in the queue data, and the efficiency of data construction and result inspection becomes a key issue that needs to be solved in automated testing. In addition, after constructing the data, the return result of the service is not obtained synchronously, but needs to be obtained by asynchronously reading the queue. The reuse of test cases is another issue that needs to be solved. Summary of the invention

[0004] The present disclosure provides a data processing method, device, equipment and storage medium to at least solve the problem of low test case construction efficiency and non-reusability in related technologies. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:

[0006] Build requests based on test cases and build test data;

[0007] Constructing an initial test case according to the test data, the preset inspection strategy and the expected test results corresponding to the test data;

[0008] Determine target environment information based on the target subject queue corresponding to the initial test case; the target environment information includes information of target subject queues of the same function in different environments;

[0009] Based on the initial test case and the target environment information, construct a target test case;

[0010] Execute the target test case in the target subject queue to obtain a target test result of the target test case;

[0011] Based on the preset inspection strategy, the target test result and the expected test result are compared and inspected to obtain the use case test result.

[0012] In an exemplary embodiment, there are multiple initial test cases, and the method further includes:

[0013] Determine the preset business identifier corresponding to each initial test case;

[0014] Aggregate initial test cases corresponding to the same preset service identifier to form an initial test case group;

[0015] The correspondence between the preset service identifier and the initial test case group is stored in the preset database.

[0016] In an exemplary embodiment, determining the target environment information based on the target subject queue corresponding to the initial test case includes:

[0017] Determine the target service identifier corresponding to the target task according to the target task test request;

[0018] Searching the preset database for an initial test case group that matches the target service identifier to obtain a screening test case group;

[0019] Determine a target subject queue corresponding to each screening test case in the screening test case group;

[0020] Determine the target function identifiers corresponding to each of the multiple target subject queues;

[0021] Aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set;

[0022] According to the target function identifier corresponding to the target subject queue set, target environment information of the screening test case corresponding to the target subject queue set is determined.

[0023] In an exemplary embodiment, determining the target environment information of the screening test case corresponding to the target subject queue set according to the target function identifier corresponding to the target subject queue set includes:

[0024] According to the target function identifier corresponding to the target subject queue set, query the environment information set matching the target function identifier in the environment database to obtain the target environment template corresponding to the target subject queue set;

[0025] The target environment template is determined as the target environment information of the screening test case corresponding to the target subject queue set.

[0026] In an exemplary embodiment, executing the target test case in the target subject queue to obtain a target test result of the target test case includes:

[0027] Obtain a target environment identifier corresponding to the target subject queue;

[0028] Filling the target environment template according to the target environment identifier to obtain application environment information;

[0029] The target environment template in the target test case is replaced with the application environment information; and in the target subject queue, the target test case after the information is replaced is executed to obtain the target test result.

[0030] In an exemplary embodiment, the method further comprises:

[0031] Obtain an application link consisting of multiple associated applications;

[0032] Determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link;

[0033] Build an environment template link based on the target environment template corresponding to each application;

[0034] Constructing an environment variable group according to the environment variables corresponding to each application in the application link;

[0035] An environment link is constructed according to the environment template link and the environment variable group.

[0036] In an exemplary implementation, constructing an environment link according to the environment template link and the environment variable group includes:

[0037] Fill each target environment template in the environment template link according to the environment variable group to build an initial link;

[0038] According to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain, determining the association relationship between the target task identifier and the target environment template;

[0039] According to the association relationship between the target task identifier and the target environment template, the initial link is updated to construct an environment link; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling in each target environment template in the environment template link according to the environment variable group.

[0040] In an exemplary implementation, constructing an environment template link according to a target environment template corresponding to each application includes:

[0041] According to the dependency relationship of data reading and writing in each application, determine the association relationship between the target environment templates corresponding to each application;

[0042] The environment template link is constructed according to the association relationship between each target environment template.

[0043] In an exemplary implementation, constructing an environment template link according to a target environment template corresponding to each application includes:

[0044] Determine the target task identifier corresponding to each target environment template;

[0045] Determine the association relationship between each target environment template according to the association relationship between the target tasks corresponding to each target task identifier;

[0046] The environment template link is constructed according to the association relationship between each target environment template.

[0047] In an exemplary embodiment, the method further comprises:

[0048] Checking the connectivity status of each node in the environment link in turn, and identifying abnormal nodes in the environment link according to the connectivity status of each node;

[0049] Sending warning information to the terminal; the warning information carries the node identifier of the abnormal node.

[0050] In an exemplary implementation, sequentially checking the connectivity status of each node in the environment link includes:

[0051] Build a scheduled inspection task;

[0052] Based on the scheduled inspection task, the connectivity status of each node in the environment link is checked in turn at every preset time interval.

[0053] In an exemplary embodiment, the method further comprises:

[0054] In response to the resource consumption query instruction, query the resource consumption of each node in the environment link;

[0055] Determining the total resource consumption of the environment link according to the resource consumption of each node in the environment link;

[0056] When the total resource consumption is greater than a preset resource threshold, operation and maintenance processing is performed on the environment link.

[0057] In an exemplary embodiment, after constructing the initial test case, the method further includes:

[0058] Constructing a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields;

[0059] Based on the initial test case, filter out a target assertion condition field from the preset assertion condition template;

[0060] Replace the target assertion condition field with the target assertion value to construct the target assertion condition;

[0061] Performing an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result;

[0062] Debugging the initial test case based on the assertion check result to obtain a debugged test case;

[0063] The determining target environment information based on the target subject queue corresponding to the initial test case includes:

[0064] Based on the target subject queue corresponding to the debugged test case, target environment information is determined.

[0065] In an exemplary embodiment, before constructing the test data based on the test case construction request, the method includes:

[0066] Constructing a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields;

[0067] The step of constructing a request based on a test case and constructing test data includes:

[0068] Based on the test case construction request, filter out target fields matching the test case to be constructed from the preset field template;

[0069] The target field is replaced with the test parameter to construct the test data.

[0070] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing device, including:

[0071] The data construction module is configured to execute the test case construction request and construct the test data;

[0072] An initial test case construction module is configured to construct an initial test case according to the test data, a preset inspection strategy and an expected test result corresponding to the test data;

[0073] A target environment determination module is configured to determine target environment information based on a target subject queue corresponding to the initial test case; the target environment information includes information of target subject queues of the same function under different environments;

[0074] A target test case construction module is configured to construct a target test case based on the initial test case and the target environment information;

[0075] A target result determination module is configured to execute the target test case in the target subject queue to obtain a target test result of the target test case;

[0076] The result determination module is configured to perform a comparative check on the target test result and the expected test result based on the preset check strategy to obtain the use case test result.

[0077] In an exemplary embodiment, the initial test case is multiple, and the device further includes:

[0078] A preset service identifier determination module is configured to determine a preset service identifier corresponding to each initial test case;

[0079] The initial test case group determination module is configured to aggregate the initial test cases corresponding to the same preset service identifier to form an initial test case group;

[0080] The storage module is configured to store the corresponding relationship between the preset service identifier and the initial test case group in the preset database.

[0081] In an exemplary embodiment, the target environment determination module includes:

[0082] A target service identifier determining unit is configured to determine a target service identifier corresponding to the target task according to a target task test request;

[0083] A test case group screening unit is configured to perform a search in the preset database for an initial test case group that matches the target service identifier, to obtain a screened test case group;

[0084] A target subject queue determination unit is configured to determine a target subject queue corresponding to each screening test case in the screening test case group;

[0085] A target function identifier determination unit is configured to determine target function identifiers corresponding to each of the plurality of target subject queues;

[0086] The target subject queue set determination unit is configured to aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set;

[0087] The target environment information determination unit is configured to determine the target environment information of the screening test case corresponding to the target subject queue set according to the target function identifier corresponding to the target subject queue set.

[0088] In an exemplary embodiment, the target environment information determination unit includes:

[0089] The template query subunit is configured to query the environment information set matching the target function identifier in the environment database according to the target function identifier corresponding to the target subject queue set, and obtain the target environment template corresponding to the target subject queue set;

[0090] The target environment information determination subunit is configured to determine the target environment template as the target environment information of the screening test case corresponding to the target subject queue set.

[0091] In an exemplary embodiment, the target result determination module includes:

[0092] A target environment identifier acquisition unit is configured to execute acquisition of a target environment identifier corresponding to the target subject queue;

[0093] an application environment information determining unit, configured to fill the target environment template according to the target environment identifier to obtain application environment information;

[0094] The result determination unit is configured to replace the target environment template in the target test case with the application environment information; and execute the target test case after the information is replaced in the target subject queue to obtain the target test result.

[0095] In an exemplary embodiment, the device further comprises:

[0096] An application link acquisition module is configured to execute acquisition of an application link consisting of a plurality of associated applications;

[0097] A target environment template determination module is configured to determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link;

[0098] An environment template link building module is configured to build an environment template link according to a target environment template corresponding to each application;

[0099] An environment variable group building module is configured to build an environment variable group according to the environment variables corresponding to each application in the application link;

[0100] The environment link construction module is configured to construct an environment link according to the environment template link and the environment variable group.

[0101] In an exemplary embodiment, the environment link building module includes:

[0102] An initial link construction unit is configured to fill each target environment template in the environment template link according to the environment variable group to construct an initial link;

[0103] an association relationship determination unit, configured to determine an association relationship between the target task identifier and the target environment template according to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain;

[0104] An updating unit is configured to update the initial link and construct an environment link according to the association relationship between the target task identifier and the target environment template; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling each target environment template in the environment template link according to the environment variable group.

[0105] In an exemplary embodiment, the environment template link construction module includes:

[0106] A relationship building unit is configured to determine the association relationship between the target environment templates corresponding to each application according to the dependency relationship of data reading and writing in each application;

[0107] The template link construction unit is configured to construct the environment template link according to the association relationship between each target environment template.

[0108] In an exemplary embodiment, the environment template link construction module includes:

[0109] A target task identifier determination unit is configured to determine the target task identifier corresponding to each target environment template;

[0110] A relationship determination unit, configured to determine the association relationship between each target environment template according to the association relationship between the target tasks corresponding to each target task identifier;

[0111] The link construction unit is configured to construct the environment template link according to the association relationship between each target environment template.

[0112] In an exemplary embodiment, the device further comprises:

[0113] An abnormality identification module is configured to sequentially check the connectivity status of each node in the environment link, and identify abnormal nodes in the environment link according to the connectivity status of each node;

[0114] The early warning module is configured to execute sending early warning information to the terminal; the early warning information carries the node identifier of the abnormal node.

[0115] In an exemplary embodiment, the abnormality identification module includes:

[0116] A task building unit is configured to execute a building timing check task;

[0117] The inspection unit is configured to execute the scheduled inspection task and sequentially inspect the connectivity status of each node in the environment link at intervals of a preset duration.

[0118] In an exemplary embodiment, the device further comprises:

[0119] a consumption query module, configured to execute in response to a resource consumption query instruction, querying the resource consumption of each node in the environment link;

[0120] A total consumption determination module is configured to determine the total resource consumption of the environment link according to the resource consumption of each node in the environment link;

[0121] The operation and maintenance module is configured to perform operation and maintenance processing on the environment link when the total resource consumption is greater than a preset resource threshold.

[0122] In an exemplary embodiment, the device further comprises:

[0123] An assertion template construction module is configured to execute construction of a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields;

[0124] A field screening module is configured to screen out target assertion condition fields from the preset assertion condition template based on the initial test case;

[0125] An assertion construction module is configured to replace the target assertion condition field with a target assertion value to construct a target assertion condition;

[0126] An assertion result determination module is configured to perform an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result;

[0127] A test case debugging module is configured to debug the initial test case based on the assertion check result to obtain a debugged test case;

[0128] The target environment determination module is further configured to execute a target subject queue corresponding to the debugged test case to determine target environment information.

[0129] In an exemplary embodiment, the device comprises:

[0130] The preset field template construction module is further configured to execute construction of a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields;

[0131] The data construction module includes:

[0132] The target field screening unit is further configured to perform, based on the test case building request, screening out target fields matching the test case to be built from the preset field template;

[0133] The test data construction unit is further configured to replace the target field with a test parameter to construct the test data.

[0134] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0135] processor;

[0136] a memory for storing instructions executable by the processor;

[0137] The processor is configured to execute the instructions to implement the data processing method as described above.

[0138] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the data processing method as described above.

[0139] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the data processing method as described above is implemented.

[0140] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0141] The present disclosure constructs test data based on a test case construction request; constructs an initial test case according to the test data, a preset inspection strategy, and the expected test result corresponding to the test data; determines the target environment information based on the target subject queue corresponding to the initial test case; constructs a target test case based on the initial test case and the target environment information; the target environment information includes information of target subject queues of the same function in different environments; thereby, the reuse of target test cases in different environments can be achieved; executes the target test case in the target subject queue to obtain the target test result of the target test case; compares and checks the target test result and the expected test result based on the preset inspection strategy to obtain the test case test result. The present disclosure realizes the automatic construction of test data and environment information, thereby improving the construction efficiency of test cases, and performs automated testing according to the preset inspection strategy, thereby improving the testing efficiency of test cases.

[0142] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0143] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0144] Figure 1 The invention is an application environment diagram of a data processing method according to an exemplary embodiment.

[0145] Figure 2 The invention is a flowchart of a data processing method according to an exemplary embodiment.

[0146] Figure 3 It is a structural diagram of a data processing platform according to an exemplary embodiment.

[0147] Figure 4 The present invention is a flowchart of interaction between a data processing platform and a management platform according to an exemplary embodiment.

[0148] Figure 5 The figure is a schematic diagram of the structure of a management platform according to an exemplary embodiment.

[0149] Figure 6 It is a block diagram of a data processing device according to an exemplary embodiment.

[0150] Figure 7 It is a block diagram of a server according to an exemplary embodiment.

[0151] Figure 8 It is a block diagram of an electronic device for data processing according to an exemplary embodiment. DETAILED DESCRIPTION

[0152] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0153] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0155] See also Figure 1 , which is a diagram of an application environment of a data processing method according to an exemplary embodiment. The application environment may include a server 01 and a client 02.

[0156] Specifically, in the embodiments of this specification, the server 01 may include an independently operated server, or a distributed server, or a server cluster composed of multiple servers, and may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 01 may include a network communication unit, a processor, a memory, and the like. Specifically, the server 01 can be used to build target test cases and perform automated testing; and send test case test results to the client 02.

[0157] Specifically, in the embodiments of this specification, the client 02 may include physical devices such as smart phones, desktop computers, tablet computers, laptop computers, digital assistants, smart wearable devices, and vehicle-mounted terminals, and may also include software running in physical devices, such as web pages provided by some service providers to users, or applications provided by these service providers to users. Specifically, the client 02 may be used to display the test results of the use case.

[0158] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment. Figure 2 As shown, this method can be applied to Figure 1 The server 01 shown includes the following steps.

[0159] In step S201, test data is constructed based on a test case construction request.

[0160] In the disclosed embodiment, a test user of a terminal may send a test case construction request to a server, and the server automatically constructs test data according to the request.

[0161] In step S203, an initial test case is constructed according to the test data, a preset inspection strategy and the expected test results corresponding to the test data.

[0162] In the disclosed embodiment, the preset inspection strategy corresponding to the test data and the expected test results corresponding to the test data can be determined; and based on the test data, the preset inspection strategy and the expected test results, an initial test case can be constructed to facilitate the use case inspection during the use case execution process.

[0163] In step S205, target environment information is determined based on the target subject queue corresponding to the initial test case; the target environment information includes information of the target subject queue of the same function in different environments.

[0164] In the disclosed embodiment, the environment information of the target subject queue of the same function in different environments can be pre-stored in the same logical group, so as to facilitate the rapid construction of the environment information corresponding to the same subject in different environments.

[0165] In step S207, a target test case is constructed based on the initial test case and the target environment information.

[0166] In the disclosed embodiment, after constructing an initial test case and determining the target environment information corresponding to the case, a target test case can be constructed quickly and automatically.

[0167] In step S209, the target test case is executed in the target subject queue to obtain a target test result of the target test case.

[0168] In step S2011, based on the preset inspection strategy, the target test result and the expected test result are compared and inspected to obtain the use case test result.

[0169] In an embodiment of the present disclosure, after automatically constructing a target test case, the target test case can be executed in the target subject queue to obtain a target test result of the target test case; and according to a preset inspection strategy, a comparison check is performed on the target test result and the expected test result to obtain a case test result; wherein the case test result includes a normal test result and an abnormal test result; if an abnormal test result is obtained, an abnormal prompt information can be sent to the terminal so that the test user can adjust the case in time.

[0170] The disclosed embodiment constructs test data based on a test case construction request; constructs an initial test case according to the test data, a preset inspection strategy, and the expected test result corresponding to the test data; determines the target environment information based on the target subject queue corresponding to the initial test case; constructs a target test case based on the initial test case and the target environment information; the target environment information includes information about target subject queues of the same function in different environments; thereby, the reuse of target test cases in different environments can be achieved; executes the target test case in the target subject queue to obtain the target test result of the target test case; compares and checks the target test result and the expected test result based on the preset inspection strategy to obtain the test case test result. The disclosed embodiment realizes the automatic construction of test data and environment information, thereby improving the construction efficiency of test cases, and performs automated testing according to the preset inspection strategy, thereby improving the testing efficiency of test cases.

[0171] In the embodiment of the present disclosure, before constructing the test data based on the test case construction request, the method includes:

[0172] Constructing a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields;

[0173] The step of constructing a request based on a test case and constructing test data includes:

[0174] Based on the test case construction request, filter out target fields matching the test case to be constructed from the preset field template;

[0175] The target field is replaced with the test parameter to construct the test data.

[0176] In the disclosed embodiments, a preset field template corresponding to preset test data can be pre-constructed; the preset test data can be test data in various types of preset test cases; the preset field template can include multiple preset fields of different types, and the value corresponding to each preset field can be set to empty; the preset field template can be applicable to the construction of test data in different test cases, and can be used to quickly construct test data; that is, it supports parameterization of test data fields, that is, setting the fields to parameterized values ​​and providing a method for mapping parameterized fields to specific values. Parameterize field XX, set the parameter processing method to automatically generate a string of length 10, and then automatically generate a string of the specified length as the value of XX when the case is executed. Parameter processing methods for various data types such as strings, floating point numbers, and integers can be supported.

[0177] In some embodiments, it is also possible to construct preset field templates corresponding to each business type identifier based on the business type identifiers corresponding to multiple preset test cases; during the application process, a request can be constructed based on the test case to obtain the corresponding target business category identifier, and a field template matching the target business category identifier can be queried to obtain the target field, and then the target field can be replaced with the test parameters to construct the test data, thereby realizing the rapid construction of test data.

[0178] In the disclosed embodiment, by pre-building a preset field module corresponding to the test data, the test data can be quickly and automatically built according to the field template.

[0179] In the embodiment of the present disclosure, after constructing the initial test case, the method further includes:

[0180] Constructing a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields;

[0181] Based on the initial test case, filter out a target assertion condition field from the preset assertion condition template;

[0182] Replace the target assertion condition field with the target assertion value to construct the target assertion condition;

[0183] Performing an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result;

[0184] Debugging the initial test case based on the assertion check result to obtain a debugged test case;

[0185] The determining target environment information based on the target subject queue corresponding to the initial test case includes:

[0186] Based on the target subject queue corresponding to the debugged test case, target environment information is determined.

[0187] In the disclosed embodiment, after the initial test case is constructed, the case can be debugged through assertion conditions; during the case debugging process, the target assertion condition field in the template can be replaced with the target assertion value according to the preset assertion condition template, thereby automatically constructing the target assertion condition; then, according to the target assertion condition, an assertion check is performed on the result data of the initial test case to obtain the assertion check result; then, according to the assertion check result, the initial test case is debugged until the assertion check result meets the expected result, thereby obtaining a debugged test case; and then, according to the debugged initial test case, the target test case is further constructed.

[0188] In the disclosed embodiment, by constructing a preset assertion condition template, the target assertion condition can be quickly constructed, thereby improving the construction efficiency of the assertion condition. By debugging the initial test case and then further constructing the target test case, the construction accuracy of the target test case can be improved.

[0189] In the embodiment of the present disclosure, there are multiple initial test cases, and the method further includes:

[0190] Determine the preset business identifier corresponding to each initial test case;

[0191] Aggregate initial test cases corresponding to the same preset service identifier to form an initial test case group;

[0192] The correspondence between the preset service identifier and the initial test case group is stored in the preset database.

[0193] In the disclosed embodiment, there may be multiple initial test cases, and the multiple initial test cases may be grouped according to the business identifiers corresponding to the multiple initial test cases, and one or more initial test cases corresponding to the same business identifier may be grouped together, and the corresponding relationship between the multiple preset business identifiers and the multiple initial test case groups may be stored in a preset database; wherein the preset business identifier and the initial test case group may be in a one-to-one relationship. The test cases of a certain service or module may be arranged into the same group, and when creating an automated test task, the group name may be used to circle all the test cases under the group.

[0194] In the disclosed embodiment, after constructing multiple initial test cases, the multiple initial test cases can be grouped according to the business identifier corresponding to each initial test case, and when creating a test task, the test cases in the same group can be quickly executed in batches.

[0195] In the embodiment of the present disclosure, determining the target environment information based on the target subject queue corresponding to the initial test case includes:

[0196] Determine the target service identifier corresponding to the target task according to the target task test request;

[0197] Searching the preset database for an initial test case group that matches the target service identifier to obtain a screening test case group;

[0198] Determine a target subject queue corresponding to each screening test case in the screening test case group;

[0199] Determine the target function identifiers corresponding to each of the multiple target subject queues;

[0200] Aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set;

[0201] According to the target function identifier corresponding to the target subject queue set, target environment information of the screening test case corresponding to the target subject queue set is determined.

[0202] In the disclosed embodiment, the test user of the terminal can send a target task test request to the server. The server determines the target business identifier corresponding to the target task based on the received target task test request, and then queries the initial test case group that matches the target business identifier in the preset database to obtain a screening test case group. In this embodiment, multiple different types of subject queues can be grouped, and subject queues with the same function and different environments can be pre-grouped into the same group to construct a corresponding subject queue group, and a correspondence between the function identifier and the subject queue group is constructed, so as to facilitate the construction of test cases that can be reused in different environments. This embodiment further determines the target subject queue corresponding to each screening test case in the screening test case group; then determines the target function identifier corresponding to each of the multiple target subject queues; and aggregates the target subject queues corresponding to the same target function identifier to form a target subject queue set; thereby determining the target environment information of the screening test case corresponding to the target subject queue set.

[0203] In the disclosed embodiment, the screening test case group can be quickly determined according to the target business identifier, and the target environment information of the screening test case corresponding to the target subject queue set can be quickly queried.

[0204] In the embodiment of the present disclosure, determining the target environment information of the screening test case corresponding to the target subject queue set according to the target function identifier corresponding to the target subject queue set includes:

[0205] According to the target function identifier corresponding to the target subject queue set, query the environment information set matching the target function identifier in the environment database to obtain the target environment template corresponding to the target subject queue set;

[0206] The target environment template is determined as the target environment information of the screening test case corresponding to the target subject queue set.

[0207] The constructing a target test case based on the initial test case and the target environment information includes:

[0208] The target test case is constructed based on the initial test case and the target environment template.

[0209] In the disclosed embodiment, multiple different types of subject queues can be grouped, and subject queues of the same function and different environments can be pre-grouped into the same group, thereby constructing a corresponding subject queue group, and constructing a correspondence between a function identifier and a subject queue group, and forming an environment information template including multiple environments according to different environment information in the subject queue group; and further constructing a correspondence between a function identifier and an environment information template, thereby constructing an environment database according to the correspondence between a function identifier and an environment information template, so as to facilitate further construction of test cases that can be reused in different environments. During the application process, the environment information set matching the target function identifier is queried in the environment database to obtain the target environment template corresponding to the target subject queue set; the target environment template is determined as the target environment information of the screening test case corresponding to the target subject queue set, thereby constructing the target test case according to the initial test case and the target environment template; since the test case includes multiple environment templates corresponding to the environment information, the test case can be reused in the subject queues of the same function and different environments, and during the execution of the target test case, the environment template is selected to fill in the corresponding environment information, thereby executing the target test case.

[0210] In the disclosed embodiment, an environment information set matching the target function identifier can be queried in the environment database to obtain a target environment template corresponding to the target subject queue set, thereby constructing a target test case that can be reused in different environments, thereby achieving the reuse of test cases and improving the efficiency of test case use.

[0211] In the embodiment of the present disclosure, executing the target test case in the target subject queue to obtain the target test result of the target test case includes:

[0212] Obtain a target environment identifier corresponding to the target subject queue;

[0213] Filling the target environment template according to the target environment identifier to obtain application environment information;

[0214] The target environment template in the target test case is replaced with the application environment information; and in the target subject queue, the target test case after the information is replaced is executed to obtain the target test result.

[0215] In the embodiment of the present disclosure, during the execution of the use case, the target environment identifier corresponding to the target subject queue can be obtained, and the target environment template can be filled with the target environment identifier to obtain application environment information; the target environment template in the target test case is replaced with the application environment information; thereby, the application environment information in the use case can be quickly generated; and then the target test case after the information is replaced is executed to obtain the target test result.

[0216] In the disclosed embodiments, application environment information is quickly and automatically constructed according to a target environment template, thereby realizing rapid execution of automated testing of target test cases and rapidly obtaining target test results.

[0217] In an exemplary embodiment, a data processing method is provided, comprising:

[0218] Constructing a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields;

[0219] Based on the test case construction request, filter out target fields matching the test case to be constructed from the preset field template;

[0220] Replace the target field with the test parameter to construct test data;

[0221] Constructing an initial test case according to the test data, the preset inspection strategy and the expected test results corresponding to the test data;

[0222] Constructing a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields;

[0223] Based on the initial test case, filter out a target assertion condition field from the preset assertion condition template;

[0224] Replace the target assertion condition field with the target assertion value to construct the target assertion condition;

[0225] Performing an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result;

[0226] Debugging the initial test case based on the assertion check result to obtain a debugged test case;

[0227] Determine the preset business identifier corresponding to each initial test case;

[0228] Aggregate initial test cases corresponding to the same preset service identifier to form an initial test case group;

[0229] Storing the correspondence between the preset service identifier and the initial test case group in the preset database;

[0230] Determine the target service identifier corresponding to the target task according to the target task test request;

[0231] Searching the preset database for an initial test case group that matches the target service identifier to obtain a screening test case group;

[0232] Determine a target subject queue corresponding to each screening test case in the screening test case group;

[0233] Determine the target function identifiers corresponding to each of the multiple target subject queues;

[0234] Aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set;

[0235] According to the target function identifier corresponding to the target subject queue set, query the environment information set matching the target function identifier in the environment database to obtain the target environment template corresponding to the target subject queue set;

[0236] The target environment template is determined as the target environment information of the screening test case corresponding to the target subject queue set.

[0237] Based on the initial test case and the target environment information, construct a target test case;

[0238] Obtain a target environment identifier corresponding to the target subject queue;

[0239] Filling the target environment template according to the target environment identifier to obtain application environment information;

[0240] The target environment template in the target test case is replaced with the application environment information; and in the target subject queue, the target test case after the information is replaced is executed to obtain the target test result;

[0241] Based on the preset inspection strategy, the target test result and the expected test result are compared and inspected to obtain the use case test result.

[0242] In an exemplary embodiment, if Figure 3 As shown, Figure 3 It is a structural diagram of a data processing platform, which includes a test case management module, an environment identification module, an automatic execution module and an external interface;

[0243] Among them, the test case management module can be used for:

[0244] (1) Create a new test case

[0245] Create new use cases using manual entry, and support the arrangement of use case execution steps, that is, specify the order of sending test data to different queues. It also supports parameterization of test data fields, that is, setting the field to a parameterized value and providing a method to map the parameterized field to a specific value. Field XX can be parameterized, and the parameter processing method is set to automatically generate a string of length 10, so that a string of the specified length is automatically generated as the value of field XX when the use case is executed. It can support parameter processing methods for multiple data types such as strings, floating point numbers, integers, etc., and parameterized automatic replacement can also be used in assertion conditions. This improves the efficiency of data construction and assertion construction; the recorded data can also be used as test data, so there is no need to construct data when creating a new test case, further improving data processing efficiency.

[0246] (2) Debugging test cases

[0247] After creating a new use case, you can debug it. During debugging, you can complete the construction and sending of test data, real-time query of result data, and assertion check of result data, so as to efficiently check the correctness of the use case.

[0248] (3) Add group

[0249] The test cases of a service or module can be organized into the same group. When creating an automated test task, you can use the group name to circle all the test cases under the group and quickly execute each test case in batches.

[0250] Exemplarily, the environment identification module is used to put queues with the same function but different environments into the same logical group, and use the logical group name instead of the queue name when creating a new use case. During actual execution, the logical group name is dynamically replaced with the queue name in the environment according to the test environment to achieve automatic environment identification. For example, queues A1 and A2 belong to environment 1 and environment 2 respectively and have the same position and function in the link, so they are placed in logical group A. When creating a new use case, A is used in all places where these two queues are used. When the use case is executed, if environment 1 is selected, A in the use case will be dynamically replaced with A1.

[0251] Exemplarily, the automated execution module is used to automatically construct test data, automatically send data, automatically read processing results, automatically perform assertion checks and generate test reports based on the above-mentioned parameterization and environment identification. It can also be used to push exceptions to users through the exception push module after detecting an exception, and can automatically troubleshoot problems corresponding to the exception through the problem troubleshooting module.

[0252] Exemplarily, the external interface module is used to provide external interfaces, and supports the creation of automated test tasks, test execution, and test result query through these interfaces. Through these external interfaces, the interaction between the data processing platform and other external platforms can be easily realized.

[0253] In an exemplary embodiment, a test case data processing method includes: test case execution step 1: automatically generate test data according to parameter rules: fill in the field default value or specified value in the non-parameter rule. Find the specific queue name corresponding to the queue logic group in the environment parameter according to the selected execution environment, and send data to the queue; test case execution step 2: find the specific queue according to the execution environment and environment parameter configuration; consume queue data in real time, asynchronously obtain data, and automatically assert after obtaining data; after obtaining the upstream queue data, quickly complete the processing, send the processing results to the downstream queue, and perform automated testing in the test environment.

[0254] In an exemplary embodiment, if Figure 4 As shown, Figure 4 The interactive flow chart of a data processing platform and a management platform includes: after the management platform develops a test case and performs an initial test, the access automation test is triggered, and the test case set corresponding to the test task is executed on the data processing platform; and the test result is checked for abnormalities; if there is an abnormality, the test report is pushed to the test user, and the test case is blocked from entering the next process; if there is no abnormality, the test case is allowed to enter the next process.

[0255] The test environment and parameterized fields in the data of this embodiment can be automatically replaced, which improves the efficiency of data construction; after automatically reading the queue data, the data is automatically checked according to the assertion, which significantly improves the inspection efficiency; and there is rich external interface support, which is convenient for expansion in the existing R&D process.

[0256] In the embodiment of the present disclosure, the method further includes:

[0257] Obtain an application link consisting of multiple associated applications;

[0258] Determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link;

[0259] Build an environment template link based on the target environment template corresponding to each application;

[0260] Constructing an environment variable group according to the environment variables corresponding to each application in the application link;

[0261] An environment link is constructed according to the environment template link and the environment variable group.

[0262] In the disclosed embodiment, multiple applications with association relationships can be obtained, and an application link can be constructed based on the association relationships between the multiple applications; then, the target environment template corresponding to each application can be determined based on the target task identifier corresponding to each application in the application link; an environment template link can be constructed based on the target environment template corresponding to each application; thus, the corresponding template in the environment template link can be filled according to each environment variable in the environment variable group to construct an environment link; the configuration parameters and deployment parameters of the middleware used in the application can also be templated, and when creating the task of the application, the template can be dynamically rendered as the actual configuration and deployment parameters and initialized for deployment. Multiple applications in a functional link can be managed together, tasks can be created in batches, and one-click creation of an environment link can be achieved.

[0263] In the disclosed embodiment, environment links corresponding to multiple applications can be constructed, and one-click creation of environment links can be achieved, and the management efficiency of environment information of each application in the environment link can be improved.

[0264] In the embodiment of the present disclosure, obtaining an application link consisting of multiple applications having an associated relationship may include:

[0265] According to the dependency relationship of data reading and writing in each application, multiple applications with association relationship are determined; according to the association relationship between multiple applications, the application link is constructed. The system determines the upstream and downstream dependencies of the tasks based on the reading and writing of the middleware or data source to confirm an environment link topology. For example, applications A, B, C, and D can form a link, so an environment template can be maintained, which contains the configuration of these applications. When creating an environment link, you only need to select the environment variable group used by all applications in the environment link to realize the batch creation and deployment of multiple tasks in the environment link and complete the rapid construction of the environment.

[0266] In the embodiment of the present disclosure, the step of constructing an environment link according to the environment template link and the environment variable group includes:

[0267] Fill each target environment template in the environment template link according to the environment variable group to build an initial link;

[0268] According to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain, determining the association relationship between the target task identifier and the target environment template;

[0269] According to the association relationship between the target task identifier and the target environment template, the initial link is updated to construct an environment link; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling in each target environment template in the environment template link according to the environment variable group.

[0270] In the disclosed embodiment, each target environment template in the environment template link can be filled according to the environment variable group to obtain the target environment information corresponding to each application; then, the node in the environment link is determined according to the target task identifier, and the target environment information corresponding to the target task identifier is stored in the node, and the connection line between the nodes is determined according to the association relationship between the target tasks corresponding to the target task identifier, so as to construct the environment link according to the nodes and the connection lines; in this embodiment, different environment links can be constructed for different tasks or modules, and for tasks or modules with common applications, the environment links corresponding to the two can include common nodes.

[0271] In the disclosed embodiment, each target environment template in the environment template link can be filled according to the environment variable group to construct an initial link; then, based on the target task identifier corresponding to each application in the application link and the target environment template corresponding to each application in the application link, the association relationship between the target task identifier and the target environment template is determined; thereby realizing fast and accurate construction of the environment link.

[0272] In the embodiment of the present disclosure, the construction of an environment template link according to the target environment template corresponding to each application includes:

[0273] According to the dependency relationship of data reading and writing in each application, determine the association relationship between the target environment templates corresponding to each application;

[0274] The environment template link is constructed according to the association relationship between each target environment template.

[0275] In the disclosed embodiment, the upstream and downstream dependencies of the tasks can be determined based on the reading and writing of the middleware or data source to confirm an environment link topology. According to the dependency of data reading and writing in each application, the association relationship between the target environment templates corresponding to each application is determined to construct the environment template link.

[0276] In the disclosed embodiments, an environment template link can be constructed quickly and accurately based on the dependency relationship of data reading and writing in various applications.

[0277] In the embodiment of the present disclosure, the construction of the environment template link according to the target environment template corresponding to each application includes:

[0278] Determine the target task identifier corresponding to each target environment template;

[0279] Determine the association relationship between each target environment template according to the association relationship between the target tasks corresponding to each target task identifier;

[0280] The environment template link is constructed according to the association relationship between each target environment template.

[0281] In the disclosed embodiment, the embodiment can generate an environment topology according to the tasks specified when creating the environment or the environment template used; and at the same time support batch deployment, operation and maintenance, and resource configuration of multiple tasks in the environment.

[0282] In the disclosed embodiment, an environment template link can be constructed quickly and accurately based on the target task identifier corresponding to each target environment template and the association relationship between the target tasks corresponding to each target task identifier.

[0283] In the embodiment of the present disclosure, the method further includes:

[0284] Checking the connectivity status of each node in the environment link in turn, and identifying abnormal nodes in the environment link according to the connectivity status of each node;

[0285] Sending warning information to the terminal; the warning information carries the node identifier of the abnormal node.

[0286] In the disclosed embodiment, after the environment link is constructed, the connectivity status of each node in the environment link can be checked in turn, and the abnormal nodes in the environment link can be identified according to the connectivity status of each node; if there is an abnormal node, an early warning message is generated according to the node identifier of the abnormal node, and the early warning message is sent to the terminal corresponding to the test user; so as to provide an early warning to the test user. This example realizes the availability detection of the overall environment link and timely perception of link problems. It provides link problem troubleshooting capability, and there is no need to manually troubleshoot and locate link problem nodes in a single task; in an exemplary embodiment, the manual method and the method of this embodiment are respectively used to troubleshoot link problems, which greatly reduces the time for single problem troubleshooting.

[0287] In the disclosed embodiment, abnormal nodes can be quickly identified through environmental links, and test users can be warned, thereby improving environmental troubleshooting efficiency.

[0288] In the embodiment of the present disclosure, sequentially checking the connectivity status of each node in the environment link includes:

[0289] Build a scheduled inspection task;

[0290] Based on the scheduled inspection task, the connectivity status of each node in the environment link is checked in turn at every preset time interval.

[0291] In the disclosed embodiment, a timed inspection task can be constructed for the environment link; and according to the timed inspection task, the connectivity status of each node in the environment link is sequentially checked at intervals of a preset duration, thereby realizing a periodic inspection of the environment link. When an abnormal node is detected, the abnormal node can be repaired in time, thereby improving the operating efficiency in the environment link.

[0292] In the disclosed embodiment, a scheduled inspection task can be constructed to regularly inspect the connectivity status of each node in the environment link, thereby improving the operation and maintenance efficiency of the environment link and reducing the failure rate of the environment link.

[0293] In the embodiment of the present disclosure, the method further includes:

[0294] In response to the resource consumption query instruction, query the resource consumption of each node in the environment link;

[0295] Determining the total resource consumption of the environment link according to the resource consumption of each node in the environment link;

[0296] When the total resource consumption is greater than a preset resource threshold, operation and maintenance processing is performed on the environment link.

[0297] In the disclosed embodiment, a resource consumption query instruction sent by a terminal can be received to query the resource consumption of each node in the environmental link; and based on the resource consumption of each node in the environmental link, the total resource consumption of the environmental link can be determined, thereby judging whether the environmental link needs to be operated and maintained based on the total resource consumption.

[0298] In the disclosed embodiment, the total resource consumption of the environment link can be queried in real time, and then the operation and maintenance timing of the environment link can be quickly and accurately determined according to the total resource consumption.

[0299] In an exemplary embodiment, a method for constructing an environment link is provided, comprising:

[0300] Obtain an application link consisting of multiple associated applications;

[0301] Determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link;

[0302] According to the dependency relationship between data reading and writing in each application, determine the association relationship between the target environment templates corresponding to each application; according to the association relationship between the target environment templates, build the environment template link; or determine the target task identifier corresponding to each target environment template; according to the association relationship between the target tasks corresponding to the target task identifiers, determine the association relationship between the target environment templates; according to the association relationship between the target environment templates, build the environment template link;

[0303] Constructing an environment variable group according to the environment variables corresponding to each application in the application link;

[0304] Fill each target environment template in the environment template link according to the environment variable group to build an initial link;

[0305] According to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain, determining the association relationship between the target task identifier and the target environment template;

[0306] According to the association relationship between the target task identifier and the target environment template, the initial link is updated to construct an environment link; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling in each target environment template in the environment template link according to the environment variable group.

[0307] Build a scheduled inspection task;

[0308] Based on the scheduled inspection task, the connectivity status of each node in the environment link is sequentially checked at intervals of a preset duration; and abnormal nodes in the environment link are identified according to the connectivity status of each node;

[0309] Sending a warning message to the terminal; the warning message carries the node identifier of the abnormal node.

[0310] In response to the resource consumption query instruction, query the resource consumption of each node in the environment link;

[0311] Determining the total resource consumption of the environment link according to the resource consumption of each node in the environment link;

[0312] When the total resource consumption is greater than a preset resource threshold, operation and maintenance processing is performed on the environment link.

[0313] In an exemplary embodiment, if Figure 5 As shown, Figure 5It is a structural diagram of a management platform, including an environment management module, a task management module, an application management module, an environment diagnosis module, an environment template management module and an environment variable group management module.

[0314] The application management module and the environment variable group management module: when managing an application in the big data real-time computing test environment management platform, the data source or cache information read and written by the application and the task parameters (CPU core number, memory, restart strategy, etc.) that need to be configured when deploying a task of the application are managed in the form of templates. A template contains parameterized information to be confirmed. The specific values ​​of the parameters in the template are maintained in the environment variable group management module.

[0315] Task management module: The system implements the template rendering function. When creating a new task, you only need to configure or select an environment variable group. The system dynamically replaces the value in the environment variable group with the application template, and uses this instantiated template to complete the task creation and deploy the task. The environment variable group provides flexible copying, editing and other operations, which can support the rapid creation of tasks with different configurations;

[0316] Environment template function: Similar to application template, it maintains environment configuration in the form of template. For example, applications A, B, C, and D can form a link, so you can maintain an environment template that contains the configuration of these applications. When creating an environment link, you only need to select the environment variable group used by all applications in the environment link to achieve batch creation and deployment of multiple tasks in the environment link, and complete the rapid construction of the environment.

[0317] Environment management module: The system determines the upstream and downstream dependencies of tasks based on the read and write of middleware or data sources to confirm an environment link topology. It can also generate environment topology according to the tasks specified when creating the environment or the environment template used. It also supports batch deployment, operation and maintenance, and resource configuration of multiple tasks in the environment.

[0318] Environmental diagnosis module: The system constructs data in the upstream data source and checks whether the downstream data is written normally to determine whether the link nodes are connected. In an exemplary embodiment, the link nodes can be checked in sequence based on the environmental link topology capability, and the environmental link availability can be finally determined. Different strategies can be used to perform diagnosis: for example, using a scheduled task to routinely detect link availability, and timely alarming and indicating abnormal link nodes when abnormal links are found; or automatically triggering link diagnosis after the environment is deployed.

[0319] This embodiment realizes the operation and maintenance of the overall link of big data real-time computing: by establishing an environmental link perspective, all task nodes in the link and the boundaries of different environments can be displayed, and when it is necessary to determine the availability of functional links, resource consumption, and environmental isolation, etc., it can be checked and obtained immediately. At the same time, tasks can be created, deployed, and operated and maintained in batches according to links. Improve the efficiency of environmental management, use, and operation and maintenance. The overall environmental link availability detection is realized, and link problems are perceived in a timely manner. It provides link problem troubleshooting capabilities, and there is no need to manually troubleshoot and locate link problem nodes with a single task, which improves the efficiency of environmental troubleshooting.

[0320] Figure 6 is a block diagram of a data processing device according to an exemplary embodiment. Figure 6 , the device comprises:

[0321] The data construction module 610 is configured to execute the construction request based on the test case and construct the test data;

[0322] An initial test case construction module 620 is configured to construct an initial test case according to the test data, a preset inspection strategy and an expected test result corresponding to the test data;

[0323] The target environment determination module 630 is configured to determine target environment information based on the target subject queue corresponding to the initial test case; the target environment information includes information of target subject queues of the same function under different environments;

[0324] A target test case construction module 640 is configured to construct a target test case based on the initial test case and the target environment information;

[0325] A target result determination module 650 is configured to execute the target test case in the target subject queue to obtain a target test result of the target test case;

[0326] The result determination module 660 is configured to perform a comparative check on the target test result and the expected test result based on the preset check strategy to obtain a use case test result.

[0327] In some embodiments, the initial test case is multiple, and the device further includes:

[0328] A preset service identifier determination module is configured to determine a preset service identifier corresponding to each initial test case;

[0329] The initial test case group determination module is configured to aggregate the initial test cases corresponding to the same preset service identifier to form an initial test case group;

[0330] The storage module is configured to store the corresponding relationship between the preset service identifier and the initial test case group in the preset database.

[0331] In some embodiments, the target environment determination module includes:

[0332] A target service identifier determining unit is configured to determine a target service identifier corresponding to the target task according to a target task test request;

[0333] A test case group screening unit is configured to perform a search in the preset database for an initial test case group that matches the target service identifier, to obtain a screened test case group;

[0334] A target subject queue determination unit is configured to determine a target subject queue corresponding to each screening test case in the screening test case group;

[0335] A target function identifier determination unit is configured to determine target function identifiers corresponding to each of the plurality of target subject queues;

[0336] The target subject queue set determination unit is configured to aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set;

[0337] The target environment information determination unit is configured to determine the target environment information of the screening test case corresponding to the target subject queue set according to the target function identifier corresponding to the target subject queue set.

[0338] In some embodiments, the target environment information determination unit includes:

[0339] The template query subunit is configured to query the environment information set matching the target function identifier in the environment database according to the target function identifier corresponding to the target subject queue set, and obtain the target environment template corresponding to the target subject queue set;

[0340] The target environment information determination subunit is configured to determine the target environment template as the target environment information of the screening test case corresponding to the target subject queue set.

[0341] In some embodiments, the target outcome determination module includes:

[0342] A target environment identifier acquisition unit is configured to execute acquisition of a target environment identifier corresponding to the target subject queue;

[0343] an application environment information determining unit, configured to fill the target environment template according to the target environment identifier to obtain application environment information;

[0344] The result determination unit is configured to replace the target environment template in the target test case with the application environment information; and execute the target test case after the information is replaced in the target subject queue to obtain the target test result.

[0345] In some embodiments, the apparatus further comprises:

[0346] An application link acquisition module is configured to execute acquisition of an application link consisting of a plurality of associated applications;

[0347] A target environment template determination module is configured to determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link;

[0348] An environment template link building module is configured to build an environment template link according to a target environment template corresponding to each application;

[0349] An environment variable group building module is configured to build an environment variable group according to the environment variables corresponding to each application in the application link;

[0350] The environment link construction module is configured to construct an environment link according to the environment template link and the environment variable group.

[0351] In some embodiments, the environment link building module includes:

[0352] An initial link construction unit is configured to fill each target environment template in the environment template link according to the environment variable group to construct an initial link;

[0353] an association relationship determination unit, configured to determine an association relationship between the target task identifier and the target environment template according to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain;

[0354] An updating unit is configured to update the initial link and construct an environment link according to the association relationship between the target task identifier and the target environment template; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling each target environment template in the environment template link according to the environment variable group.

[0355] In some embodiments, the environment template link building module includes:

[0356] A relationship building unit is configured to determine the association relationship between the target environment templates corresponding to each application according to the dependency relationship of data reading and writing in each application;

[0357] The template link construction unit is configured to construct the environment template link according to the association relationship between each target environment template.

[0358] In some embodiments, the environment template link building module includes:

[0359] A target task identifier determination unit is configured to determine the target task identifier corresponding to each target environment template;

[0360] A relationship determination unit, configured to determine the association relationship between each target environment template according to the association relationship between the target tasks corresponding to each target task identifier;

[0361] The link construction unit is configured to construct the environment template link according to the association relationship between each target environment template.

[0362] In some embodiments, the apparatus further comprises:

[0363] An abnormality identification module is configured to sequentially check the connectivity status of each node in the environment link, and identify abnormal nodes in the environment link according to the connectivity status of each node;

[0364] The early warning module is configured to execute sending early warning information to the terminal; the early warning information carries the node identifier of the abnormal node.

[0365] In some embodiments, the anomaly identification module includes:

[0366] A task building unit is configured to execute a building timing check task;

[0367] The inspection unit is configured to execute the scheduled inspection task and sequentially inspect the connectivity status of each node in the environment link at intervals of a preset duration.

[0368] In some embodiments, the apparatus further comprises:

[0369] a consumption query module, configured to execute in response to a resource consumption query instruction, querying the resource consumption of each node in the environment link;

[0370] A total consumption determination module is configured to determine the total resource consumption of the environment link according to the resource consumption of each node in the environment link;

[0371] The operation and maintenance module is configured to perform operation and maintenance processing on the environment link when the total resource consumption is greater than a preset resource threshold.

[0372] In some embodiments, the apparatus further comprises:

[0373] An assertion template construction module is configured to execute construction of a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields;

[0374] A field screening module is configured to screen out target assertion condition fields from the preset assertion condition template based on the initial test case;

[0375] An assertion construction module is configured to replace the target assertion condition field with a target assertion value to construct a target assertion condition;

[0376] An assertion result determination module is configured to perform an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result;

[0377] A test case debugging module is configured to debug the initial test case based on the assertion check result to obtain a debugged test case;

[0378] The target environment determination module is further configured to execute a target subject queue corresponding to the debugged test case to determine target environment information.

[0379] In some embodiments, the apparatus comprises:

[0380] The preset field template construction module is further configured to execute construction of a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields;

[0381] The data construction module includes:

[0382] The target field screening unit is further configured to perform, based on the test case building request, screening out target fields matching the test case to be built from the preset field template;

[0383] The test data construction unit is further configured to replace the target field with a test parameter to construct the test data.

[0384] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0385] In an exemplary embodiment, an electronic device is also provided, including a processor; a memory for storing instructions executable by the processor; wherein, when the processor is configured to execute the instructions stored in the memory, the data processing method provided in any of the above embodiments is implemented.

[0386] The electronic device may be a terminal, a server or a similar computing device. For example, the electronic device is a server. Figure 7 is a block diagram of an electronic device according to an exemplary embodiment. Figure 7 As shown, the server 700 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 710 (the processor 710 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 730 for storing data, and one or more storage media 720 (such as one or more mass storage devices) for storing application programs 723 or data 722. Among them, the memory 730 and the storage medium 720 can be short-term storage or permanent storage. The program stored in the storage medium 720 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 710 can be configured to communicate with the storage medium 720 and execute a series of instruction operations in the storage medium 720 on the server 700. The server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input and output interfaces 740, and / or one or more operating systems 721, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0387] The input / output interface 740 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 700. In one example, the input / output interface 740 includes a network adapter (Network Interface Controller, NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 740 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0388] It can be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7More or fewer components as shown, or with Figure 7 Different configurations are shown.

[0389] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 730 including instructions, and the instructions can be executed by the processor 710 of the device 700 to complete the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0390] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the data processing method provided in any of the above embodiments is implemented.

[0391] Figure 8 is a block diagram of an electronic device for automated testing according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data processing method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0392] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0393] 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 may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may 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).

[0394] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0395] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data processing method, characterized in that: include: Build requests based on test cases and build test data; Constructing an initial test case according to the test data, the preset inspection strategy and the expected test results corresponding to the test data; Determine target environment information based on the target subject queue corresponding to the initial test case; the target environment information includes information of target subject queues of the same function in different environments; Based on the initial test case and the target environment information, construct a target test case; Execute the target test case in the target subject queue to obtain a target test result of the target test case; Based on the preset inspection strategy, the target test result and the expected test result are compared and inspected to obtain the use case test result.

2. The method according to claim 1, characterized in that There are multiple initial test cases, and the method further includes: Determine the preset business identifier corresponding to each initial test case; Aggregate initial test cases corresponding to the same preset service identifier to form an initial test case group; The correspondence between the preset service identifier and the initial test case group is stored in the preset database.

3. The method according to claim 2, characterized in that The determining target environment information based on the target subject queue corresponding to the initial test case includes: Determine the target service identifier corresponding to the target task according to the target task test request; Searching the preset database for an initial test case group that matches the target service identifier to obtain a screening test case group; Determine a target subject queue corresponding to each screening test case in the screening test case group; Determine the target function identifiers corresponding to each of the multiple target subject queues; Aggregate the target subject queues corresponding to the same target function identifier to form a target subject queue set; According to the target function identifier corresponding to the target subject queue set, target environment information of the screening test case corresponding to the target subject queue set is determined.

4. The method according to claim 3, characterized in that The step of determining target environment information of the screening test case corresponding to the target subject queue set according to the target function identifier corresponding to the target subject queue set includes: According to the target function identifier corresponding to the target subject queue set, query the environment information set matching the target function identifier in the environment database to obtain the target environment template corresponding to the target subject queue set; The target environment template is determined as the target environment information of the screening test case corresponding to the target subject queue set.

5. The method according to claim 4, characterized in that The step of executing the target test case in the target subject queue to obtain a target test result of the target test case includes: Obtain a target environment identifier corresponding to the target subject queue; Filling the target environment template according to the target environment identifier to obtain application environment information; The target environment template in the target test case is replaced with the application environment information; and in the target subject queue, the target test case after the information is replaced is executed to obtain the target test result.

6. The method according to claim 5, characterized in that The method further comprises: Obtain an application link consisting of multiple associated applications; Determine a target environment template corresponding to each application according to a target task identifier corresponding to each application in the application link; Build an environment template link based on the target environment template corresponding to each application; Constructing an environment variable group according to the environment variables corresponding to each application in the application link; An environment link is constructed according to the environment template link and the environment variable group.

7. The method according to claim 6, characterized in that The step of constructing an environment link according to the environment template link and the environment variable group includes: Fill each target environment template in the environment template link according to the environment variable group to build an initial link; According to the target task identifier corresponding to each application in the application chain and the target environment template corresponding to each application in the application chain, determining the association relationship between the target task identifier and the target environment template; According to the association relationship between the target task identifier and the target environment template, the initial link is updated to construct an environment link; the environment link includes multiple nodes and connecting lines between the nodes, the nodes represent the target task identifier, the nodes are used to store target environment information, and the connecting lines represent the association relationship between the nodes; the target environment information corresponding to each application is obtained by filling in each target environment template in the environment template link according to the environment variable group.

8. The method according to claim 6, characterized in that The step of constructing an environment template link according to the target environment template corresponding to each application includes: According to the dependency relationship of data reading and writing in each application, determine the association relationship between the target environment templates corresponding to each application; The environment template link is constructed according to the association relationship between each target environment template.

9. The method according to claim 6, characterized in that The step of constructing an environment template link according to the target environment template corresponding to each application includes: Determine the target task identifier corresponding to each target environment template; Determine the association relationship between each target environment template according to the association relationship between the target tasks corresponding to each target task identifier; The environment template link is constructed according to the association relationship between each target environment template.

10. The method according to claim 7, characterized in that The method further comprises: Checking the connectivity status of each node in the environment link in turn, and identifying abnormal nodes in the environment link according to the connectivity status of each node; Sending warning information to the terminal; the warning information carries the node identifier of the abnormal node.

11. The method according to claim 10, characterized in that The step of sequentially checking the connectivity status of each node in the environment link includes: Build a scheduled inspection task; Based on the scheduled inspection task, the connectivity status of each node in the environment link is checked in turn at every preset time interval.

12. The method according to claim 6, characterized in that The method further comprises: In response to the resource consumption query instruction, query the resource consumption of each node in the environment link; Determining the total resource consumption of the environment link according to the resource consumption of each node in the environment link; When the total resource consumption is greater than a preset resource threshold, operation and maintenance processing is performed on the environment link.

13. The method according to claim 1, characterized in that After constructing the initial test case, the method further includes: Constructing a preset assertion condition template, wherein the preset assertion condition template includes a plurality of preset assertion condition fields; Based on the initial test case, filter out a target assertion condition field from the preset assertion condition template; Replace the target assertion condition field with the target assertion value to construct the target assertion condition; Performing an assertion check on the result data of the initial test case based on the target assertion condition to obtain an assertion check result; Debugging the initial test case based on the assertion check result to obtain a debugged test case; The determining target environment information based on the target subject queue corresponding to the initial test case includes: Based on the target subject queue corresponding to the debugged test case, target environment information is determined.

14. The method according to claim 1, characterized in that Before constructing the test data based on the test case construction request, the method includes: Constructing a preset field template corresponding to the preset test data; the preset field template includes a plurality of preset fields; The step of constructing a request based on a test case and constructing test data includes: Based on the test case construction request, filter out target fields matching the test case to be constructed from the preset field template; The target field is replaced with the test parameter to construct the test data.

15. A data processing device, characterized in that: include: The data construction module is configured to execute the test case construction request and construct the test data; An initial test case construction module is configured to construct an initial test case according to the test data, a preset inspection strategy and an expected test result corresponding to the test data; A target environment determination module is configured to determine target environment information based on a target subject queue corresponding to the initial test case; The target environment information includes information of target subject queues of the same function under different environments; A target test case construction module is configured to construct a target test case based on the initial test case and the target environment information; A target result determination module is configured to execute the target test case in the target subject queue to obtain a target test result of the target test case; The result determination module is configured to perform a comparative check on the target test result and the expected test result based on the preset check strategy to obtain the use case test result.

16. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data processing method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Simulation test method and device, electronic equipment and storage medium

    CN115268297A

  • Test method and device, electronic equipment and storage medium

    CN117493158A

  • Data Processing Apparatus

    US20100162260A1

  • System and method for unit-of-order routing

    US20190068536A1

  • Systems and methods of sending a packet in a packet-switched network through a pre-determined path to monitor network health

    US9584387B1