CN116561010A - Interface test method, device, computer equipment and storage medium - Google Patents

Interface test method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116561010A
CN116561010A CN202310635795.2A CN202310635795A CN116561010A CN 116561010 A CN116561010 A CN 116561010A CN 202310635795 A CN202310635795 A CN 202310635795A CN 116561010 A CN116561010 A CN 116561010A
Authority
CN
China
Prior art keywords
test
interface
task
performance
target
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
CN202310635795.2A
Other languages
Chinese (zh)
Inventor
王江娟
苏喆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310635795.2A priority Critical patent/CN116561010A/en
Publication of CN116561010A publication Critical patent/CN116561010A/en
Pending legal-status Critical Current

Links

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/3684Test management for test design, e.g. generating new test cases
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application relates to an interface test method, an interface test device, a computer device, a storage medium and a computer program product. To the field of financial technology or other related fields. The method comprises the following steps: responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial business system; constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating test execution rules of the corresponding test scenes; testing the target interface by adopting each test scene set to obtain a test result of the interface test task; and displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task. By adopting the method, whether the interface of the current version iteration meets the performance requirement can be effectively determined, and the performance testing efficiency of the interface in the version iteration is improved.

Description

Interface test method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of financial technology, and in particular, to an interface testing method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of agile development version iteration and the development of service design aiming at a mainstream system, an interface can provide a communication function for each system, and performance test is required to be carried out on the interface in the version iteration.
In the traditional technology, the performance test aiming at the interface can support various pressure test scenes, but the evaluation of the performance test of the interface caused by the version iteration is lacked to comprehensively consider, and whether the interface of the version iteration meets the performance requirement cannot be effectively determined.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an interface testing method, apparatus, computer device, storage medium, and computer program product that can comprehensively consider evaluation of performance tests of interfaces caused by version iterations.
In a first aspect, the present application provides an interface testing method, the method including:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
Testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In one embodiment, the obtaining, in response to the operation of creating the interface test task, the test requirement information of the interface test task includes:
responding to the operation of creating an interface test task, and acquiring interface information and test parameters of the target interface to be tested; the interface information is used for representing the version iteration condition of the target interface, and the test parameters are used for testing different performance indexes of the target interface;
and obtaining the test requirement information of the interface test task according to the interface information and the test parameters.
In one embodiment, the constructing a test scenario set under different test scenarios according to the test requirement information includes:
configuring test execution rules under different test scenes according to the test parameters in the test requirement information;
And constructing a test scene set corresponding to each test scene based on the test execution rule.
In one embodiment, the testing the target interface by using each test scenario set to obtain a test result of the current interface test task includes:
configuring the test environment of the interface test task; the test environment is consistent with the test environment of the last interface test task of the interface test task;
and testing the target interface according to the test scene set corresponding to each test scene by adopting the test environment to obtain performance test results aiming at different performance indexes of the target interface, wherein the performance test results are used as test results of the interface test task.
In one embodiment, the interface test comparison information includes comparison information of different performance indexes, and displaying the interface test comparison information according to the historical test result of the target interface and the test result of the current interface test task includes:
acquiring a historical test result of the target interface; the historical test results comprise historical performance test results corresponding to the performance indexes;
Aiming at each performance index, displaying a historical performance test result corresponding to the performance index and comparison information of the performance test result corresponding to the performance index in the test results of the interface test task;
the comparison information of the different performance indexes is used for judging whether the target interface under the current version meets the performance optimization requirement.
In one embodiment, the obtaining the historical test result of the target interface includes:
obtaining comparison range information; the comparison range information is used for indicating historical versions to be compared;
and acquiring a test result of the target interface under the historical version to be compared as the historical test result.
In one embodiment, the method further comprises:
acquiring performance index searching information; the performance index searching information comprises target performance indexes to be searched and searching conditions corresponding to the target performance indexes, wherein the searching conditions are used for searching out target index values of the target performance indexes;
and in the testing process of the target interface, if the current index value of the target performance index is detected to meet the searching condition, taking the current index value as the target index value of the target performance index.
In a second aspect, the present application further provides an interface testing apparatus, the apparatus comprising:
the test requirement information acquisition module is used for responding to the operation of creating the interface test task and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
the test scene set construction module is used for constructing test scene sets under different test scenes according to the test requirement information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
the test result obtaining module is used for testing the target interface by adopting each test scene set to obtain the test result of the interface test task;
the test comparison information display module is used for displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
Constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
Testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
According to the interface test method, the device, the computer equipment, the storage medium and the computer program product, the test requirement information of the interface test task is obtained by responding to the operation of creating the interface test task, the interface test task is used for performing performance test on a target interface in a current version in a financial service system, then test scene sets in different test scenes are constructed according to the test requirement information, the test scene sets are used for indicating test execution rules of the corresponding test scenes, the target interface is tested by adopting each test scene set, the test result of the interface test task is obtained, further, according to the historical test result of the target interface and the test result of the interface test task, the historical test result is obtained by the historical interface test task based on a historical version in a version iteration process, the scene set is constructed based on user requirements, automatic performance press test and data comparison are provided for the performance test of the interface in the version iteration, whether the interface in the version iteration meets the performance requirement can be effectively determined, and the performance test efficiency of the interface in the version iteration is improved.
Drawings
FIG. 1 is a flow chart of an interface testing method in one embodiment;
FIG. 2 is a schematic diagram of an interface performance test architecture in one embodiment;
FIG. 3 is a flow chart illustrating a test comparison information display step in one embodiment;
FIG. 4 is a flow chart of an interface testing method according to another embodiment;
FIG. 5 is a block diagram of an interface test apparatus according to one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
With the development of agile development version iteration and the development of Service design for mainstream systems, such as SOA structure (Service-oriented architecture) and micro-Service architecture, an interface can provide a communication function for each system, and performance test is required to be performed on the interface in version iteration.
With the increase of the requirements of performance pressure measurement, various performance pressure measurement tools can be adopted to meet the pressure measurement requirements of different types, for example, the enterprise architecture can be tested based on LoadRunner, and the system can be suitable for automatic load testing of various architectures so as to predict the system behaviors and evaluate the system performances; the Jmeter is a java-based pressure testing tool, can be used for performance testing of static and dynamic resources, can be used for deriving a plurality of cloud testing tools based on the Jmeter based on high expandability, can simulate real service scenes of massive users, and can comprehensively verify the performance, capacity and stability of service sites.
The pressure test scene supported by the comprehensive analysis related performance test platform can comprise a test scene supporting a single interface and a mixed interface, or various support scenes such as a scene formed by creating a link, a serial link or a group of sets of serial links. For example, a link may be an interface, page, etc., which is the smallest unit; the serial links can be an ordered set (transaction) of links containing a certain business meaning, and the links can only carry out the association of the input and output parameters in the same serial link; a link scenario may be a set of aggregate composition scenarios for a serial link that may simulate the aggregate morphology of various ordered aggregates, such as complex traffic scenarios. However, the evaluation of the interface performance test caused by the version iteration is not comprehensively considered in the supporting scene, and whether the interface of the version iteration meets the performance requirement cannot be effectively determined.
Aiming at the situation, the embodiment of the application provides an interface testing method for realizing automatic performance testing based on a user demand construction scene set, and can provide automatic performance pressure testing and data comparison for the conventional performance testing of the interface in version iteration.
In one embodiment, as shown in fig. 1, an interface testing method is provided, where the method is applied to a terminal to illustrate the method, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 101, responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task;
the interface testing task can be used for performing performance testing on a target interface in a current version in the financial service system, such as performing performance testing on an iterated interface in the current version in the financial service system.
As an example, the interface test task may be a task for routine performance testing of the interface in a version iteration.
In practical application, the operation of creating the interface test task can be responded, for example, the corresponding interface test task can be created by receiving the press test requirement trigger input by the user, and the test requirement information of the interface test task can be obtained according to the interface information and the test parameters by acquiring the interface information and the test parameters of the target interface to be tested.
Specifically, as shown in fig. 2, the interface performance test system architecture diagram based on the interface test method of the present application can show interactions among various parts in the interface performance test process. The interface performance test system can comprise a user demand layer, a pressure test scene set layer, a test execution layer and a result display layer, wherein the test execution layer can comprise a flow decision layer, a pressure test task execution layer, a service operation data collection layer and a service health condition analysis layer.
In an example, in the automated interface performance test of the version iteration, a user may enter the requirement of the interface compression test in the version iteration (i.e. the test requirement information of the interface test task) through a user requirement layer in the interface performance test system, for example, may enter the type, the comparison symbol, the numerical value and other test parameters corresponding to the interface test, and may also include other required input information, which is not limited in this embodiment.
In an alternative embodiment, when the user fills in the pressure measurement requirement, the pressure measurement requirement in the previous iteration version can be copied to serve as the requirement of the interface pressure measurement in the current iteration version, and a new test requirement can be refilled for the interface pressure measurement of the current iteration version.
102, constructing a test scene set under different test scenes according to the test requirement information;
the test scene set may be used to indicate a test execution rule of a corresponding test scene, for example, different press test scene sets corresponding to one interface may be used as execution rules of a test execution layer.
In a specific implementation, test execution rules under different test scenes can be configured according to test parameters in the acquired test requirement information, and then test scene sets corresponding to different test scenes, such as different pressure test scene sets corresponding to one interface, can be constructed based on the test execution rules.
In an example, as shown in fig. 2, through a pressure measurement scene set layer in the interface performance test system, the pressure measurement requirements (i.e. test requirement information) input by a user can be automatically converted into pressure measurement rules under corresponding pressure measurement scenes, and the pressure measurement scene set (i.e. test scene set) can be constructed according to the pressure measurement rules to perform pressure measurement, so that automatic performance test based on the user requirements can be realized.
Step 103, testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
After the test scene set is obtained, the test environment of the interface test task can be configured, so that the test environment is consistent with the test environment of the last interface test task of the interface test task, further, the configured test environment can be adopted, the target interface is tested according to the test scene set corresponding to each test scene, and the performance test result aiming at different performance indexes of the target interface is obtained and is used as the test result of the interface test task.
For example, as shown in fig. 2, through a test execution layer in the interface performance test system, the press test may be performed according to an output scenario set of the press test scenario set layer, that is, each test scenario set is adopted to test the target interface, and further through a result display layer in the interface performance test system, the press test result may be displayed according to the scenario set, for example, the test result obtained when the type may be respectively displayed as the CPU utilization rate, the system throughput TPS, and the response time AVG.
And 104, displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task.
The historical test result can be obtained based on a historical interface test task of a historical version in a version iteration process.
After the test result of the current interface test task is obtained, the historical performance test results corresponding to different performance indexes such as CPU utilization rate, system throughput TPS, response time AVG and the like can be obtained by obtaining the historical test result of the target interface, so that the historical performance test results corresponding to the performance indexes can be displayed for each performance index, and the comparison information of the performance test results corresponding to the performance indexes in the test result of the current interface test task, namely the interface test comparison information is displayed for the current interface test task.
In an example, as shown in fig. 2, through a result display layer in the interface performance test system, the interface compression test result of the current version iteration and the history compression test result can be compared and displayed according to the dimension of the scene, so that a comparison result with the history test data can be provided, and a user can determine whether the interface in the current version iteration meets the performance requirement.
In an alternative embodiment, by acquiring the comparison range information, a history version to be compared can be determined, and then a test result of the target interface under the history version to be compared can be acquired as a history test result, for example, the history data of the history interface test task corresponding to the last three history versions can be acquired for the current interface test task.
Compared with the traditional method, the technical scheme of the embodiment realizes the comparison of the interface performance test result of the current version and the historical data based on the environment interface condition, the user requirement and the interface historical performance test data by constructing a scene set based on the user requirement to perform the automatic performance test and providing the automatic performance test and the data comparison for the performance test of the interface in the version iteration under the same set of pressure test environment so as to evaluate the interface performance test result of the current version in a full-scale automatic manner; compared with other pressure measurement scenes, the supported pressure measurement scene is added, the performance of the interface is considered from the dimension of version iteration, the user is more convenient to submit the pressure measurement requirement, the pressure measurement can be intelligently carried out, the pressure measurement result is displayed and compared with the historical result, the performance of the current system can be more intuitively, efficiently and accurately estimated, and the degree of automation is improved.
According to the interface test method, the test requirement information of the interface test task is obtained by responding to the operation of creating the interface test task, then the test scene sets under different test scenes are constructed according to the test requirement information, the target interfaces are tested by adopting the test scene sets to obtain the test results of the interface test task, further the interface test comparison information is displayed according to the historical test results of the target interfaces and the test results of the interface test task, the scene set is constructed based on the user requirement, automatic performance press test and data comparison are provided for the performance test of the interfaces in the version iteration, whether the interfaces of the version iteration meet the performance requirement can be effectively determined, and the interface performance test efficiency in the version iteration is improved.
In one embodiment, the obtaining the test requirement information of the interface test task in response to the operation of creating the interface test task may include the following steps:
responding to the operation of creating an interface test task, and acquiring interface information and test parameters of the target interface to be tested; the interface information is used for representing the version iteration condition of the target interface, and the test parameters are used for testing different performance indexes of the target interface; and obtaining the test requirement information of the interface test task according to the interface information and the test parameters.
In practical application, a user may enter the requirement of the interface pressure test in the iteration of the current version through a user requirement layer in the interface performance test system, that is, the interface information and the test parameters of the target interface to be tested, for example, the interface and the method (that is, the interface information of the target interface) which need the iterative pressure test at the current time and the test parameters such as the type, the comparison symbol, the numerical value and the like corresponding to the interface test may be entered through copying the pressure test requirement in the previous iteration version or filling in new test requirement again.
By way of example, the types may be CPU usage, system throughput TPS, response time AVG; the symbol may be less than, greater than, less than or equal to, greater than or equal to; the value may correspond to a type selection, such as 0-100 when the type selects the CPU, 0-10000000 pen/second when the type selects TPS, and 0-3000 ms when the type selects AVG.
For example, in the case where the type is selected as CPU, the comparison symbol is selected to be less than or equal to the numeric input 80, it means that the TPS, response time, memory usage of the server of the interface when the demand focuses on CPU usage to be less than 80%;
for another example, when the type is selected to be TPS and the symbol is selected to be less than or equal to 1000, the requirement is concerned about the CPU usage rate of the server resource, the service response time, the memory usage rate of the server, and the like when the TPS is less than or equal to 1000 pens/sec.
For another example, when the type is AVG, the symbol selection is less than or equal to 3000 ms, and the numerical value input is 3000 ms or less, the required service response time is less than or equal to 3000 ms, which means the maximum TPS that the service can reach, the CPU utilization of the server resource, the memory utilization of the server, and the like.
In this embodiment, by responding to the operation of creating the interface test task, the interface information and the test parameters of the target interface to be tested are obtained, and then the test requirement information of the interface test task is obtained according to the interface information and the test parameters, so that data support is provided for constructing a scene set based on the user requirement.
In one embodiment, the constructing the test scene set under different test scenes according to the test requirement information may include the following steps:
Configuring test execution rules under different test scenes according to the test parameters in the test requirement information; and constructing a test scene set corresponding to each test scene based on the test execution rule.
In an example, through the pressure measurement scene set layer in the interface performance test system, the pressure measurement requirement (i.e. test requirement information) input by the user can be automatically converted into the pressure measurement rule (i.e. test execution rule) under the corresponding pressure measurement scene, and then the pressure measurement scene set (i.e. test scene set) can be constructed according to the pressure measurement rule to perform pressure measurement.
For example, different compression testing scene sets corresponding to one interface can be used as the execution rule of the test execution layer:
the type may be a type selected in a user requirement layer; symbol may be a symbol selected in the user requirements layer; the value may be a value entered in the user requirements layer; CPU (Central processing Unit) threshold 、TPS threshold Pen/second, AVG threshold The user may be provided with indicators such as boundary conditions or constraints. Under different test scenes, the requirements on CPU utilization rate, system throughput TPS and response time AVG are different.
In this embodiment, by configuring test execution rules under different test scenarios according to test parameters in the test requirement information, and further constructing a test scenario set corresponding to each test scenario based on the test execution rules, it is possible to implement an automated performance test by constructing the scenario set based on user requirements.
In one embodiment, the testing the target interface by using each test scenario set to obtain the test result of the current interface test task may include the following steps:
configuring the test environment of the interface test task; the test environment is consistent with the test environment of the last interface test task of the interface test task; and testing the target interface according to the test scene set corresponding to each test scene by adopting the test environment to obtain performance test results aiming at different performance indexes of the target interface, wherein the performance test results are used as test results of the interface test task.
As an example, different performance indicators may correspond to different performance types, e.g., the performance indicators may be CPU utilization, system throughput TPS, response time AVG.
In a specific implementation, the test execution layer may obtain a scene rule (i.e., a test scene set corresponding to a test scene) input by a user in the pressure test scene layer, for example, a server CPU usage threshold CPU in the current iteration interface pressure test scene threshold Service number of transactions processed per second, i.e. threshold TPS of TPS threshold Pen/second, threshold for average response time, i.e. AVG threshold s, the automated performance pressure measurement mode may then be selected to perform the pressure measurement. When the test execution layer is used for pressing, the test environment of the iterative pressing test of the interface needs to be ensured to be the same set as the environment of the previous version pressing test, so that the situation that the pressing test results cannot be compared and have no references due to environmental differences can be avoided.
In this embodiment, by configuring the test environment of the current interface test task and further adopting the test environment, the target interface is tested according to the test scene set corresponding to each test scene, so as to obtain the performance test results of different performance indexes of the target interface, and the performance test results are used as the test results of the current interface test task, so that the effective comparison of the compression test results can be ensured, and the situation of no referential caused by environmental differences is avoided.
In one embodiment, as shown in fig. 3, the interface test comparison information may include comparison information of different performance indexes, and displaying the interface test comparison information according to the historical test result of the target interface and the test result of the current interface test task may include the following steps:
step 301, obtaining a history test result of the target interface; the historical test results comprise historical performance test results corresponding to the performance indexes;
Step 302, for each performance index, displaying a historical performance test result corresponding to the performance index, and comparing information of the performance test result corresponding to the performance index in the test results of the interface test task;
the comparison information of different performance indexes can be used for judging whether the target interface under the current version meets the performance optimization requirement.
In an example, based on the result display layer, the test results of the interface in different pressure test scenarios (i.e. the test results of the interface test task) can be obtained, and then can be compared with the corresponding pressure test results in the historical iteration version of the interface (i.e. the historical test results of the target interface), for example, the comparison result with the latest 3 historical iteration versions can be displayed. Therefore, the performance improvement effect of the optimized pressure measurement at this time and whether the optimization meets the performance requirement can be visually compared.
In yet another example, the interface crush results of the current version of the iteration may be compared with the historical crush results according to different scenario dimensions:
1. in the case of a type-selection CPU, it can be shown that when CPU < = CPU threshold When the system is used, the system throughput tps, the response time avg and the change curve which is compared with the latest three historical versions corresponding to the current pressure measurement interface (namely the target interface) are obtained;
2. In case of type-selective TPS, it can be shown when TPS < = TPS threshold When the method is used, the CPU utilization rate of the server, the average response time avg and the change curve which is compared with the latest three historical versions are corresponding to the current pressure measurement interface;
3. in case of type-selective AVG, it can be shown when AVG < = AVG threshold And the tps corresponding to the current pressure measurement interface, the CPU utilization rate of the server and the change curve compared with the latest three historical versions.
And the user can judge whether the interface iteration meets the requirement according to the comparison of the current pressure measurement result and the historical result.
In this embodiment, by acquiring the historical test result of the target interface, and further displaying the historical performance test result corresponding to the performance index for each performance index, the comparison information of the performance test result corresponding to the performance index in the test result of the interface test task can intelligently perform the pressure test and display the comparison between the pressure test result and the historical result, so that the performance of the current system can be estimated more intuitively, efficiently and accurately, and the degree of automation is improved.
In one embodiment, the obtaining the historical test result of the target interface may include the following steps:
Obtaining comparison range information; the comparison range information is used for indicating historical versions to be compared; and acquiring a test result of the target interface under the historical version to be compared as the historical test result.
In practical application, preset comparison range information can be obtained, a historical version to be compared, such as a last 3 historical iteration version, can be determined based on the comparison range information, and the comparison range can be flexibly set, so that a test result of the target interface under the historical version to be compared, such as a corresponding pressure test result in the historical iteration version of the target interface, can be obtained, and is used as a historical test result for comparison.
In an example, the obtained crush test results corresponding to the historical iteration version may include, for a plurality of interfaces, historical data under different crush test scenarios corresponding to each interface.
In this embodiment, by acquiring the comparison range information, and further acquiring the test result of the target interface under the historical version to be compared, as the historical test result, the method can provide automatic data comparison for the performance test of the interface in the version iteration.
In one embodiment, the method may further comprise the steps of:
Acquiring performance index searching information; the performance index searching information comprises target performance indexes to be searched and searching conditions corresponding to the target performance indexes, wherein the searching conditions are used for searching out target index values of the target performance indexes; and in the testing process of the target interface, if the current index value of the target performance index is detected to meet the searching condition, taking the current index value as the target index value of the target performance index.
In a specific implementation, after the pressure measurement task is started, the system may increase or end the pressure measurement according to the returned result of the flow decision (such as determining the optimal pressure flow), so as to find the optimal TPS (i.e. the target index value of the target performance index) within the condition range.
For example, the system may automatically begin performing the test based on various constraints (e.g., scene rules) preset by the user, and setting boundary conditions that stop the press test, and then may initiate the press test task. As shown in fig. 2, the service operation data collection layer may collect performance index data and pressure test index data in real time, determine an optimal concurrency number through the flow decision layer, and send a test instruction to the pressure test engine through the pressure test task execution layer according to the concurrency number in each scene, so as to control the pressure test engine to execute the pressure test or stop the pressure test until the TPS meeting the optimal condition is searched out to stop the pressure sending.
In this embodiment, by acquiring the performance index searching information, and further in the testing process of the target interface, if it is detected that the current index value of the target performance index meets the searching condition, the current index value is used as the target index value of the target performance index, so that the interface of the current version can be realized, and the optimal TPS can be automatically found and pressed.
In one embodiment, as shown in FIG. 4, a flow diagram of another interface testing method is provided. In this embodiment, the method includes the steps of:
in step 401, in response to the operation of creating the interface test task, the interface information and the test parameters of the target interface to be tested are obtained, and the test requirement information of the interface test task is obtained according to the interface information and the test parameters. In step 402, according to the test parameters in the test requirement information, the test execution rules under different test scenarios are configured, and based on the test execution rules, a test scenario set corresponding to each test scenario is constructed. In step 403, a test environment of the interface test task is configured; the test environment is consistent with the test environment of the last interface test task of the interface test task. In step 404, a test environment is adopted, and according to a test scene set corresponding to each test scene, a target interface is tested, so as to obtain performance test results aiming at different performance indexes of the target interface, and the performance test results are used as test results of the current interface test task. In step 405, a historical test result of the target interface is obtained; the historical test results comprise historical performance test results corresponding to the performance indexes. In step 406, for each performance index, the historical performance test result corresponding to the performance index is displayed, and the comparison information of the performance test result corresponding to the performance index in the test result of the current interface test task is displayed. It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of an interface testing method, which is not described herein.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an interface testing device for realizing the above related interface testing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the interface testing device provided below may be referred to the limitation of the interface testing method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 5, there is provided an interface test apparatus comprising:
the test requirement information obtaining module 501 is configured to obtain test requirement information of an interface test task in response to an operation of creating the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
the test scene set construction module 502 is configured to construct a test scene set under different test scenes according to the test requirement information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
a test result obtaining module 503, configured to test the target interface with each test scenario set, to obtain a test result of the current interface test task;
the test comparison information display module 504 is configured to display interface test comparison information according to a historical test result of the target interface and a test result of the current interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In one embodiment, the test requirement information acquisition module 501 includes:
The interface information and test parameter acquisition sub-module is used for responding to the operation of creating an interface test task and acquiring the interface information and test parameters of the target interface to be tested; the interface information is used for representing the version iteration condition of the target interface, and the test parameters are used for testing different performance indexes of the target interface;
and the test requirement information obtaining sub-module is used for obtaining the test requirement information of the interface test task according to the interface information and the test parameters.
In one embodiment, the test scenario set construction module 502 includes:
the test execution rule configuration sub-module is used for configuring test execution rules under different test scenes according to the test parameters in the test requirement information;
and the test scene set obtaining submodule is used for constructing test scene sets corresponding to the test scenes based on the test execution rules.
In one embodiment, the test result obtaining module 503 includes:
the test environment configuration sub-module is used for configuring the test environment of the interface test task; the test environment is consistent with the test environment of the last interface test task of the interface test task;
And the interface testing sub-module is used for testing the target interface according to the testing scene set corresponding to each testing scene by adopting the testing environment to obtain performance testing results aiming at different performance indexes of the target interface, and the performance testing results are used as the testing results of the interface testing task.
In one embodiment, the interface test comparison information includes comparison information of different performance indicators, and the test comparison information presentation module 504 includes:
a history test result obtaining sub-module, configured to obtain a history test result of the target interface; the historical test results comprise historical performance test results corresponding to the performance indexes;
the comparison display sub-module is used for displaying historical performance test results corresponding to the performance indexes according to each performance index, and comparing information of the performance test results corresponding to the performance indexes in the test results of the interface test task;
the comparison information of the different performance indexes is used for judging whether the target interface under the current version meets the performance optimization requirement.
In one embodiment, the historical test result acquisition submodule includes:
The comparison range determining unit is used for obtaining comparison range information; the comparison range information is used for indicating historical versions to be compared;
and the history test result obtaining unit is used for obtaining the test result of the target interface under the history version to be compared as the history test result.
In one embodiment, the apparatus further comprises:
the search information acquisition module is used for acquiring performance index search information; the performance index searching information comprises target performance indexes to be searched and searching conditions corresponding to the target performance indexes, wherein the searching conditions are used for searching out target index values of the target performance indexes;
and the target index value obtaining module is used for taking the current index value as the target index value of the target performance index if the current index value of the target performance index is detected to meet the searching condition in the testing process of the target interface.
The respective modules in the above-described interface test apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an interface test method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
Displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In one embodiment, the processor, when executing the computer program, also implements the steps of the interface test method in the other embodiments described above.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In one embodiment, the computer program when executed by the processor also implements the steps of the interface test method in the other embodiments described above.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
In one embodiment, the computer program when executed by the processor also implements the steps of the interface test method in the other embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. An interface testing method, the method comprising:
responding to the operation of creating the interface test task, and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
constructing a test scene set under different test scenes according to the test demand information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
Testing the target interface by adopting each test scene set to obtain a test result of the interface test task;
displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
2. The method according to claim 1, wherein the obtaining the test requirement information of the present interface test task in response to the operation of creating the interface test task includes:
responding to the operation of creating an interface test task, and acquiring interface information and test parameters of the target interface to be tested; the interface information is used for representing the version iteration condition of the target interface, and the test parameters are used for testing different performance indexes of the target interface;
and obtaining the test requirement information of the interface test task according to the interface information and the test parameters.
3. The method according to claim 1, wherein constructing a test scenario set in different test scenarios according to the test requirement information comprises:
Configuring test execution rules under different test scenes according to the test parameters in the test requirement information;
and constructing a test scene set corresponding to each test scene based on the test execution rule.
4. The method of claim 1, wherein the testing the target interface with each set of test scenarios to obtain the test result of the current interface test task comprises:
configuring the test environment of the interface test task; the test environment is consistent with the test environment of the last interface test task of the interface test task;
and testing the target interface according to the test scene set corresponding to each test scene by adopting the test environment to obtain performance test results aiming at different performance indexes of the target interface, wherein the performance test results are used as test results of the interface test task.
5. The method according to claim 1, wherein the interface test comparison information includes comparison information of different performance indexes, and the displaying interface test comparison information according to the historical test result of the target interface and the test result of the current interface test task includes:
Acquiring a historical test result of the target interface; the historical test results comprise historical performance test results corresponding to the performance indexes;
aiming at each performance index, displaying a historical performance test result corresponding to the performance index and comparison information of the performance test result corresponding to the performance index in the test results of the interface test task;
the comparison information of the different performance indexes is used for judging whether the target interface under the current version meets the performance optimization requirement.
6. The method of claim 5, wherein the obtaining historical test results for the target interface comprises:
obtaining comparison range information; the comparison range information is used for indicating historical versions to be compared;
and acquiring a test result of the target interface under the historical version to be compared as the historical test result.
7. The method according to any one of claims 1 to 6, further comprising:
acquiring performance index searching information; the performance index searching information comprises target performance indexes to be searched and searching conditions corresponding to the target performance indexes, wherein the searching conditions are used for searching out target index values of the target performance indexes;
And in the testing process of the target interface, if the current index value of the target performance index is detected to meet the searching condition, taking the current index value as the target index value of the target performance index.
8. An interface testing apparatus, the apparatus comprising:
the test requirement information acquisition module is used for responding to the operation of creating the interface test task and acquiring the test requirement information of the interface test task; the interface test task is used for performing performance test on a target interface in a current version in the financial service system;
the test scene set construction module is used for constructing test scene sets under different test scenes according to the test requirement information; the test scene set is used for indicating the test execution rule of the corresponding test scene;
the test result obtaining module is used for testing the target interface by adopting each test scene set to obtain the test result of the interface test task;
the test comparison information display module is used for displaying interface test comparison information according to the historical test result of the target interface and the test result of the interface test task; the historical test result is obtained based on a historical interface test task of a historical version in a version iteration process.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310635795.2A 2023-05-31 2023-05-31 Interface test method, device, computer equipment and storage medium Pending CN116561010A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310635795.2A CN116561010A (en) 2023-05-31 2023-05-31 Interface test method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310635795.2A CN116561010A (en) 2023-05-31 2023-05-31 Interface test method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116561010A true CN116561010A (en) 2023-08-08

Family

ID=87501850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310635795.2A Pending CN116561010A (en) 2023-05-31 2023-05-31 Interface test method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116561010A (en)

Similar Documents

Publication Publication Date Title
WO2022089652A1 (en) Method and system for processing data tables and automatically training machine learning model
CN114238085A (en) Interface testing method and device, computer equipment and storage medium
CN116561010A (en) Interface test method, device, computer equipment and storage medium
CN116302867A (en) Behavior data analysis method, apparatus, computer device, medium, and program product
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN115587805B (en) Laboratory environment test project determining method and device and environment comprehensive test evaluation method and device
CN113656022B (en) Software development method and device, computer equipment and storage medium
CN117522296A (en) Auditing flow generation method, auditing flow generation device, computer equipment and storage medium
CN116881116A (en) Interface test method, apparatus, computer device, storage medium, and program product
CN117130909A (en) Test analysis method, apparatus, device, storage medium, and program product
CN118132656A (en) Knowledge graph construction method, knowledge graph construction device, computer equipment and storage medium
CN117435478A (en) Program logic function detection method, device, computer equipment and storage medium
CN117435589A (en) Data transfer method, device, computer equipment and storage medium
CN117667999A (en) Data pushing method, device, computer equipment and computer readable storage medium
CN117172720A (en) Audit and doubt point tracking and checking method, system, computer equipment and storage medium
CN118012752A (en) Application program testing method, computer device and storage medium
CN117436974A (en) Product recommendation method, device, computer equipment and storage medium
CN116738960A (en) Document data processing method, system, computer equipment and storage medium
CN118154300A (en) Mortgage parameter processing method, mortgage parameter processing device, computer equipment and storage medium
CN117331812A (en) Service code verification method, device, computer equipment, storage medium and product
CN118152291A (en) Interface coverage rate statistical method, device, storage medium and computer equipment
CN117376114A (en) Parameter configuration method, device, computer equipment and storage medium
CN117057524A (en) Task allocation method, device, computer equipment and storage medium
CN117453957A (en) Resource processing method, device, computer equipment and storage medium
CN114329918A (en) Analysis method, device, equipment and storage medium of component software system

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