CN114840435A - Method, device, equipment, storage medium and program product for determining data flow direction - Google Patents

Method, device, equipment, storage medium and program product for determining data flow direction Download PDF

Info

Publication number
CN114840435A
CN114840435A CN202210548257.5A CN202210548257A CN114840435A CN 114840435 A CN114840435 A CN 114840435A CN 202210548257 A CN202210548257 A CN 202210548257A CN 114840435 A CN114840435 A CN 114840435A
Authority
CN
China
Prior art keywords
data
target
target data
name
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210548257.5A
Other languages
Chinese (zh)
Inventor
关志新
李艳
张乐
闫毅芊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210548257.5A priority Critical patent/CN114840435A/en
Publication of CN114840435A publication Critical patent/CN114840435A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3676Test management for coverage analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a method for determining data flow direction, which can be applied to the field of finance. The method comprises the following steps: responding to a test instruction, and acquiring target data to be tested; generating a target data definition table according to the target data to be tested, wherein the target data definition table comprises an application name of the target data, a data table name of the target data and a field name of the target data; executing a bypass output flow to output target circulation data in the process of executing an instantiated test flow, wherein the bypass output flow is preset according to the target data definition table; and generating a target data flow record table according to the target flow data, and determining the data flow direction of the target data to be tested according to the target data flow record table. The present disclosure also provides a data flow direction determination apparatus, a device, a storage medium, and a program product.

Description

Method, device, equipment, storage medium and program product for determining data flow direction
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of software testing, and more particularly, to a method, an apparatus, a device, a storage medium, and a program product for determining a data flow direction.
Background
In a large-scale software testing process, the confirmation of test case contents and test schemes is completed by combing data interface relations among a plurality of applications, the combing of the data interface relations is generally carried out manually in an interface document by using interface data or data names as a combing basis, however, the mode is low in efficiency and easy to make mistakes, and in addition, when data flows into a certain application, the situation that the data is processed and then flows to the next application exists, so that the testing range cannot be completely covered.
It is noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure and therefore may include information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a method, apparatus, device, medium, and program product for determining a data flow direction.
According to a first aspect of the present disclosure, there is provided a method for determining a data flow direction, including:
responding to a test instruction, and acquiring target data to be tested;
generating a target data definition table according to the target data to be tested, wherein the target data definition table comprises an application name of the target data, a data table name of the target data and a field name of the target data;
executing a bypass output flow to output target circulation data in the process of executing an instantiated test flow, wherein the bypass output flow is preset according to the target data definition table;
generating a target data circulation record table according to the target circulation data, and
and determining the data flow direction of the target data to be tested according to the target data flow record table.
According to an embodiment of the present disclosure, the generating a target data definition table according to the target data to be tested includes:
acquiring a target identification, an application name, a data table name and a target field name of the target data to be tested;
determining an application name of the targeted data, a data table name of the targeted data and a field name of the targeted data according to the application name, the data table name and the field name of the target; and
and generating the target data definition table according to the target identification, the application name of the target data, the data table name of the target data and the field name of the target data.
According to the embodiment of the present disclosure, before executing the instantiated test flow, the method further includes:
and adding a bypass output flow according to the target data definition table.
According to an embodiment of the present disclosure, the adding a bypass output flow according to the target data definition table includes:
acquiring a target identification of the target data definition table;
identifying an object code invoking the target targeting identity; and
and adding a bypass output flow in the target code.
According to an embodiment of the present disclosure, in the executing of the instantiated test procedure, the executing of the bypass output procedure to output the target circulation data includes:
automatically executing a bypass output flow in the process of executing the instantiated test flow; and
target circulation data output by-pass is collected.
According to an embodiment of the present disclosure, generating a target data circulation record table according to the target circulation data includes:
determining an application name for calling the targeted data, a name of a called targeted data interface and derivative field data according to the targeted circulation data; and
and generating a target data flow record table according to the application name of the calling target data, the calling target data interface name and the derivative field data.
According to the embodiment of the present disclosure, determining the data flow direction of the target data to be tested according to the target data flow record table includes:
acquiring a target identification of the target data to be tested;
scanning the target identification of the target data circulation record table to obtain target circulation data of target data to be tested; and
and determining the data flow direction of the target data to be tested according to the calling time and the target circulation data.
According to the embodiment of the disclosure, the derivative field data is generated by calling targeting data, the derivative field data comprises a derivative field data table name and a derivative field name, and the targeting identification of the derivative field data is the same as the target targeting data.
A second aspect of the present disclosure provides an apparatus for determining a data flow direction, including: the acquisition module is used for responding to the test instruction and acquiring target data to be tested;
the first generation module is used for generating a targeted data definition table according to the target data to be tested, wherein the targeted data definition table comprises an application name of targeted data, a data table name of the targeted data and a field name of the targeted data;
the output module is used for executing a bypass output process to output target circulation data in the process of executing an instantiated test process, wherein the bypass output process is preset according to the target data definition table;
the second generation module is used for generating a target data circulation record table according to the target circulation data; and
and the data flow direction determining module is used for determining the data flow direction of the target data to be tested according to the target data flow recording table.
According to an embodiment of the present disclosure, the first generating module includes:
the first acquisition submodule is used for acquiring a target identification, an application name, a data table name and a target field name of the target data to be tested;
the first determining submodule is used for determining the application name of the targeted data, the data table name of the targeted data and the field name of the targeted data according to the application name, the data table name and the field name of the target; and
and the first generation submodule is used for generating the target data definition table according to the target identification, the application name of the target data, the data table name of the target data and the field name of the target data.
According to an embodiment of the present disclosure, an output module includes:
the bypass output execution sub-module is used for automatically executing the bypass output flow in the process of executing the instantiated test flow;
and the collection sub-module is used for collecting the target circulation data output by the bypass.
According to the embodiment of the present disclosure, before the output module executes the instantiation test, the method further includes: and the bypass output setting module is used for increasing a bypass output process according to the target data definition table.
According to an embodiment of the present disclosure, a bypass output setting module includes:
the second acquisition submodule is used for acquiring a target identification of the target data definition table;
the identification submodule is used for identifying and calling the target code of the target identification;
and the bypass output setting submodule is used for adding a bypass output flow in the target code.
According to an embodiment of the present disclosure, the second generating module includes:
the second determining submodule is used for determining an application name for calling the targeted data, a name for calling a targeted data interface and derivative field data according to the targeted circulation data;
and the second generation submodule is used for generating a target data circulation record table according to the application name of the calling target data, the interface name of the calling target data and the derivative field data.
According to an embodiment of the present disclosure, the data flow direction determining module includes:
the second acquisition submodule is used for acquiring a target identification of the target data to be tested;
the scanning sub-module is used for scanning the target identification of the target data circulation record table to obtain target circulation data of target data to be tested;
and the third determining submodule is used for determining the data flow direction of the target data to be tested according to the calling time and the target circulation data.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the above-described method of determining a data flow direction.
The fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-mentioned method of determining a data flow direction.
The fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described method for determining a data flow direction.
According to the data flow direction determining method provided by the embodiment of the disclosure, a target data definition table is generated according to target data to be tested, the target data to be tested is defined as target data, in the process of executing an instantiated test process, a bypass output process is executed to output target circulation data, a target data circulation record table is generated according to the target circulation data, and the data flow direction of the target data is determined according to the target data circulation record table, so that the full coverage of the target data circulation process is realized, the influence range of data change on test work is automatically explored, and the test efficiency is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario diagram of a method, apparatus, device, medium, and program product for determining a data flow direction according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of determining a flow direction of data according to an embodiment of the present disclosure;
FIG. 3a schematically illustrates one of the flow diagrams of a bypass output setting method according to an embodiment of the disclosure;
FIG. 3b schematically illustrates a second flowchart of a bypass output setting method according to an embodiment of the present disclosure;
fig. 4 schematically illustrates a flow diagram for performing a bypass output flow to output targeted streaming data in accordance with an embodiment of the disclosure;
FIG. 5 schematically illustrates a flow chart of a targeting data definition table generation method according to an embodiment of the present disclosure;
fig. 6 schematically illustrates a flow chart of generating a target data flow record table from target flow data according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow chart for determining a data flow direction of target data to be tested according to a target data flow transition record table according to an embodiment of the present disclosure;
fig. 8 is a block diagram schematically illustrating a structure of a data flow direction determination apparatus according to an embodiment of the present disclosure; and
fig. 9 schematically shows a block diagram of an electronic device adapted to implement the determination method of data flow direction according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the large software testing process, the content of the test case and the confirmation of the test scheme are determined for the relationship combing of the data interfaces among the plurality of applications, and at present, the manual combing is performed by depending on the document retention of the data interfaces among the plurality of applications, so that the efficiency is low, and the error is easy to occur. And the possibility that data is processed and then transferred to the next application may occur after the data flows into a certain application, so that omission may occur by using interface data or data naming as a carding basis. Thereby affecting the full coverage performance of the test job.
Based on the above technical problem, an embodiment of the present disclosure provides a method for determining a data flow direction, including: responding to a test instruction, and acquiring target data to be tested; generating a target data definition table according to the target data to be tested, wherein the target data definition table comprises an application name of the target data, a data table name of the target data and a field name of the target data; executing a bypass output flow to output target circulation data in the process of executing an instantiated test flow, wherein the bypass output flow is preset according to the target data definition table; and generating a target data flow record table according to the target flow data, and determining the data flow direction of the target data to be tested according to the target data flow record table.
Fig. 1 schematically illustrates an application scenario diagram of a method, an apparatus, a device, a medium, and a program product for determining a data flow direction according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include a data flow determination scenario. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server (for example only) providing support for data flow determination instructions issued by users using the terminal devices 101, 102, 103. The background server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (for example, data flow direction information or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for determining the data flow provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the data flow direction determination apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The method for determining the data flow direction provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the determining device for data flow provided by the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
It should be noted that the method and the apparatus for determining the data flow direction determined in the embodiment of the present disclosure may be applied to the software testing field in the financial field, and may also be applied to any field other than the financial field.
The following describes in detail a determination method of a data flow direction according to an embodiment of the present disclosure with reference to fig. 2 to 7 based on the scenario described in fig. 1.
Fig. 2 schematically shows a flow chart of a method of determining a data flow direction according to an embodiment of the present disclosure. As shown in fig. 2, the method for determining the data flow direction of the embodiment includes operations S210 to S250, and the method may be executed by a server or other computing device.
In the embodiment of the disclosure, after target data is generated in an application, the target data with a unique identifier is simulated, and the occurrence point of the target data is collected in debugging of a monitoring code according to a system flow, so that automatic exploration of the data flow direction and the use function is realized. Before executing the method of the embodiment of the present disclosure, an automatic recording branch of the targeted data debugging software needs to be set up, and the automatic recording branch may run in a function call form, specifically, a uniform call process needs to be embedded in a software code to be tested, that is, an identification code includes a code for reading targeted data, a bypass output is added to the code, and data related to the flow direction of the targeted data is output.
In operation S210, target data to be tested is acquired in response to a test instruction.
In operation S220, a target data definition table is generated according to the target data to be tested.
According to an embodiment of the present disclosure, the target data definition table includes an application name of the target data, a data table name of the target data, and a field name of the target data;
in one example, the target data to be tested may be original data in the target application, or may be newly added data or modified data in the target application, the target data to be tested is defined as target data, and related data of the target data to be tested is acquired according to a field in a preset target data definition table to generate a target data definition table, where the target data definition table is similar to a configuration file, and may also be generated through manual configuration by a tester, and is used for subsequently identifying a target data circulation process and outputting target circulation data. The specific process can be seen from operations S221 to S223 shown in fig. 5.
In operation S230, in the process of executing the instantiated test procedure, a bypass output procedure is executed to output the target circulation data.
In one example, in order to ensure full coverage of the test and improve the accuracy of obtaining the target data stream transfer record, the whole software system is operated according to the current test version and the actual service situation, all the interaction and batch flows involved in all the service scenes including the target application are ensured to be covered, that is, all the instantiated test flows are executed and completed, in the process of executing the instantiated test flows, transfer information such as application names, interfaces and data tables of calling the target data is output through bypasses, a target data stream transfer record table is generated and stored in a database, and the subsequent processing is waited. The specific process can be seen from operations S231 to S232 shown in fig. 4.
In operation S240, a target data circulation record table is generated according to the target circulation data.
In one example, the data flow record table is generated according to the target flow data output in operation S230 and the fields of the preset data flow record table, and the specific process may be referred to as operation S241 to operation S242 shown in fig. 6.
In operation S250, a data flow direction of the target data to be tested is determined according to the target data flow record table.
In one example, the data flow direction of the target data to be tested may be determined according to the target data flow record table, specifically, for example, the target data flow record table obtained in operation S240 may be visually processed, for example, the target data flow record table may be scanned, screening may be performed according to specific target data, the conditions of the application, the interface, the data table, and the field to which the target data is transferred are visually displayed, and the flow process may be displayed according to a call time sequence. The specific process can be seen from operations S251 to S253 shown in fig. 7.
According to the data flow direction determining method provided by the embodiment of the disclosure, a target data definition table is generated according to target data to be tested, the target data to be tested is defined as target data, in the process of executing an instantiated test process, a bypass output process is executed to output target circulation data, a target data circulation record table is generated according to the target circulation data, and the data flow direction of the target data is determined according to the target data circulation record table, so that the full coverage of the target data circulation process is realized, the influence range of data change on test work is automatically explored, and the test efficiency is improved.
Next, the process of adding a bypass output and targeting streaming data by the bypass output in the embodiment of the present disclosure will be described by fig. 3a, 3b and 4, where fig. 3a schematically shows one of the flowcharts of the bypass output setting method according to the embodiment of the present disclosure, and fig. 3b schematically shows the second flowchart of the bypass output setting method according to the embodiment of the present disclosure. Fig. 4 schematically illustrates a flow diagram for performing a bypass output flow to output targeted streaming data in accordance with an embodiment of the present disclosure. As shown in fig. 3a, operation S310 is included.
In operation S310, a bypass output procedure is added according to the targeting data definition table.
As shown in fig. 3b, operation S310 includes operations S311 to S313.
In operation S311, a target identification of the target data definition table is acquired.
In operation S312, an object code calling the target identification is identified.
In operation S313, a bypass output flow is added to the object code.
In one example, target identification, namely target data, in a target data definition table is obtained, all target codes calling the target data in test codes are scanned and identified, and a bypass output flow is added in all the target codes, so that target circulation data is automatically output through bypass in the process of executing the test.
As shown in fig. 4, operation S230 includes operations S231 to S232.
In operation S231, a bypass output flow is automatically performed in the process of executing the instantiated test flow. In operation S232, target circulation data of the bypass output is collected.
In an actual test scene, a plurality of bypass outputs exist in a test code, in the process of executing an instantiated test process, a bypass output process is automatically executed, target circulation data are output, and specific data circulation conditions can be obtained by collecting the target circulation data output by the bypass.
Fig. 5 schematically illustrates a flow chart of a targeted data definition table generation method according to an embodiment of the present disclosure. As shown in fig. 5, operation S220 includes operations S221 through S223.
In operation S221, a target identifier, an application name, a data table name, and a target field name of the target data to be tested are acquired.
In operation S222, an application name of the target data, a data table name of the target data, and a field name of the target data are determined according to the application name, the data table name, and the field name of the target data.
In operation S223, the target data definition table is generated according to the target identifier, the application name of the target data, the data table name of the target data, and the field name of the target data.
In one example, a targeting data definition table with a uniform format is established, and the targeting data definition table comprises field information such as an application where the targeting data is located, a data table and a field name of the targeting data. The method comprises the steps of obtaining an application name where target data to be tested are located, a data table name where the target data to be tested are located and a specific target field name of the target data to be tested, determining the application name where the target data are located, the data table name where the target data are located and the target data field name according to the information of the target data to be tested, defining the target data to be tested as the target data, determining a corresponding field value according to relevant information in the target data to be tested and fields in a target data definition table, and generating a target data definition table.
Fig. 6 schematically illustrates a flow chart for generating a target data flow record table from target flow data according to an embodiment of the present disclosure. As shown in fig. 6, operation S240 includes operations S241 to S242.
In operation S241, an application name for calling the targeting data, an interface name for calling the targeting data, and derivative field data are determined according to the targeting circulation data.
In operation S242, a targeting data flow record table is generated according to the application name of the calling targeting data, the calling targeting data interface name, and the derivative field data.
According to an embodiment of the present disclosure, the derivative field data includes a derivative field data table name and a derivative field name, and the target identifier of the derivative field data is the same as the target data.
In one example, a target data flow record table with a uniform format is established in advance, and the target data flow record table specifically includes an application name of target data, a data table name of target data, a field name of target data, an application name of calling target data, an interface name of calling target data, a field name of derivation, and the like.
In order to obtain a complete target data circulation process, in the embodiment of the present disclosure, the derived field data is also identified and monitored, the derived field data is generated after the target data is called by a certain application or a certain service, the derived field data may be generated through multiple calling processes, and the derived field data inherits the target identifier of the target data, that is, the target identifier of the derived field data is the same as the target identifier of the target data.
The method comprises the steps of determining a target identification of current target data according to a target data definition table, reading the target data from the target data definition table in the process of executing an instantiated test, identifying the target identification, outputting target circulation data and corresponding calling time through a bypass increased in advance in a code, wherein the target circulation data comprises an application name for calling the target data and a target data calling interface name, monitoring output data of the application for calling the target data, and determining derivative field data of the target data according to the target identification. And recording the output data in a target data flow recording table.
Fig. 7 schematically illustrates a flow chart for determining a data flow direction of target data to be tested according to a target data flow transfer record table according to an embodiment of the present disclosure.
As shown in fig. 7, operation S250 includes operations S251 to S253.
In operation S251, a target identifier of the target data to be tested is obtained.
In operation S252, the target identifier of the target data circulation record table is scanned to obtain target circulation data of the target data to be tested.
In operation S253, a data flow direction of the target data to be tested is determined according to the call time and the target circulation data.
In one example, the target data may be called multiple times, and the data processed by the call, i.e. the derivative data, may inherit the target identifier of the target data, and the target identifier is circulated in the link called by the service or application as a unique identifier. And scanning the target circulation data related to the target identification in the target data circulation record table according to the target identification of the target data to be tested, and sequencing the identified target circulation data according to calling time, so that the specific data flow direction of the target data to be tested can be determined.
Based on the data flow direction determining method, the disclosure also provides a data flow direction determining device. The apparatus will be described in detail below with reference to fig. 8.
Fig. 8 is a block diagram schematically illustrating a structure of a data flow direction determination apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the data flow direction determining apparatus 800 of this embodiment includes an obtaining module 810, a first generating module 820, an output module 830, a second generating module 840, and a data flow direction determining module 850.
The obtaining module 810 is configured to obtain target data to be tested in response to the test instruction. In an embodiment, the obtaining module 810 may be configured to perform the operation S210 described above, which is not described herein again.
The first generating module 820 is configured to generate a targeted data definition table according to the target data to be tested, where the targeted data definition table includes an application name of the targeted data, a data table name of the targeted data, and a field name of the targeted data. In an embodiment, the first generating module 820 may be configured to perform the operation S220 described above, which is not described herein again.
The output module 830 is configured to execute a bypass output procedure to output target circulation data during execution of the instantiated test procedure, where the bypass output procedure is preset according to the target data definition table. In an embodiment, the output module 830 may be configured to perform the operation S230 described above, and is not described herein again.
The second generating module 840 is configured to generate a target data circulation record table according to the target circulation data. In an embodiment, the second generating module 840 may be configured to perform the operation S240 described above, which is not described herein again.
The data flow direction determining module 850 is configured to determine a data flow direction of the target data to be tested according to the target data flow direction record table. In an embodiment, the data flow determining module 850 may be configured to perform the operation S250 described above, which is not described herein again.
According to an embodiment of the present disclosure, the first generating module 820 includes: a first acquisition submodule 821, a first determination submodule 822 and a first generation submodule 823.
The first obtaining sub-module 821 is configured to obtain a target identifier, an application name, a data table name, and a target field name of the target data to be tested. In an embodiment, the first obtaining sub-module 821 may be configured to perform the operation S221 described above, and is not described herein again.
The first determining submodule 822 is configured to determine an application name of the target data, a data table name of the target data, and a field name of the target data according to the application name, the data table name, and the field name of the target data. In an embodiment, the first determining submodule 822 may be configured to perform the operation S222 described above, and will not be described herein again.
The first generation submodule 823 is configured to generate the target data definition table according to the target identifier, the application name of the target data, the data table name of the target data, and the field name of the target data. In an embodiment, the first generation sub-module 823 may be configured to perform the operation S223 described above, and will not be described herein again.
According to an embodiment of the present disclosure, the output module 830 includes: bypass output execution submodule 831 and collection submodule 832.
The bypass output execution sub-module 831 is configured to automatically execute a bypass output process in the process of executing an instantiated test process; in an embodiment, the bypass output execution sub-module 831 may be configured to execute the operation S231 described above, and is not described herein again.
The collection submodule 832 is used to collect the target circulation data of the bypass output. In an embodiment, the collecting submodule 832 may be configured to perform the operation S232 described above, and will not be described herein again.
According to the embodiment of the present disclosure, before the output module executes the instantiation test, the method further includes: the bypass output setting module 860.
The bypass output setup module 860 is used to add a bypass output flow according to the targeting data definition table. In an embodiment, the bypass output setting module 860 may be configured to perform the operation S310 described above, which is not described herein again.
According to an embodiment of the present disclosure, the bypass output setting module 860 includes a second acquisition sub-module 861, a recognition sub-module 862, and a bypass output setting sub-module 863.
The second obtaining submodule 861 is configured to obtain a target identifier of the target data definition table. In an embodiment, the second obtaining sub-module 861 may be configured to perform operation S311 described above, which is not described herein again.
The identification submodule 862 is used to identify the object code that invokes the target identification. In an embodiment, the identifying submodule 862 may be configured to perform the operation S312 described above, and is not described herein again.
The bypass output setup submodule 863 is used to add a bypass output flow to the target code. In an embodiment, the bypass output setting submodule 863 may be configured to perform the operation S313 described above, and will not be described herein again.
According to an embodiment of the present disclosure, the second generating module 840 includes: a second determination submodule 841 and a second generation submodule 842.
The second determining submodule 841 is configured to determine, according to the target circulation data, an application name for calling the target data, a name of a call target data interface, and derivative field data. In an embodiment, the second determining submodule 841 may be configured to perform the operation S241 described above, and is not described herein again.
The second generating submodule 842 is configured to generate a target data flow record table according to the application name of the calling target data, the interface name of the calling target data, and the derivative field data. In an embodiment, the second generating sub-module 842 may be configured to perform the operation S242 described above, and is not described herein again.
According to an embodiment of the present disclosure, the data flow direction determining module 850 includes a second obtaining sub-module 851, a scanning sub-module 852, and a third determining sub-module 853.
The second obtaining sub-module 851 is used for obtaining the target identification of the target data to be tested. In an embodiment, the second obtaining sub-module 851 may be configured to perform the operation S251 described above, and is not described herein again.
The scanning sub-module 852 is configured to scan the target identifier of the target data circulation record table to obtain target circulation data of the target data to be tested. In an embodiment, the scan sub-module 852 may be configured to perform the operation S252 described above, and will not be described herein again.
The third determining submodule 853 is configured to determine a data flow direction of the target data to be tested according to the call time and the target flow data. In an embodiment, the third determining sub-module 853 may be configured to perform the operation S253 described above, which is not described herein again.
According to the embodiment of the present disclosure, any plurality of the obtaining module 810, the first generating module 820, the output module 830, the second generating module 840, and the data flow direction determining module 850 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 810, the first generating module 820, the output module 830, the second generating module 840, and the data flow direction determining module 850 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, or any one of three manners of implementation or an appropriate combination of any several of them. Alternatively, at least one of the obtaining module 810, the first generating module 820, the outputting module 830, the second generating module 840 and the data flow direction determining module 850 may be at least partially implemented as a computer program module, which when executed, may perform a corresponding function.
Fig. 9 schematically shows a block diagram of an electronic device adapted to implement the determination method of data flow direction according to an embodiment of the present disclosure.
As shown in fig. 9, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the device/apparatus/system. The above-mentioned computer-readable storage medium carries one or more programs which, when executed, implement the method for determining a data flow direction according to an embodiment of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the determination method of the data flow direction provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted in the form of a signal over a network medium, distributed, and downloaded and installed via the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (12)

1. A method for determining a data flow direction, comprising:
responding to a test instruction, and acquiring target data to be tested;
generating a target data definition table according to the target data to be tested, wherein the target data definition table comprises an application name of the target data, a data table name of the target data and a field name of the target data;
executing a bypass output flow to output target circulation data in the process of executing an instantiated test flow, wherein the bypass output flow is preset according to the target data definition table;
generating a target data circulation record table according to the target circulation data, an
And determining the data flow direction of the target data to be tested according to the target data flow record table.
2. The method of claim 1, wherein generating a targeting data definition table from the target data to be tested comprises:
acquiring a target identification, an application name, a data table name and a target field name of the target data to be tested;
determining an application name of the targeted data, a data table name of the targeted data and a field name of the targeted data according to the application name, the data table name and the field name of the target; and
and generating the target data definition table according to the target identification, the application name of the target data, the data table name of the target data and the field name of the target data.
3. The method of claim 2, prior to performing an instantiated test flow, further comprising:
and adding a bypass output flow according to the target data definition table.
4. The method of claim 3, wherein said adding a bypass output flow according to the targeting data definition table comprises:
acquiring a target identification of the target data definition table;
identifying an object code invoking the target targeting identity; and
and adding a bypass output flow in the target code.
5. The method of claim 3, wherein during the execution of the instantiated test flow, executing the bypass output flow to output the target flow data comprises:
automatically executing a bypass output flow in the process of executing the instantiated test flow; and
target circulation data output by-pass is collected.
6. The method of claim 5, wherein generating a target data flow record table from the target flow data comprises:
determining an application name for calling the targeted data, a name for calling a targeted data interface and derivative field data according to the targeted circulation data; and
and generating a target data flow record table according to the application name of the calling target data, the calling target data interface name and the derivative field data.
7. The method of claim 6, wherein determining the data flow of the target data to be tested according to the targeted data flow record table comprises:
acquiring a target identification of the target data to be tested;
scanning the target identification of the target data circulation record table to obtain target circulation data of target data to be tested; and
and determining the data flow direction of the target data to be tested according to the calling time and the target circulation data.
8. The method of claim 7, wherein the derivative field data is generated by invoking targeting data, wherein the derivative field data comprises a derivative field data table name and a derivative field name, and wherein the targeting identifier of the derivative field data is the same as the targeting data.
9. A device for determining a flow direction of data, comprising:
the acquisition module is used for responding to the test instruction and acquiring target data to be tested;
the first generation module is used for generating a targeted data definition table according to the target data to be tested, wherein the targeted data definition table comprises an application name of targeted data, a data table name of the targeted data and a field name of the targeted data;
the output module is used for executing a bypass output process to output target circulation data in the process of executing an instantiated test process, wherein the bypass output process is preset according to the target data definition table;
the second generation module is used for generating a target data circulation record table according to the target circulation data; and
and the data flow direction determining module is used for determining the data flow direction of the target data to be tested according to the target data flow direction recording table.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 8.
CN202210548257.5A 2022-05-17 2022-05-17 Method, device, equipment, storage medium and program product for determining data flow direction Pending CN114840435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210548257.5A CN114840435A (en) 2022-05-17 2022-05-17 Method, device, equipment, storage medium and program product for determining data flow direction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210548257.5A CN114840435A (en) 2022-05-17 2022-05-17 Method, device, equipment, storage medium and program product for determining data flow direction

Publications (1)

Publication Number Publication Date
CN114840435A true CN114840435A (en) 2022-08-02

Family

ID=82568959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210548257.5A Pending CN114840435A (en) 2022-05-17 2022-05-17 Method, device, equipment, storage medium and program product for determining data flow direction

Country Status (1)

Country Link
CN (1) CN114840435A (en)

Similar Documents

Publication Publication Date Title
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN107368407B (en) Information processing method and device
CN113553260B (en) Test method, test apparatus, device, and medium
CN112965916B (en) Page testing method, page testing device, electronic equipment and readable storage medium
CN111797008B (en) Automatic verification method, equipment and storage medium for mobile terminal embedded point data
CN117076280A (en) Policy generation method and device, electronic equipment and computer readable storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN116662193A (en) Page testing method and device
CN112860538A (en) Method and device for performing interface regression test based on online log
CN112887355A (en) Service processing method and device for abnormal server
CN113495498B (en) Simulation method, simulator, device and medium for hardware device
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN114840435A (en) Method, device, equipment, storage medium and program product for determining data flow direction
CN113377648A (en) Software system diagnosis method and device, electronic equipment and computer readable medium
CN113626301A (en) Method and device for generating test script
CN112835804B (en) Test case processing method, device, electronic equipment and medium
CN116401319B (en) Data synchronization method and device, electronic equipment and computer readable storage medium
CN115190008B (en) Fault processing method, fault processing device, electronic equipment and storage medium
CN117435464A (en) Software testing method and device, electronic equipment and computer readable storage medium
CN113094268A (en) Test method, device, equipment, medium and program product
CN113568657A (en) Icon configuration method, icon configuration system, electronic device, and medium
CN113656326A (en) Program testing method, program testing device, computer system and storage medium
CN116756016A (en) Multi-browser testing method, device, equipment, medium and program product
CN116894004A (en) Information display method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination