An inspection method and system
By filtering transaction sets according to system dimensions and generating inspection scripts, and combining them with performance testing tools for system-level inspections, the problem of lacking system-level performance detection in existing technologies is solved, achieving more accurate performance evaluation and risk reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2026-03-10
AI Technical Summary
Existing software performance testing mainly relies on selected test transactions, lacking data support under real system production operation modes. This makes it difficult to discover system-level performance problems and increases the performance risk of system deployment.
The method of performance inspection by system dimension is adopted. By setting rules to filter transaction sets, generating inspection script sets, and using performance testing tools to run inspection scenarios, inspection test data is collected and analyzed to obtain the inspection results of the target system.
It improves the ability to detect potential performance issues in the system, reduces the performance risk of system deployment, and enhances the user experience.
Smart Images

Figure CN114201394B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a method and system for inspection. BACKGROUND
[0002] Software performance testing mainly tests various performance indicators of a system by testing tools simulating normal, peak and abnormal load conditions. In recent years, software performance testing is mostly carried out according to project dimensions, and typical transactions are selected for stress testing. The performance of the system mainly depends on the selected test transactions, and the performance evaluation of the entire system lacks data support, and cannot detect whether there will be system-level performance problems in the real simulation of the system production operation mode. SUMMARY
[0003] Therefore, embodiments of the present application provide a method and system for inspection to perform performance inspection according to system dimensions, and reduce the performance risk of system production.
[0004] In a first aspect, embodiments of the present application provide a method for inspection, comprising: screening a transaction set to be inspected according to a set rule, and generating a set of inspection scripts for the transaction set; running an inspection scene and an inspection script corresponding to a target system in the set of inspection scripts through a performance testing tool; and obtaining an inspection result of the target system according to collected inspection test data.
[0005] In a second aspect, embodiments of the present application also provide a system for inspection, comprising: an inspection script generation device configured to screen a transaction set to be inspected according to a set rule, and generate a set of inspection scripts for the transaction set; an inspection script storage device configured to store the set of inspection scripts; and an inspection device configured to run an inspection scene and an inspection script corresponding to a target system in the set of inspection scripts through a performance testing tool, and obtain an inspection result of the target system according to collected inspection test data.
[0006] The technical solution of embodiments of the present application can screen a transaction set to be inspected according to a set rule, and generate a set of inspection scripts for the transaction set; can run an inspection scene and an inspection script corresponding to a target system in the set of inspection scripts through a performance testing tool; and can obtain an inspection result of the target system according to collected inspection test data. The above technical solution adopts a method for performing performance inspection according to system dimensions, which can discover potential performance problems of the system more effectively than the prior art, reduce the performance risk of system production, and improve user experience. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 A flowchart of a method for inspection provided by an embodiment of the present application;
[0008] Figure 2 Fig. 1 is a schematic diagram of an architecture of a patrol system according to an embodiment of the present application.
[0009] Figure 3 Fig. 2 is a schematic diagram of another architecture of a patrol system according to an embodiment of the present application. DETAILED DESCRIPTION
[0010] The present application will be further described below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are intended to be merely illustrative of the present application and not limiting thereof. It should also be noted that, for the purpose of description, only the parts related to the present application are shown in the accompanying drawings rather than all the parts.
[0011] Embodiment 1
[0012] In the embodiments of the present application, Figure 1 Fig. 3 is a flowchart of a patrol method according to an embodiment of the present application. The embodiments of the present application can be applied to the performance patrol of a system to be tested, for example, the performance patrol of a bank system. The method can be performed by a patrol system. Referring to Fig. 3, Figure 1 The method according to the embodiments of the present application specifically includes the following steps:
[0013] S110, screening the transaction set to be patrolled according to the set rule, and generating a patrol script set for the transaction set.
[0014] It should be noted that, since each patrol is not for all transactions, each transaction can vary, and therefore the transaction set to be patrolled can be screened by setting the rule. Moreover, each transaction corresponds to a patrol script.
[0015] The set rule can be a rule summarized according to historical experience and historical data, for example, the rule can be set according to the importance of the target system, the transaction attribute, and the user growth, etc.
[0016] The patrol script can include the system name, the system number, the transaction name, the script number, and whether to patrol the attention transaction, etc. Of course, the related content can be extended according to the actual demand.
[0017] Specifically, the system name can be a Chinese description of the system, the system number rule can be a string of the first letter of the system name in English in uppercase plus the system online year and month, a connection symbol "_" and a two-digit serial number, for example, ABC202101_01, the system number has uniqueness, the transaction name can be a transaction name number in accordance with the system design rule, the script number can be the system number plus the transaction name plus a four-digit serial number, which has uniqueness, and whether to patrol the attention transaction can be divided into two attributes of yes or no. Among them, the attention transaction can be a transaction to be inspected, and when the attention transaction is yes, it means that the transaction is the transaction to be inspected this time. By marking the corresponding inspection attention transaction as the attention transaction, the inspected transaction can be filtered out.
[0018] It can be understood that when the target system needs to be tested, the corresponding inspection script can be run, and when the inspection script is run, the transaction volume, concurrency and the like of various transactions can be simulated. By running the simulated scene, the performance of the target system in processing transactions can be analyzed, the Transactions Per Second (TPS) of the system can be analyzed, and whether the actual demand can be met can be analyzed.
[0019] According to the set rule, the transaction to be inspected can be filtered out in the embodiment of the application, and the transaction meeting the set rule can be multiple and can form a transaction set. Correspondingly, the transaction can have a one-to-one corresponding inspection script, multiple inspection scripts can be combined into an inspection script set, and the inspection script set can be saved for subsequent inspection operation.
[0020] Further, on the basis of the above-mentioned embodiment of the application, the set rule is determined according to at least one of the following:
[0021] System importance; customer account attribute; customer type; user data volume; user growth in a future set period; daily transaction volume or peak transaction volume, TPS peak; transaction volume growth in a future set period.
[0022] Among them, the system importance can be divided into three types of core, important and general; the customer account attribute can be divided into two types of account and non-account; the customer type can be divided into two types of internal and external; the user data volume can be divided into <1000, 1000<=user data volume<10000 and >three interval segments; the user growth amount in different setting periods is different, taking the user growth amount in the future 1 year as an example, the user growth amount in the future setting period can be divided into three ranges of 10% or less, 10% to 30% and 30% or more, the daily transaction volume or peak transaction volume can be divided into two ranges of 100 million or more and 100 million or less; the TPS peak value of transactions per second can be divided into 100 or more and 100 or less; the growth amount of transaction volume in different setting periods is different, taking the growth amount of transaction volume in the future 1 year as an example, the growth amount of transaction volume in the future setting period can be divided into two interval segments of 10% or less and 10% or more.
[0023] In the embodiment of the application, the setting rule can be determined according to at least one of the following: system importance; customer account attribute; customer type; user data amount; user growth amount in a future setting period; daily transaction volume or peak transaction volume, TPS peak value of transactions per second; growth amount of transaction volume in a future setting period.
[0024] Specifically, the setting rule can be any one of the following rules: (1) system importance is core, customer account is dynamic account and customer type is external; (2) system importance is important, customer account is dynamic account, customer type is external, user data amount is 1000<=user data amount<10000, daily transaction volume or peak transaction volume is 100 million or more; (3) system importance is general, customer account is dynamic account, customer type is external, user data amount is >=10000, daily transaction volume or peak transaction volume is 100 million or more, TPS peak value of transactions per second is 100 or more; (4) system importance is core, customer account is not dynamic account, user data amount is 1000<=user data amount<10000; (5) system importance is important, customer account is not dynamic account, customer type is external, user data amount is >=10000, daily transaction volume or peak transaction volume is 100 million or more, user growth amount in a future setting period is 10% to 30%; (6) system importance is general, customer account is not dynamic account, customer type is external, user data amount is >=10000, daily transaction volume or peak transaction volume is 100 million or more, TPS peak value of transactions per second is 100 or more, user growth amount in a future setting period is 30% or more, growth amount of transaction volume in a future setting period is 10% or more.
[0025] For example, if rule (1) is taken as an example, the importance of system A is core, transaction B is a customer account transaction, and the customer type is an external customer, then transaction B can be considered as a transaction that needs to be inspected by system A.
[0026] In S120, the performance test tool runs the inspection scene and the inspection script corresponding to the target system in the inspection script set.
[0027] The performance test tool can be a load test tool for predicting system behavior and performance, and embodiments of the present application do not limit the specific performance test tool used, which is determined according to actual needs. For example, it can be a LoadRunner performance test tool.
[0028] It can be understood that, in order to test whether the system is perfect, whether all businesses can be efficiently processed, and whether the system meets the actual application situation, the actual application situation of the system needs to be simulated, and therefore, the inspection scene needs to be built.
[0029] The inspection scene can be considered as a test environment, which can be composed of pre-defined hardware devices, software systems, environmental resource configurations of the system, and data simulating actual transactions, so as to ensure the authenticity and accuracy of the test results.
[0030] The target system can be a subsystem with uniqueness in the entire system. For example, in a bank, the target system can be a subsystem with a unique number in the entire bank system, such as a personal core system, a credit card core system, a credit system, and an intelligent terminal system.
[0031] Embodiments of the present application can run the inspection scene and the inspection scripts corresponding to the target system in the inspection script set through the performance test tool. For example, when the target system is inspected, the built inspection scene and all inspection scripts related to the target system can be run through the performance test tool. The performance of the target system is inspected, and potential performance problems of the system are found.
[0032] S130, obtaining the inspection result of the target system according to the collected inspection test data.
[0033] After the performance test tool runs the inspection scene and the inspection scripts related to the target system, multiple inspections can be performed on the same inspection scene, and the performance test tool can be used to collect the inspection test data. The test data of multiple inspections can be compared and analyzed to obtain the inspection result of the target system. This provides an objective basis for the performance of the system.
[0034] The technical scheme of the embodiments of the present application can filter the transaction set to be inspected according to the set rules, and can generate an inspection script set for the transaction set. The performance test tool can be used to run the inspection scene and the inspection scripts corresponding to the target system in the inspection script set. The inspection result of the target system can be obtained according to the collected inspection test data. The above technical scheme uses the performance inspection method according to the system dimension, which can find the potential performance problems of the system, reduce the performance risk of the system in production, and improve the user experience.
[0035] Further, on the basis of the above-mentioned application embodiments, before the transaction set being inspected is screened according to the set rules, the method further comprises:
[0036] acquiring static data and actual transaction data used for building the inspection scene;
[0037] building the inspection scene according to the static data and the actual transaction data.
[0038] The static data can be used for necessary data required for building the inspection scene, for example, can be resource environment configuration data required by the target system and the corresponding test case, to build a test environment that can simulate the actual application situation of the system, and whether the test environment is available can be verified through the test case; and the actual transaction data can be historical actual transaction data, to ensure that the inspection scene is closer to the actual running situation of the system.
[0039] The application embodiment can first acquire the static data and the actual transaction data required for building the inspection scene, after successful acquisition, can build the inspection scene simulating the transaction scene and the system function according to the static data and the actual transaction data, and through effective resource preparation, the authenticity and correctness of the test result are ensured.
[0040] Further, on the basis of the above-mentioned application embodiments, the static data comprises:
[0041] a full target system list, used for recording business description information and service time of the target system;
[0042] environment resource configuration of the target system, used for recording server address, hardware configuration and software version of the target system;
[0043] a target system connectivity case set, used for recording associated systems of the target system.
[0044] The full target system list can be used for recording business description information and service time of the target system, and the full target system list also supports extensibility to meet more actual needs. For example, system name, system number and contact person can also be recorded; the environment resource configuration of the target system can be used for recording server address, hardware configuration and software version of the target system, and the environment resource configuration of the target system also supports extensibility, for example, system name, system number and contact person can also be recorded; the target system connectivity case set can be used for recording associated systems of the target system, and the target system connectivity case set also supports extensibility, for example, automation case number, case description and contact person can also be recorded.
[0045] The embodiment of the application can record the service description information and service time of the target system through the full target system list, can record the server address, hardware configuration and software version of the target system through the environment resource configuration of the target system, and can record the associated systems of the target system through the target system connectivity case set. The static data is prepared for building the inspection scene, the corresponding target system resource environment configuration is selected by the test personnel through the full target system list, the inspection scene is built through the target system resource environment configuration, and whether the inspection scene is available is verified through the target system connectivity case set, so that the efficiency of system performance inspection is improved.
[0046] Specifically, the system name of the full system list can be a system Chinese description, the system number rule can be a system name English capital letter string plus a system online month, a connection symbol "_" and a two-digit serial number, for example, ABC202101_01, the system number has uniqueness, the service description information can be a brief description of system function, the service time can be a service time period that the system can provide, and the contact person can be a default value or empty. The full system list table is shown in Table 1:
[0047] Table 1 Full system list table
[0048]
[0049] The system name of the environment resource configuration of the target system can be a system Chinese description, the system number rule can be a system name English capital letter string plus a system online month, a connection symbol "_" and a two-digit serial number, for example, ABC202101_01, the system number has uniqueness, the server address can be an address and port for providing services, the hardware configuration can be the size of central processing unit (CPU), memory, hard disk, storage and the like, the software version can be a description of database, middleware and the like version, and the contact person can be a default value or empty. The environment resource configuration table of the target system is shown in Table 2:
[0050] Table 2 Environment resource configuration table of target system
[0051]
[0052] The automatic case number of the target system connectivity case set can be the measured system number plus the transaction code plus the two-digit serial number, for example, ABC202101_01_ASDO12_01, the number has uniqueness, the case description can be A for the measured system, B and C for the associated systems, and the description is A system connectivity case, the associated system set can be (A, B, C), and the contact person can be a default value or empty. The target system connectivity case set table is shown in Table 3:
[0053] Table 3. Case Study Set of Target System Connectivity
[0054]
[0055] Furthermore, based on the above embodiments of the invention, after constructing the inspection scenario according to static data and actual transaction data, it also includes:
[0056] The usability of the inspection scenario was verified based on static data.
[0057] It should be noted that after building the inspection scenario based on static data and actual transaction data, the availability of the inspection scenario can also be verified based on the static data. Specifically, when it is necessary to inspect the target system, the environmental availability of the target system can be tested by obtaining the server address and connectivity test cases to ensure the correct construction of the inspection scenario and improve the stability of the target system inspection. Of course, if the target system is not detected, testers can build the environment of the target system and record the relevant information according to the rules for configuring the environment resources of the target system mentioned above.
[0058] Furthermore, based on the above embodiments of the invention, the difference between the proportion of the transaction volume of the inspected transaction in the inspection scenario and the proportion of the transaction volume of the same transaction in the actual transaction data is less than a set range.
[0059] The percentage of transaction volume can be the ratio of the transaction volume of a single transaction to the total transaction volume of the system within a unit of time.
[0060] In this embodiment of the invention, the transaction volume ratio of the inspected transaction in the inspection scenario can be configured according to the transaction volume ratio of the actual transaction data. Furthermore, the error value between the transaction volume ratio of the inspected transaction in the inspection scenario and the transaction volume ratio of the actual transaction data can be controlled within a certain range, making the constructed inspection scenario closer to the actual situation.
[0061] For example, in practice, if the average daily transaction volume of personal deposits is 100 transactions, accounting for 10% of the total daily transaction volume of the personal core system, and the average daily transaction volume of personal withdrawals is 200 transactions, accounting for 20% of the total daily transaction volume of the personal core system, then the proportion of the transaction volume of the transactions being inspected in the inspection scenario can be configured according to the actual proportion of the average daily transaction volume of personal deposits and personal withdrawals, or the configured proportion can be controlled within a set range.
[0062] Furthermore, based on the above embodiments, the invention also includes:
[0063] Simulate the concurrency of the transactions being inspected using performance testing tools.
[0064] The concurrency can be the number of connections or the number of users accessing the target system service at the same time.
[0065] In the embodiment of the application, during the running of the inspection scenario by the performance testing tool, the performance testing tool can simulate the concurrency of the transaction to be inspected, and by adjusting the concurrency, the system performance of the system under different concurrency levels, for example, the number of transactions processed per second (TPS), can be analyzed.
[0066] Further, on the basis of the above-mentioned embodiment of the application, the performance testing tool runs the inspection scenario and the inspection script corresponding to the target system in the inspection script set, comprising:
[0067] The performance testing tool runs the inspection scenario and the inspection script corresponding to the target system in the inspection script set N times.
[0068] The transaction volume proportion of the transaction to be inspected is adjusted according to the transaction volume proportion of the transaction in the last time.
[0069] In the embodiment of the application, the inspection scenario and the inspection script corresponding to the target system in the inspection script set can be run N times for the same inspection scenario, wherein N is an integer greater than 1, and the transaction volume proportion of the transaction to be inspected can be adjusted according to the transaction volume proportion of the transaction in the last time, that is, when the inspection scenario is first built, the transaction volume proportion of the inspection transaction needs to be configured according to the actual transaction data, and in the subsequent running times, the transaction volume proportion of the inspection transaction in the last time can be adjusted. To ensure that the simulated transaction situation is closer to the actual transaction situation. The test data obtained by N times of inspection can be used to obtain the performance result of the target system through comprehensive data analysis, and provide a more effective and objective basis for the system performance.
[0070] Embodiment two
[0071] Figure 2 An architecture diagram of an inspection system according to the second embodiment of the application is provided, which can be executed by a computer device.
[0072] As shown in Figure 2 The inspection system 20 comprises:
[0073] An inspection script generation device 201 is configured to filter the transaction set to be inspected according to a set rule, and generate an inspection script set for the transaction set;
[0074] An inspection script storage device 202 is configured to store the inspection script set;
[0075] The inspection device 203 is used for running the inspection scene and the inspection script corresponding to the target system in the inspection script set through the performance test tool, and obtaining the inspection result of the target system according to the collected inspection test data.
[0076] The inspection script generation device 201 can be used for screening the transaction set to be inspected according to the set rule, and generating the inspection script set corresponding to the transaction set one by one, facilitating the subsequent inspection work.
[0077] The inspection script storage device 202 can be used for storing the inspection script set, and the inspection script can include the system name, the system number, the transaction name, the script number and whether to inspect the attention transaction, etc.
[0078] The inspection script generation device 201 can be used for screening the transaction to be inspected according to the set rule, generating the inspection script set corresponding to the transaction, and transmitting the generated inspection script set to the inspection script storage device 202.
[0079] On the basis of the above embodiment, the inspection system 20 is further optimized, and further, Figure 3 The inspection system 20 provided in Embodiment 2 of the present application, the inspection system 20 further comprises:
[0080] The resource management device 204 is used for storing the static data used for building the inspection scene;
[0081] The inspection scene building device 205 is used for building the inspection scene according to the static data and the actual transaction data.
[0082] The resource management device 204 can include a full target system list, an environment resource configuration of the target system, and a target system connectivity case set; the full target system list can be used to record business description information and service time of the target system; the environment resource configuration of the target system can be used to record a server address, hardware configuration and software version of the target system; and the target system connectivity case set can be used to record a related system of the target system.
[0083] It should be noted that, in order to perform system-level performance inspection, a specific transaction in the system is not tested, therefore, the resource management device 204 is needed to store the target system list, the environment resource configuration of the target system, and the target system connectivity case set. The static data is prepared for building an inspection scene, so that a test personnel can select a corresponding target system resource environment configuration through the full target system list, build an inspection scene through the target system resource environment configuration, and verify whether the inspection scene is available through the target system connectivity case set, thereby improving the efficiency of system performance inspection.
[0084] According to the embodiment of the present application, the resource management device 204 can store the static data used for building an inspection scene, the inspection scene building device 205 can build an inspection scene according to the static data and actual transaction data, and the actual application of the system can be effectively simulated, so that potential performance problems of the system can be found.
[0085] It should be noted that the above are only the preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, re-adjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and more other equivalent embodiments can be included without departing from the concept of the present application, and the scope of the present application is determined by the appended claims.
Claims
1. A method of inspection, characterized by, The method comprises the following steps: acquiring static data used for building a patrol inspection scene and actual transaction data; building the patrol inspection scene according to the static data and the actual transaction data; wherein the static data comprises: a full-target system list for recording business description information and service time of a target system; environmental resource configuration of the target system for recording server address, hardware configuration and software version of the target system; a target system connectivity case set for recording associated systems of the target system; wherein availability of the patrol inspection scene is verified based on the server address of the target system and the target system connectivity case set; screening a transaction set to be inspected according to a set rule and generating a patrol inspection script set for the transaction set; running the patrol inspection scene and a patrol inspection script corresponding to the target system in the patrol inspection script set through a performance testing tool; obtaining a patrol inspection result of the target system according to collected patrol inspection test data.
2. The method of claim 1, wherein, A difference between a transaction volume proportion of the transaction to be inspected in the patrol inspection scene and a transaction volume proportion of the transaction in the actual transaction data is less than a set range.
3. The method of claim 1, wherein, The method further comprises the following steps: simulating a concurrency number of the transaction to be inspected through the performance testing tool.
4. The method of claim 1, wherein, The running of the patrol inspection scene and the patrol inspection script corresponding to the target system in the patrol inspection script set through the performance testing tool comprises the following steps: running the patrol inspection scene and the patrol inspection script corresponding to the target system in the patrol inspection script set through the performance testing tool N times; wherein N is an integer greater than 1, and a transaction volume proportion of the transaction to be inspected is adjusted according to a transaction volume proportion of the transaction in the last time.
5. The method of claim 1, wherein, The set rule is determined according to at least one of the following: system importance, customer account attribute, customer type, user data volume, user growth volume in a future set period, daily average transaction volume or peak transaction volume, transaction per second (TPS) peak value; growth volume of transaction volume in a future set period.
6. A patrol system characterized by comprising: The method comprises the following steps: a resource management device for storing static data used for building a patrol inspection scene; a patrol inspection scene building device for building the patrol inspection scene according to the static data and actual transaction data; wherein the static data comprises: a full-target system list for recording business description information and service time of a target system; environmental resource configuration of the target system for recording server address, hardware configuration and software version of the target system; a target system connectivity case set for recording associated systems of the target system; an availability detection device for verifying availability of the patrol inspection scene based on the server address of the target system and the target system connectivity case set; a patrol inspection script generation device for screening a transaction set to be inspected according to a set rule and generating a patrol inspection script set for the transaction set; a patrol inspection script storage device for storing the patrol inspection script set; a patrol inspection device for running the patrol inspection scene and a patrol inspection script corresponding to the target system in the patrol inspection script set through a performance testing tool and obtaining a patrol inspection result of the target system according to collected patrol inspection test data.
Citation Information
Patent Citations
Method for testing software performance
CN101576846A
Application inspection method and device
CN105118107A