CN114218096A - Performance test-based transaction recommendation method, device and equipment - Google Patents

Performance test-based transaction recommendation method, device and equipment Download PDF

Info

Publication number
CN114218096A
CN114218096A CN202111512088.1A CN202111512088A CN114218096A CN 114218096 A CN114218096 A CN 114218096A CN 202111512088 A CN202111512088 A CN 202111512088A CN 114218096 A CN114218096 A CN 114218096A
Authority
CN
China
Prior art keywords
data
scheduling instruction
transaction
database
test
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
CN202111512088.1A
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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp Ltd
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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202111512088.1A priority Critical patent/CN114218096A/en
Publication of CN114218096A publication Critical patent/CN114218096A/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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Abstract

The invention relates to the technical field of software testing, in particular to a performance test-based transaction recommendation method, device and equipment, which are used for acquiring test transaction data; calculating to obtain at least one first data scheduling instruction according to the test transaction data; according to the method, the high-risk data scheduling instruction is obtained through calculation according to the at least one first data scheduling instruction, and at least one associated transaction is obtained through calculation according to the high-risk data scheduling instruction.

Description

Performance test-based transaction recommendation method, device and equipment
Technical Field
The invention relates to the technical field of software testing, in particular to a transaction recommendation method, a transaction recommendation device and transaction recommendation equipment based on performance testing.
Background
The existing performance test can only find the performance problem of the tested execution branch because only one or more execution branches of the test system are tested, and can not detect the performance problem of other execution branches which are not subjected to the performance test.
Disclosure of Invention
The invention aims to provide a transaction recommendation method, a device, equipment and a readable storage medium based on performance test to improve the problems.
In order to achieve the above object, the embodiments of the present application provide the following technical solutions:
in one aspect, an embodiment of the present application provides a transaction recommendation method based on a performance test, where the method includes: acquiring test transaction data, wherein the test transaction data is interactive data generated by an application server and a database during a test period; calculating to obtain at least one first data scheduling instruction according to the test transaction data; calculating to obtain a high-risk data scheduling instruction according to the at least one first data scheduling instruction, wherein the high-risk data scheduling instruction is a data calling instruction which influences the operating efficiency of the server; and calculating to obtain at least one associated transaction according to the high-risk data scheduling instruction, wherein the associated transaction is transaction data judged to have operation risk, and the transaction data is data generated by the application server and the database in an interaction process.
Preferably, before acquiring the test transaction data, the method further includes:
acquiring IP addresses of a plurality of application servers;
detecting basic configuration information and an operating environment of the application server corresponding to each IP address according to each IP address;
if the basic configuration information and the operating environment of each application server are not detected to be abnormal; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
Preferably, before acquiring the test transaction data, the method further includes:
acquiring database basic data, wherein the database basic data is data reflecting database configuration information;
and detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, opening a second communication channel with the database, wherein the second communication channel is used for calling operation data and feedback data generated by the database in response to a data request sent by the application server.
Preferably, the calculating at least one first data scheduling instruction according to the test transaction data includes:
calling the transaction data, wherein the transaction data comprises operation data, and the operation data comprises data scheduling instructions of a plurality of reaction database internal data calling processes;
extracting a scheduling instruction of data to be detected from the operation data;
and carrying out deduplication processing on the data scheduling instruction to be detected to obtain at least one first data scheduling instruction.
Preferably, the calculating the high-risk data scheduling instruction according to the at least one first data scheduling instruction includes:
calling one first data scheduling instruction;
and (3) analysis operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
and calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until a plurality of first data scheduling instructions are subjected to analysis operation.
Preferably, the performing risk assessment analysis on the first data scheduling instruction includes:
calling one first data scheduling instruction;
and if any one of the result of the static syntax analysis, the result of the execution plan analysis and the result of the index use condition analysis is abnormal, the first data scheduling instruction is judged to be a high-risk data scheduling instruction.
Preferably, the acquiring test transaction data comprises:
acquiring request data sent to the database by an application server;
feedback data sent by a database to the application server is obtained;
acquiring operation data in the process of generating the feedback data by the database;
and constructing a mapping relation among the request data, the feedback data and the operation data to obtain test transaction data.
Preferably, the calculating at least one associated transaction according to the high-risk data scheduling instruction includes:
acquiring a transaction data pool, wherein the transaction data pool comprises all types of transaction data;
calculating to obtain a second data scheduling instruction corresponding to each transaction data according to each transaction data;
and detecting whether the high-risk data scheduling instruction exists in each second data scheduling instruction, and if the high-risk data scheduling instruction exists in the second data scheduling instruction, marking the transaction data as associated transaction.
In a second aspect, an embodiment of the present application provides a performance test-based transaction recommendation apparatus, including:
the acquisition module is used for acquiring test transaction data, wherein the test transaction data is interactive data generated by the application server and the database during the test period;
the first calculation module is used for calculating to obtain at least one first data scheduling instruction according to the test transaction data;
the second calculation module is used for calculating to obtain a high-risk data scheduling instruction according to the at least one first data scheduling instruction, wherein the high-risk data scheduling instruction is a data calling instruction which influences the operating efficiency of the server;
and the third calculation module is used for calculating at least one associated transaction according to the high-risk data scheduling instruction, wherein the associated transaction is the transaction data judged to have the operation risk, and the transaction data is the data generated by the application server and the database in the interaction process.
Preferably, the obtaining module includes:
a first acquisition unit configured to acquire IP addresses of a plurality of the application servers;
the first computing unit is used for detecting basic configuration information and an operating environment of the application server corresponding to each IP address according to each IP address;
the second computing unit is used for detecting whether the basic configuration information and the running environment of each application server are abnormal or not; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
Preferably, the obtaining module includes:
the second acquisition unit is used for acquiring database basic data, and the database basic data is data reflecting database configuration information;
and the third computing unit is used for detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, a second communication channel with the database is opened, wherein the second communication channel is used for calling the operation data and the feedback data generated by the database in response to the data request sent by the application server.
Preferably, the first calculation module includes:
the first calling unit is used for calling the transaction data, the transaction data comprises operation data, and the operation data comprises data scheduling instructions of a plurality of reaction database internal data calling processes;
the first extraction unit is used for extracting a scheduling instruction of data to be detected from the operation data;
and the fourth calculating unit is used for carrying out deduplication processing on the to-be-detected data scheduling instruction to obtain at least one first data scheduling instruction.
Preferably, the second calculation module includes:
the second calling unit is used for calling one first data scheduling instruction;
a first analysis unit for performing an analysis operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
and the fifth calculating unit is used for calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until the plurality of first data scheduling instructions are subjected to the analysis operation.
Preferably, the first analysis unit comprises:
a third calling unit, configured to call one of the first data scheduling instructions;
and a sixth calculating unit, configured to perform static syntax analysis, execution plan analysis, and index use condition analysis on the first data scheduling instruction in sequence, and if any one of a result of the static syntax analysis, a result of the execution plan analysis, and a result of the index use condition analysis is abnormal, determine that the first data scheduling instruction is a high-risk data scheduling instruction.
Preferably, the obtaining module includes:
a third obtaining unit, configured to obtain request data sent by an application server to the database;
a fourth obtaining unit, configured to obtain feedback data sent by the database to the application server;
the fifth acquisition unit is used for acquiring the operation data in the process of generating the feedback data by the database;
the first construction unit is used for constructing the mapping relation among the request data, the feedback data and the operation data to obtain the test transaction data.
Preferably, the third computing module comprises:
the sixth acquisition unit is used for acquiring a transaction data pool, and the transaction data pool comprises all types of transaction data;
the seventh calculating unit is used for calculating to obtain a second data scheduling instruction corresponding to each transaction data according to each transaction data;
a first detecting unit, configured to detect whether the high-risk data scheduling instruction exists in each second data scheduling instruction, and if the high-risk data scheduling instruction exists in the second data scheduling instruction, mark the transaction data as an associated transaction.
In a third aspect, embodiments of the present application provide a performance test-based transaction recommendation device, which includes a memory and a processor. The memory is used for storing a computer program; the processor is used for realizing the steps of the transaction recommendation method based on the performance test when executing the computer program.
In a fourth aspect, the present application provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the above-mentioned transaction recommendation method based on performance testing.
The invention has the beneficial effects that:
according to the invention, the high-risk data scheduling instruction which can influence the operating efficiency of the server is screened out by detecting the test transaction data generated when the performance of the execution branch is tested, the associated transactions generated when other execution mechanisms associated with the high-risk data scheduling instruction operate are obtained through the high-risk data scheduling instruction, and further the possible performance problems of other execution branches which are not subjected to the performance test can be indirectly known.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a transaction recommendation method based on performance testing according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a transaction recommendation device based on performance testing according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a transaction recommendation device based on performance testing according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers or letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
As shown in fig. 1, the present embodiment provides a performance test-based transaction recommendation method including step S1, step S2, step S3, and step S4.
S1, acquiring test transaction data, wherein the test transaction data are interactive data generated by an application server and a database during a test period;
at the beginning of the test experiment, connectivity tests are required, which include: a connectivity test with an application server, the steps comprising: acquiring IP addresses of a plurality of application servers, detecting basic configuration information and an operating environment of the application servers corresponding to each IP address according to each IP address, and if the basic configuration information and the operating environment of each application server are not detected to be abnormal, opening first communication channels of the application servers, wherein the first communication channels are used for calling data to be received sent to the database by the application servers; connectivity testing with a database, comprising: the method comprises the steps of obtaining basic data of a database, wherein the basic data of the database is data reflecting configuration information of the database, then detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, opening a second communication channel with the database, wherein the second communication channel is used for calling operation data and feedback data generated by the database for responding to a data request sent by an application server.
After the successful connection with both the application server and the database is confirmed, the interactive data between the application server end and the database end is respectively collected by a dynamic data collection module in the system, and the specific collection mode is as follows:
the method comprises the steps of acquiring dynamic data (test transaction data) in the operation of an application server in real time, and establishing a mapping relation of application identification, application service identification, transaction identification (such as a transaction code in socket + xml communication), cases (corresponding to a group of input business data) and SQL, so that the accumulation of assets is realized, the labor cost is saved, and the problems of low efficiency and inaccuracy in manual carding work are solved.
S2, calculating to obtain at least one first data scheduling instruction according to the test transaction data;
in this embodiment, the test transaction data (SQL) includes operation data, where the operation data includes data scheduling instructions (SQL) for reflecting a data calling process inside the database, and the data scheduling instructions to be detected are first extracted from the operation data, and then the data scheduling instructions to be detected are subjected to deduplication processing to obtain a plurality of first data scheduling instructions.
S3, calculating to obtain a high-risk data scheduling instruction according to the at least one first data scheduling instruction, wherein the high-risk data scheduling instruction is a data calling instruction which influences the operation efficiency of the server;
calling one first data scheduling instruction, and then performing the analysis operation on the first data scheduling instruction (performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction); and then calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until the plurality of first data scheduling instructions are subjected to the analysis operation, thereby realizing that each first data scheduling instruction is detected.
The risk assessment analysis method for one first data scheduling instruction comprises the following steps:
performing static syntax analysis, execution plan analysis and index use condition analysis on the first data scheduling instruction, and if any one of the results of the static syntax analysis, the results of the execution plan analysis and the results of the index use condition analysis is abnormal, judging that the first data scheduling instruction is a high-risk data scheduling instruction, wherein the static syntax analysis comprises searching for like '% xxx%', where the where condition is missing, deep nesting, using not in predicates and the like, evaluating risk points of SQL statements according to inspection rules, and generating associated data of 'application identifier-environment identifier-transaction identifier-case-SQL-SQL risk points'; the execution plan analysis comprises analyzing performance problems existing in the SQL execution plan, such as full-table scanning, index range scanning (range in mysql), index scanning (index in mysql), too large returned result set and the like, and generating associated data of 'application identification-environment identification-transaction identification (such as transaction code in socket + xml communication) -case (corresponding to a group of input service data) -SQL-SQL risk point'; the index use condition analysis comprises the steps of obtaining unused indexes (index fields are not involved in all query conditions of SQL or indexes are not used in an execution plan); a similar index is obtained (e.g., the index1 is defined as fields a, b, c, and the index2 is defined as fields a, b, which can be regarded as similar index). A detail view function is provided that SQL and associated application identification-function point identification-cases that use these indices, or possibly use them, in the execution plan can be drill down to get to the execution plan.
In this embodiment, the first data scheduling instruction is processed item by item, SQL, i.e., the high-risk data scheduling instruction, which may have performance problems is analyzed based on metadata information related to the table, and the index is analyzed to indicate unused indexes and similar indexes. And proposing performance test necessity suggestions according to the serious risk condition and accurately confirming the performance test transaction range.
And S4, calculating to obtain at least one associated transaction according to the high-risk data scheduling instruction, wherein the associated transaction is transaction data judged to have operation risk, and the transaction data is data generated by the application server and the database in an interaction process.
In this embodiment, first, data in a transaction data pool is called, then, second data scheduling instructions corresponding to each transaction data are obtained through calculation according to each transaction data, whether the high-risk data scheduling instructions exist in each second data scheduling instruction is detected, and if the high-risk data scheduling instructions exist in the second data scheduling instructions, the transaction data are marked as associated transactions.
Secondly, after the associated transaction is obtained, the system can analyze the input SQL change factors through the intelligent recommendation module, realize the intelligent recommendation of the transaction and the case, and accurately determine the performance test range, including the following contents:
when the input content is a table, after application basic configuration information needing to be analyzed is selected, the intelligent recommending module screens SQL using the table according to SQL data acquired by the dynamic data acquiring module, inquires SQL-related transactions and cases, evaluates transaction and case ranges influenced by the change of the data quantity of the table and prevents potential performance hazards.
When the input content is a database DDL language, after application basic configuration information needing to be analyzed is selected, the intelligent recommendation module analyzes the DLL language, searches for sql related to tables and fields of indexes, analyzes the influence of index change on the sql, screens related application identification-environment identification-transaction identification (such as transaction codes in socket + xml communication) -case data according to the sql, and realizes index influence analysis and related transaction and case recommendation.
In a specific embodiment of the present disclosure, before acquiring the test transaction data (SQL), the method further includes:
acquiring IP addresses of a plurality of application servers;
detecting basic configuration information and an operating environment of the application server corresponding to each IP address according to each IP address;
if the basic configuration information and the operating environment of each application server are not detected to be abnormal; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
In a specific embodiment of the present disclosure, before acquiring the test transaction data (SQL), the method further includes:
acquiring database basic data, wherein the database basic data is data reflecting database configuration information;
and detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, opening a second communication channel with the database, wherein the second communication channel is used for calling operation data and feedback data generated by the database in response to a data request sent by the application server.
In a specific embodiment of the present disclosure, the calculating at least one first data scheduling instruction according to the test transaction data (SQL) includes:
calling the transaction data, wherein the transaction data comprises operation data, and the operation data comprises data scheduling instructions of a plurality of reaction database internal data calling processes;
extracting a scheduling instruction of data to be detected from the operation data;
and carrying out deduplication processing on the data scheduling instruction to be detected to obtain at least one first data scheduling instruction.
In a specific embodiment of the present disclosure, the calculating, according to the at least one first data scheduling instruction, a high-risk data scheduling instruction includes:
calling one first data scheduling instruction;
and (3) analysis operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
and calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until a plurality of first data scheduling instructions are subjected to analysis operation.
In a specific embodiment of the present disclosure, the performing risk assessment analysis on the first data scheduling instruction includes:
calling one first data scheduling instruction;
and if any one of the result of the static syntax analysis, the result of the execution plan analysis and the result of the index use condition analysis is abnormal, the first data scheduling instruction is judged to be a high-risk data scheduling instruction.
According to the invention, the high-risk data scheduling instruction which can influence the operating efficiency of the server is screened out by detecting the test transaction data generated when the performance of the execution branch is tested, the associated transactions generated when other execution mechanisms associated with the high-risk data scheduling instruction operate are obtained through the high-risk data scheduling instruction, and further the possible performance problems of other execution branches which are not subjected to the performance test can be indirectly known.
In one embodiment of the present disclosure, the acquiring test transaction data (SQL) includes:
acquiring request data sent to the database by an application server;
feedback data sent by a database to the application server is obtained;
acquiring operation data in the process of generating the feedback data by the database;
and constructing a mapping relation among the request data, the feedback data and the operation data to obtain test transaction data (SQL).
The method comprises the steps of acquiring dynamic data (test transaction data) in the operation of an application server in real time, and establishing a mapping relation of application identification, application service identification, transaction identification (such as a transaction code in socket + xml communication), cases (corresponding to a group of input business data) and SQL, so that the accumulation of assets is realized, the labor cost is saved, and the problems of low efficiency and inaccuracy in manual carding work are solved.
In a specific embodiment of the present disclosure, the calculating, according to the high-risk data scheduling instruction, at least one associated transaction includes:
acquiring a transaction data pool, wherein the transaction data pool comprises all types of transaction data;
calculating to obtain a second data scheduling instruction corresponding to each transaction data according to each transaction data;
and detecting whether the high-risk data scheduling instruction exists in each second data scheduling instruction, and if the high-risk data scheduling instruction exists in the second data scheduling instruction, marking the transaction data as associated transaction.
Example 2
As shown in fig. 2, the present embodiment provides a performance test-based transaction recommendation device, where the system includes:
an obtaining module 71, configured to obtain test transaction data (SQL), which is interaction data generated by the application server and the database during the test;
a first calculating module 72, configured to calculate at least one first data scheduling instruction according to the test transaction data (SQL);
the second calculating module 73 is configured to calculate a high-risk data scheduling instruction according to the at least one first data scheduling instruction, where the high-risk data scheduling instruction is a data call instruction that affects the operating efficiency of the server;
and a third calculating module 74, configured to calculate, according to the high-risk data scheduling instruction, at least one associated transaction, where the associated transaction is transaction data determined to have an operation risk, and the transaction data is data generated by the application server and the database in an interaction process.
In a specific embodiment of the present disclosure, the obtaining module 71 includes:
a first obtaining unit 715, configured to obtain IP addresses of a plurality of the application servers;
the first calculating unit 726 is configured to detect, according to each IP address, basic configuration information and an operating environment of the application server corresponding to each IP address;
a second calculating unit 717, configured to detect no abnormality in the basic configuration information and the operating environment of each of the application servers; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
In a specific embodiment of the present disclosure, the obtaining module 71 includes:
a second obtaining unit 718, configured to obtain database basic data, where the database basic data is data reflecting configuration information of a database;
a third calculating unit 719, configured to detect the integrity of the base data of the database, and if the base data of the database is complete data, open a second communication channel with the database, where the second communication channel is used to invoke operation data and feedback data generated by the database in response to the data request sent by the application server.
In a specific embodiment of the present disclosure, the first calculating module 72 includes:
a first invoking unit 721, configured to invoke the transaction data, where the transaction data includes operation data, and the operation data includes data scheduling instructions of a plurality of database internal data invoking procedures;
a first extracting unit 722, configured to extract a to-be-detected data scheduling instruction in the operation data;
a fourth calculating unit 723, configured to perform deduplication processing on the to-be-detected data scheduling instruction to obtain at least one first data scheduling instruction.
In a specific embodiment of the present disclosure, the second calculating module 73 includes:
a second invoking unit 731, configured to invoke one of the first data scheduling instructions;
a first analyzing unit 732 for performing an analyzing operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
a fifth calculating unit 733, configured to retrieve another first data scheduling instruction that is not subjected to risk assessment analysis, and perform the analysis operation on the retrieved first data scheduling instruction until all the first data scheduling instructions are subjected to analysis operation.
In one embodiment of the present disclosure, the first analysis unit 732 includes:
a third invoking unit 7331, configured to invoke one of the first data scheduling instructions;
a sixth calculating unit 7332, configured to perform static syntax analysis, execution plan analysis, and index usage analysis on the first data scheduling instruction in sequence, and if any one of a result of the static syntax analysis, a result of the execution plan analysis, and a result of the index usage analysis is abnormal, determine that the first data scheduling instruction is a high-risk data scheduling instruction.
In a specific embodiment of the present disclosure, the obtaining module 71 includes:
a third obtaining unit 711, configured to obtain request data sent by the application server to the database;
a fourth obtaining unit 712, configured to obtain feedback data sent by the database to the application server;
a fifth obtaining unit 713, which obtains operation data in the process of generating the feedback data by the database;
the first constructing unit 714 is configured to construct a mapping relationship between the request data, the feedback data, and the operation data, so as to obtain test transaction data (SQL).
In one embodiment of the present disclosure, the third calculating module 74 includes:
a sixth obtaining unit 741, configured to obtain a transaction data pool, where the transaction data pool includes all types of transaction data;
a seventh calculating unit 742, configured to calculate, according to each piece of transaction data, a second data scheduling instruction corresponding to each piece of transaction data;
a first detecting unit 743, configured to detect whether there is the high-risk data scheduling instruction in each of the second data scheduling instructions, and if there is the high-risk data scheduling instruction in the second data scheduling instruction, mark the transaction data as an associated transaction.
Example 3
Corresponding to the above method embodiment, the embodiment of the present disclosure further provides a performance test-based transaction recommendation device, and a performance test-based transaction recommendation device described below and a performance test-based transaction recommendation method described above may be referred to correspondingly.
FIG. 3 is a block diagram illustrating a performance test based transaction recommendation device 800 according to an example embodiment. As shown in fig. 3, the electronic device 800 may include: a processor 801, a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input/output (I/O) interface 804, and a communications component 805.
The processor 801 is configured to control the overall operation of the electronic device 800 to complete all or part of the steps of the above-described transaction recommendation method based on performance testing. The memory 802 is used to store various types of data to support operation at the electronic device 800, such as instructions for any application or method operating on the electronic device 800 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the performance test based transaction recommendation method described above.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the performance test based transaction recommendation method described above is also provided. For example, the computer readable storage medium may be the memory 802 described above that includes program instructions executable by the processor 801 of the electronic device 800 to perform the performance test based transaction recommendation method described above.
Example 4
Corresponding to the above method embodiment, the disclosed embodiment also provides a readable storage medium, and a readable storage medium described below and a transaction recommendation method based on performance test described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the performance test based transaction recommendation method of the above method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (15)

1. A transaction recommendation method based on performance test is characterized by comprising the following steps:
acquiring test transaction data, wherein the test transaction data is interactive data generated by an application server and a database during a test period;
calculating to obtain at least one first data scheduling instruction according to the test transaction data;
calculating to obtain a high-risk data scheduling instruction according to the at least one first data scheduling instruction, wherein the high-risk data scheduling instruction is a data calling instruction which influences the operating efficiency of the server;
and calculating to obtain at least one associated transaction according to the high-risk data scheduling instruction, wherein the associated transaction is transaction data judged to have operation risk, and the transaction data is data generated by the application server and the database in an interaction process.
2. The performance test-based transaction recommendation method of claim 1, wherein before obtaining the test transaction data, further comprising:
acquiring IP addresses of a plurality of application servers;
detecting basic configuration information and an operating environment of the application server corresponding to each IP address according to each IP address;
if the basic configuration information and the operating environment of each application server are not detected to be abnormal; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
3. The performance test-based transaction recommendation method of claim 1, wherein before obtaining the test transaction data, further comprising:
acquiring database basic data, wherein the database basic data is data reflecting database configuration information;
and detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, opening a second communication channel with the database, wherein the second communication channel is used for calling operation data and feedback data generated by the database in response to a data request sent by the application server.
4. The performance test-based transaction recommendation method of claim 1, wherein said calculating at least one first data scheduling command according to said test transaction data comprises:
calling the test transaction data, wherein the test transaction data comprises operation data, and the operation data comprises data scheduling instructions of a plurality of reaction database internal data calling processes;
extracting a scheduling instruction of data to be detected from the operation data;
and carrying out deduplication processing on the data scheduling instruction to be detected to obtain at least one first data scheduling instruction.
5. The performance test-based transaction recommendation method according to claim 1, wherein the calculating a high-risk data scheduling instruction according to the at least one first data scheduling instruction comprises:
calling one first data scheduling instruction;
and (3) analysis operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
and calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until a plurality of first data scheduling instructions are subjected to analysis operation.
6. The performance test-based transaction recommendation method of claim 5, wherein performing a risk assessment analysis on the first data scheduling instruction comprises:
calling one first data scheduling instruction;
and if any one of the result of the static syntax analysis, the result of the execution plan analysis and the result of the index use condition analysis is abnormal, the first data scheduling instruction is judged to be a high-risk data scheduling instruction.
7. The performance test-based transaction recommendation method of claim 1, wherein said obtaining test transaction data comprises:
acquiring request data sent to the database by an application server;
feedback data sent by a database to the application server is obtained;
acquiring operation data in the process of generating the feedback data by the database;
and constructing a mapping relation among the request data, the feedback data and the operation data to obtain test transaction data.
8. A performance-test-based transaction recommendation device, comprising:
the acquisition module is used for acquiring test transaction data, wherein the test transaction data is interactive data generated by the application server and the database during the test period;
the first calculation module is used for calculating to obtain at least one first data scheduling instruction according to the test transaction data;
the second calculation module is used for calculating to obtain a high-risk data scheduling instruction according to the at least one first data scheduling instruction, wherein the high-risk data scheduling instruction is a data calling instruction which influences the operation efficiency of the server;
and the third calculation module is used for calculating at least one associated transaction according to the high-risk data scheduling instruction, wherein the associated transaction is the transaction data judged to have the operation risk, and the transaction data is the data generated by the application server and the database in the interaction process.
9. The performance-test-based transaction recommendation device of claim 8, wherein the obtaining module comprises:
a first acquisition unit configured to acquire IP addresses of a plurality of the application servers;
the first computing unit is used for detecting basic configuration information and an operating environment of the application server corresponding to each IP address according to each IP address;
the second computing unit is used for detecting whether the basic configuration information and the running environment of each application server are abnormal or not; and opening a first communication channel with the plurality of application servers, wherein the first communication channel is used for calling the data requiring to be received and sent to the database by the application servers.
10. The performance-test-based transaction recommendation device of claim 8, wherein the obtaining module comprises:
the second acquisition unit is used for acquiring database basic data, and the database basic data is data reflecting database configuration information;
and the third computing unit is used for detecting the integrity of the basic data of the database, and if the basic data of the database is complete data, a second communication channel with the database is opened, wherein the second communication channel is used for calling the operation data and the feedback data generated by the database in response to the data request sent by the application server.
11. The performance-test-based transaction recommendation device of claim 8, wherein the first computing module comprises:
the first calling unit is used for calling the transaction data, the transaction data comprises operation data, and the operation data comprises data scheduling instructions of a plurality of reaction database internal data calling processes;
the first extraction unit is used for extracting a scheduling instruction of data to be detected from the operation data;
and the fourth calculating unit is used for carrying out deduplication processing on the to-be-detected data scheduling instruction to obtain at least one first data scheduling instruction.
12. The performance-test-based transaction recommendation device of claim 8, wherein the second computing module comprises:
the second calling unit is used for calling one first data scheduling instruction;
a first analysis unit for performing an analysis operation: performing risk assessment analysis on the first data scheduling instruction, and if a high risk factor exists in an execution flow corresponding to the first data scheduling instruction, marking the first data scheduling instruction as a high risk data scheduling instruction;
and the fifth calculating unit is used for calling another first data scheduling instruction which is not subjected to risk assessment analysis, and performing the analysis operation on the first data scheduling instruction until the plurality of first data scheduling instructions are subjected to the analysis operation.
13. The performance-test-based transaction recommendation device of claim 12, wherein the first analysis unit comprises:
a third calling unit, configured to call one of the first data scheduling instructions;
and a sixth calculating unit, configured to perform static syntax analysis, execution plan analysis, and index use condition analysis on the first data scheduling instruction in sequence, and if any one of a result of the static syntax analysis, a result of the execution plan analysis, and a result of the index use condition analysis is abnormal, determine that the first data scheduling instruction is a high-risk data scheduling instruction.
14. The performance-test-based transaction recommendation device of claim 8, wherein the obtaining module comprises:
a third obtaining unit, configured to obtain request data sent by an application server to the database;
a fourth obtaining unit, configured to obtain feedback data sent by the database to the application server;
the fifth acquisition unit is used for acquiring the operation data in the process of generating the feedback data by the database;
the first construction unit is used for constructing the mapping relation among the request data, the feedback data and the operation data to obtain the test transaction data.
15. A performance test based transaction recommendation device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the performance test based transaction recommendation method of any one of claims 1 to 8 when executing the computer program.
CN202111512088.1A 2021-12-07 2021-12-07 Performance test-based transaction recommendation method, device and equipment Pending CN114218096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111512088.1A CN114218096A (en) 2021-12-07 2021-12-07 Performance test-based transaction recommendation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111512088.1A CN114218096A (en) 2021-12-07 2021-12-07 Performance test-based transaction recommendation method, device and equipment

Publications (1)

Publication Number Publication Date
CN114218096A true CN114218096A (en) 2022-03-22

Family

ID=80701037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111512088.1A Pending CN114218096A (en) 2021-12-07 2021-12-07 Performance test-based transaction recommendation method, device and equipment

Country Status (1)

Country Link
CN (1) CN114218096A (en)

Similar Documents

Publication Publication Date Title
CN106294673B (en) Method and system for analyzing log data in real time by user-defined rule
CN102135938B (en) Software product testing method and system
Lo et al. Learning extended FSA from software: An empirical assessment
CN109308254B (en) Test method, test device and test equipment
US11036777B2 (en) Analysis information management system
US8904352B2 (en) Systems and methods for processing source code during debugging operations
US11074162B2 (en) System and a method for automated script generation for application testing
CN111475694A (en) Data processing method, device, terminal and storage medium
CN108710571A (en) A kind of method and apparatus generating automatic test code
Zaccarelli et al. Stream2segment: An open‐source tool for downloading, processing, and visualizing massive event‐based seismic waveform datasets
CN115033894A (en) Software component supply chain safety detection method and device based on knowledge graph
CN107066302B (en) Defect inspection method, device and service terminal
US20190056361A1 (en) Analysis information management system
Rantala et al. Prevalence, contents and automatic detection of KL-SATD
CN114185791A (en) Method, device and equipment for testing data mapping file and storage medium
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
CN112650673A (en) Method and device for creating test case in transaction tracking system and electronic equipment
CN116069667A (en) Test case auxiliary positioning method and device based on code analysis
CN114218096A (en) Performance test-based transaction recommendation method, device and equipment
CN115309661A (en) Application testing method and device, electronic equipment and readable storage medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN110717032A (en) Method for generating and displaying multi-system method call link diagram
CN111143221B (en) Test method and device
CN109582534B (en) Method and device for determining operation entry of system and server
Liu et al. Drift: Fine-Grained Prediction of the Co-Evolution of Production and Test Code via Machine Learning

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