CN114238155B - Test method, test platform, test device, server and storage medium - Google Patents
Test method, test platform, test device, server and storage medium Download PDFInfo
- Publication number
- CN114238155B CN114238155B CN202210175766.8A CN202210175766A CN114238155B CN 114238155 B CN114238155 B CN 114238155B CN 202210175766 A CN202210175766 A CN 202210175766A CN 114238155 B CN114238155 B CN 114238155B
- Authority
- CN
- China
- Prior art keywords
- test
- data
- interface
- information
- information interface
- 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.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 756
- 238000010998 test method Methods 0.000 title claims abstract description 14
- 238000011056 performance test Methods 0.000 claims abstract description 83
- 238000012545 processing Methods 0.000 claims abstract description 70
- 230000004044 response Effects 0.000 claims description 60
- 238000000034 method Methods 0.000 claims description 31
- 238000012546 transfer Methods 0.000 claims description 24
- 238000004891 communication Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 10
- 230000008676 import Effects 0.000 claims description 9
- 238000012544 monitoring process Methods 0.000 claims description 8
- 230000003321 amplification Effects 0.000 claims description 7
- 238000003199 nucleic acid amplification method Methods 0.000 claims description 7
- 230000003068 static effect Effects 0.000 claims description 4
- 230000009471 action Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 28
- 238000007726 management method Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000013434 data augmentation Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000013523 data management Methods 0.000 description 2
- 230000002045 lasting effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000003607 modifier Substances 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 239000000344 soap Substances 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a test method, a test platform, a test device, a test system, a server and a storage medium. The test method comprises the following steps: determining an information interface to be tested; determining test data and set parameters input into the test platform based on the information interface, wherein the test data comprises user information used for generating a test request, and the set parameters are used for determining a service model and a service scene for testing the information interface; and performing performance test of data processing capacity on the information interface based on the test data and the set parameters. In the application, the test data and the set parameters are input into the test platform to complete the test of the specific service scene corresponding to the information interface test request, so that the interface performance test of the information interface in the specific service scene can be realized through the test platform.
Description
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a testing method, a testing platform, a testing apparatus, a testing system, a server, and a storage medium.
Background
The performance test is to simulate various normal, peak and abnormal load conditions through an automatic test tool to test various performance indexes of the system. Performance testing often uses open source technology in the industry, but open source technology does not have test management attributes. In the performance test process, maintaining the performance test case to perform a reasonable performance test service scene is critical to the test process.
Disclosure of Invention
In order to solve the technical problems in the background art, the application provides a test method, a test platform, a test device, a test system, a server and a storage medium.
A test method provided in a first aspect of an embodiment of the present application includes:
determining an information interface to be tested;
determining test data and set parameters input into a test platform based on the information interface, wherein the test data at least comprises user information used for generating a test request, and the set parameters are at least used for determining a service scene for testing the information interface;
and performing performance test of data processing capacity on the information interface based on the test data and the set parameters.
In some embodiments, the information interface to be tested is a plurality of;
the determining of the test data and the setting parameters input into the test platform based on the information interface comprises:
determining test data corresponding to each information interface in a test platform service model based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
In some embodiments, the association relationship includes: the proportional relation between the number of the test requests received by the plurality of information interfaces in the same time period;
the determining the setting parameter for determining a service scenario for jointly testing a plurality of information interfaces based on the association relationship among the plurality of information interfaces includes:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in the combined test service scene.
In some embodiments, the performance test of the data processing capability includes at least one of the following test indicators:
average response time, transaction processing capacity per second, total number of transactions;
the performance test of the data processing capability of the information interface at least comprises one of the following steps:
sending the test request to a server to be tested, and testing the average response time of the information interface to the test request;
sending the test request to a server to be tested, and testing the transaction processing capacity of the information interface to the test request per second;
and sending the test request to a server to be tested, and testing the total transaction number of successful responses of the information interface to the test request.
In some embodiments, the information interfaces to be tested at least comprise an information interface supporting any one of the following protocols;
the protocol, comprising: hypertext transfer protocol http, hypertext transfer security protocol https, fixed-length message transfer control protocol, indefinite-length message transfer control protocol, and message protocol MQ.
In some embodiments, the setting parameters for determining the traffic scenario include at least one of:
the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the testing time of the information interface;
the user information includes at least one of:
user name, login password.
In some embodiments, the determining the test data input into the test platform comprises:
acquiring the test data;
classifying the test data based on data attributes of the test data, wherein the classified test data at least comprises: reuse type data or consumption type data;
the performance test of the data processing capability of the information interface based on the test data and the set parameters at least comprises the following steps:
performing a performance test on a plurality of the information interfaces based on the reuse type data, and/or,
and performing performance test on the single corresponding information interface based on the consumption type data.
A second aspect of the embodiments of the present application provides a test platform, which includes:
the test interface is used for determining an information interface to be tested;
the business model interface is used for determining test data corresponding to the information interface to be tested based on the information interface, wherein the test data at least comprises user information used for generating a test request;
a scene setting interface for determining the setting parameters during the information interface test, wherein the setting parameters are at least used for determining the service scene for testing the information interface;
and the operation monitoring interface is used for displaying the test result of the test index related to the data processing capability test of the information interface.
In some embodiments, it may further include:
the data amplification interface is used for acquiring amplified test data and is provided with an access control for accessing the database; and the service model interface reads the test data stored in the database by responding to the operation action of the access control.
In some embodiments, it may further include:
the test request interface is used for generating a test request based on the user information in the test data and sending the test request to a server to be tested through the information interface;
the test indexes related to the data processing capability test at least comprise one of the following indexes:
average response time, transaction processing capacity per second, total number of transactions.
In some embodiments, the scene setting interface includes:
the scene type configuration item is used for determining that the current test scene is a combined test scene or a single service case test scene;
the user loading strategy configuration item is used for determining whether the user loading strategy is to load all users immediately or to load a preset number of users at preset time intervals;
the running duration configuration item is used for determining the running duration of the test;
and the user release strategy configuration item is used for determining that the user release strategy is to release all users immediately or release a preset number of users at preset time intervals.
In some embodiments, further comprising a data definition interface, the data definition interface comprising:
a data type configuration item for determining whether a data type of the test data is reusable or consumable;
a data source configuration item for determining whether the data source is non-SOL, static SQL, or imported by a database;
the data source configuration item is used for acquiring a data source name and is communicated with the test environment database;
the SQL statement configuration item is used for acquiring an SQL statement, and the SQL statement is used for inquiring and using corresponding table data;
and the maximum import number configuration item is used for determining the maximum import number of the test data.
A third aspect of the embodiments of the present application provides a test apparatus, including:
the interface determining unit is used for determining an information interface to be tested;
a parameter determining unit, configured to determine, based on the information interface, test data and set parameters input in a test platform, where the test data at least includes user information used to generate a test request, and the set parameters are at least used to determine a service scenario for testing the information interface;
and the test unit is used for carrying out performance test on the data processing capacity of the information interface based on the test data and the set parameters.
In some embodiments, the information interface to be tested is a plurality of;
the parameter determination unit is configured to:
determining test data corresponding to each information interface in a test platform service model based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
In some embodiments, the association relationship includes: the proportional relation between the number of the test requests received by the plurality of information interfaces in the same time period;
the parameter determination unit is configured to:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in the combined test service scene.
In some embodiments, the performance test of the data processing capability includes at least one of the following test indicators:
average response time, transaction processing capacity per second, total number of transactions;
the test unit is for one of:
sending the test request to a server to be tested, and testing the average response time of the information interface to the test request;
sending the test request to a server to be tested, and testing the transaction processing capacity of the information interface to the test request per second;
and sending the test request to a server to be tested, and testing the total transaction number of successful responses of the information interface to the test request.
In some embodiments of the present invention, the,
the parameter determination unit is specifically configured to:
acquiring the test data;
classifying the test data based on data attributes of the test data, wherein the classified test data at least comprises: reuse type data or consumption type data;
the test unit is specifically configured to:
performing a performance test on a plurality of the information interfaces based on the reuse type data, and/or,
and performing performance test on the single corresponding information interface based on the consumption type data.
A fourth aspect of the embodiments of the present application provides a test system, including:
the test platform of the above embodiments.
A server according to a fifth aspect of embodiments of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect.
A sixth aspect of embodiments of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method according to the first aspect.
The test method provided by the embodiment of the application comprises the following steps: determining an information interface to be tested; determining test data and set parameters input into the test platform based on the information interface, wherein the test data comprises user information used for generating a test request, and the set parameters are used for determining a service scene for testing the information interface; and performing performance test of data processing capacity on the information interface based on the test data and the set parameters. In the application, the determination of the corresponding information interface test request and the test of the specific service scene during the information interface test are completed by inputting the test data and setting the parameters in the test platform, so that the interface test of the information interface in the specific service scene can be realized through the test platform.
Drawings
Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 is a schematic flow chart diagram illustrating a testing method of an embodiment of the present application;
FIG. 2 is a schematic diagram showing a test platform structure according to an embodiment of the present application;
FIG. 3 is a test flow diagram illustrating an embodiment of the present application;
FIG. 4 is a flowchart illustrating a test procedure when a test interface is added in the embodiment of the present application;
FIG. 5 is a test platform interface diagram illustrating an embodiment of the application;
FIG. 6 is a schematic diagram illustrating a basic information interface structure in the test platform according to the embodiment of the present application;
FIG. 7 is a schematic diagram illustrating a joint test structure of a service model interface in a test platform according to an embodiment of the present application;
FIG. 8A is a diagram illustrating a user profile operating in the test results of an embodiment of the present application;
FIG. 8B is a diagram illustrating a number of transactions per second curve in test results for an embodiment of the present application;
FIG. 8C is a diagram illustrating an average transaction response time curve in test results for an embodiment of the present application;
FIG. 8D is a diagram illustrating a total number of transactions per second curve in the test results of an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating operating parameters in a test platform according to an embodiment of the present application;
FIG. 10 is a schematic diagram showing a data amplification interface in the test platform according to the embodiment of the present application;
FIG. 11 is a diagram illustrating data definition in a test platform according to an embodiment of the present application;
FIG. 12 is a diagram illustrating a scenario setup in a test platform according to an embodiment of the present application;
FIG. 13 is a schematic diagram showing a basic information interface display in the test platform according to the embodiment of the present application;
fig. 14 is a schematic structural diagram showing a test apparatus according to an embodiment of the present application.
Detailed Description
For a better understanding of the present application, various aspects of the present application will be described in more detail with reference to the accompanying drawings. It should be understood that the detailed description is merely illustrative of exemplary embodiments of the present application and does not limit the scope of the present application in any way. Like reference numerals refer to like elements throughout the specification. The expression "and/or" includes any and all combinations of one or more of the associated listed items.
It will be further understood that the terms "comprises," "comprising," "has," "having," "includes" and/or "including," when used in this specification, specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof. Moreover, when a statement such as "one of". Furthermore, when describing embodiments of the present application, the use of "may" mean "one or more embodiments of the present application. Also, the term "exemplary" is intended to refer to an example or illustration.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Features, principles and other aspects of embodiments of the application are described in detail below.
The performance test is to simulate various normal, peak and abnormal load conditions through an automatic test tool to test various performance indexes of the system. The performance test uses the open source technology in the industry, but the open source technology does not have the test management attribute. In the performance test process, maintaining the performance test case to perform a reasonable performance test service scene is critical to the test process.
The embodiment of the application provides a test method. Fig. 1 is a schematic flow chart illustrating a test method according to an embodiment of the present application. As shown in fig. 1, the testing method includes:
in the present exemplary embodiment, the information interface for performing the test through the test platform may include: at least one access interface used in any platform such as a login interface, a viewing interface, a payment interface, a registration interface, etc. The login interface at least comprises a login interface for user name login. The viewing interface includes at least a viewing interface to view account information or product information. The payment interface includes at least a payment interface that needs to be entered when purchasing the service. The registration interface at least comprises a registration interface and the like during identity registration.
in the exemplary embodiment, the information interface may be tested on the test platform, the information interface may be tested by sending a test request (i.e., a test service case) to the test interface, and the access response capability of the server of the information interface to a large number of test requests may be detected.
In the exemplary embodiment, the test request may be generated directly on the test platform from user information in the test data input to the test platform. The user information at least comprises one of information such as a user name, a password, identity card information, an address to be accessed and the like.
In the exemplary embodiment, when the test platform sends a test request to test the information interface, a specific service scenario may be determined according to the set parameters. And testing the information interface under the determined service scene. Wherein the service scenario at least comprises: the number of the test requests sent at the same time, the information interfaces to be tested, the number of the test requests needed by one information interface, the time interval between two test requests corresponding to the same information interface, and the like.
The specific service scene during the test in the test platform can be specifically set through the setting parameters on the test platform, so that the service scene needing to be tested is determined.
And 12, performing performance test of data processing capacity on the information interface based on the test data and the set parameters.
In the exemplary embodiment, the setting parameters in the test platform can be configured according to the test requirements. For example, according to a specific service scenario, self-configuration is performed to complete setting parameters.
The test method provided by the embodiment of the application comprises the following steps: determining an information interface to be tested; determining test data and set parameters input into the test platform based on the information interface, wherein the test data at least comprises user information used for generating a test request, and the set parameters are at least used for determining a service scene for testing the information interface; and performing performance test of data processing capacity on the information interface based on the test data and the set parameters. In the application, the determination of the corresponding information interface test request and the test of the specific service scene during the information interface test are completed by inputting the test data and setting the parameters in the test platform, so that the interface test under the specific service scene of the information interface can be realized through the test platform, and the configuration management performance test assets are realized.
In some embodiments, the information interface to be tested is a plurality of;
in step 11, based on the information interface, determining test data and setting parameters input into the test platform, including:
determining test data corresponding to each information interface based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
In the present exemplary embodiment, when determining a service scenario, a scenario in which multiple information interfaces are simultaneously tested or a service model in which multiple information interfaces are simultaneously tested may be determined as needed. When a plurality of information interfaces are subjected to simultaneous joint test, the setting parameters can be determined according to the incidence relation among the information interfaces, and the method specifically comprises the following steps:
when the sequence of the test requests exists among the plurality of information interfaces, the time sequence of sending the test requests can be set according to the set parameters. For example, the first information interface is a login interface, the second information interface is a viewing interface, and the third information interface is a payment interface, so that a login request needs to be sent first when a test request is accessed, then a viewing request needs to be sent, and finally a payment request needs to be sent when a service is purchased. The sending sequence among the login request, the viewing request and the payment request can be determined by setting parameters. The service model in the application refers to a test mode for determining that a single information interface test or a combined test of a plurality of information interfaces is performed when the information interfaces are tested.
In the exemplary embodiment, the rate relationship among the test requests for the information interfaces can be determined by setting parameters in the test platform. Wherein, the rate relation at least comprises: and determining the ratio of the number of the test requests in the unit time corresponding to the first information interface to the number of the test requests in the unit time corresponding to the second information interface, and the like. For example, the first information interface is a viewing interface, the second information interface is a payment interface, and the number of times that the user views the shopping platform in practical application is greater than the number of times of payment, so that the number of times that the user views the shopping platform in unit time is also greater than the number of times of payment on average in unit time. Therefore, the proportional relation between the number of the test requests of the viewing interface and the payment interface in unit time can be determined according to actual conditions during testing. For example, the ratio of the number of test requests per unit time for the viewing interface to the payment interface is 3:1, etc.
During subsequent testing, the number of test requests in unit time between the first information interface and the second information interface can be controlled according to different rate relationships, and different test pressures between the first information interface and the second information interface are further controlled. I.e. the greater the number of test requests per unit of time, the greater the test pressure for the information interface. The larger the test pressure that the information interface can bear, the stronger the data processing capability of the information interface is, and the more stable the performance is.
In the exemplary embodiment, the service scene of the simultaneous test of the plurality of information interfaces is determined by setting parameters, so that the joint test can be performed according to the incidence relation among the information interfaces, and the test efficiency and the test quality are improved.
In some embodiments, the association relationship includes: the proportional relation between the number of the test requests received by the plurality of information interfaces in the same time period;
the determining the setting parameter for determining a service scenario for jointly testing a plurality of information interfaces based on the association relationship among the plurality of information interfaces includes:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in the combined test service scene.
In the exemplary embodiment, the quantity relationship among the test requests for the information interfaces can be determined by setting parameters in the test platform. Wherein, the quantity relation at least comprises: and determining the proportion between the number of the test requests corresponding to the first information interface and the number of the test requests corresponding to the second information interface. For example, the first information interface is a viewing interface, the second information interface is a payment interface, and the number of times that the shopping platform is viewed by the user in practical application is greater than the number of times that the shopping platform is paid, so that the proportional relation between the number of test requests between the viewing interface and the payment interface can be determined according to practical situations during testing. For example, the ratio between the number of test requests between the viewing interface and the payment interface is 3:1, etc.
In the present exemplary embodiment, both the rate relation and the number relation are embodied as one of the association relations. The magnitude relationship is mainly focused on reflecting different testing pressures carried by different information interfaces in the whole testing process. The rate relationship is mainly focused on different test pressures carried by different information interfaces within a certain time period in the test process.
In some embodiments, the performance test of the data processing capability includes at least one of the following test indicators:
average response time, transaction processing capacity per second, total number of transactions;
the performance test of the data processing capability of the information interface at least comprises one of the following steps:
sending the test request to a server to be tested, and testing the average response time of the information interface to the test request;
sending the test request to a server to be tested, and testing the transaction processing capacity of the information interface to the test request per second;
and sending the test request to a server to be tested, and testing the total transaction number of successful responses of the information interface to the test request.
In this exemplary embodiment, the test indexes of the performance test of the test information interface at least include: the average response time of the information interface to a large number of test requests, the capability of the information interface to respond to the test requests per second, i.e. the transaction processing capability per second, and the number of test requests responded to by the information interface within a predetermined time, i.e. the total number of transactions within the predetermined time. The indexes can be used as evaluation indexes for the performance test of the data processing capability of the information interface. The shorter the average response time is, the stronger the transaction processing capacity per second is, the more the total number of transactions in the preset time is, the stronger the response capacity of the information interface corresponding to the test request is, that is, the stronger the data processing capacity is, that is, the better the service performance of the server side is.
In the exemplary embodiment, the test platform may be connected to a server to be tested, and send a test request to the server to be tested to test the data processing performance of the information interface to be tested. The information interface may be a data interface integrated on a test system of the server to be tested.
In some embodiments, the information interfaces to be tested at least comprise an information interface supporting any one of the following protocols;
the protocol, comprising: hypertext transfer protocol http, hypertext transfer security protocol https, fixed-length message transfer control protocol, indefinite-length message transfer control protocol, and message protocol MQ.
In the exemplary embodiment, when the information interface test is performed through the test platform, the information interface test of a plurality of protocols can be supported. The method can support the test of the information interface under any one protocol of the hypertext transfer protocol http, the hypertext transfer security protocol https, the fixed-length message transfer control protocol, the indefinite-length message transfer control protocol and the message protocol MQ. When the device is used specifically, the data format of the test request supporting the communication of the corresponding protocol can be set according to the set parameters, and then the test request of the corresponding data format is sent to the information interface.
In some embodiments, the performing, based on the test data and the setting parameter, a performance test of the data processing capability on the information interface includes:
generating the test request based on the test data;
and sending the test request to a tested server based on the information interface to be tested. Wherein, the test platform is connected with the tested server.
In this exemplary embodiment, the generating the test request based on the test data at least includes: determining a request message format and/or a response message format;
generating a test request conforming to the request message format and/or the response message format based on the test data;
and sending a test request containing a request message and/or a response message to the server through the information interface to be tested. The request message format and the response message format can be determined according to the communication protocol of the information interface to be tested.
In some embodiments, the setting parameters for determining the traffic scenario include at least one of:
the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the testing time of the information interface;
the user information includes at least one of: user name, login password.
In the exemplary embodiment, fig. 9 is a schematic diagram illustrating operating parameters in a test platform according to an embodiment of the present application. As shown in fig. 9, the setting parameters include an operation parameter setting. The operation parameters include at least the number of operations and the iteration step size. The running times are determined as the testing times of the information interface; and the iteration step is determined as the request delay time between the adjacent test requests. As shown in fig. 9, the number of runs may be determined as 1, and the iteration step size may be determined as 1000ms, which is merely an example. The data loading mode is determined as the loading mode of the test data corresponding to the information interface; and the running time is determined as the test time of the information interface. When a specific test service scenario is determined, any service scenario can be set according to the setting parameters. The data loading mode at least comprises the following steps: and loading various data forms such as pictures, audio, video and the like. Such as face image recognition, voice recognition, etc.
In some embodiments, the determining test data input into the test platform comprises:
acquiring the test data;
classifying the test data based on data attributes of the test data, wherein the classified test data at least comprises: reuse type data or consumption type data;
and performing performance test on a plurality of information interfaces based on the reuse type data, and/or performing performance test on a single corresponding information interface based on the consumption type data.
In the exemplary embodiment, when the test platform obtains the test data, a data pool capable of processing ten thousand levels or more can be established, and the test data can be directly obtained from the database by connecting the data pool with the database. The test data can be classified according to the data attribute of the test data. The classified test data includes at least reuse type data and/or consumption type data. Wherein the reusable data comprises data that is reusable for multiple information interfaces, such as viewing interfaces for multiple different products on a platform, and the same user data can be reused to access multiple viewing interfaces. The consumable data includes data used when only one-time access is made to a single information interface, such as a one-time passcode for a payment interface on a purchasing platform.
In some embodiments, the determining test data input into the test platform comprises:
acquiring test data of a user;
identifying test data corresponding to a user name based on the user name;
and calling the test data of the user based on the identification information of the test data.
In the present exemplary embodiment, when obtaining test data, the test data corresponding to the user may be identified according to the user name; and calling the test data of the corresponding user according to the identification information, thereby being beneficial to quickly calling the test data of the corresponding user to carry out information interface test. For example, after a login test is implemented through a user name and a password, after login success information fed back by the server is received, identity information or other information corresponding to the user name can be called to perform a test of an information interface, or when user authentication information required by a response of the server is received, authentication information corresponding to the user can be called to be sent to the server for authentication.
In some embodiments, the performing the performance test on the data processing capability on the information interface includes:
determining a time threshold value of the information interface test and a transaction number threshold value of the response test request;
and if the testing time of the information interface continuous testing reaches the time threshold value and/or the transaction number responding to the testing request reaches the transaction number threshold value, stopping the performance testing of the information interface.
In the exemplary embodiment, when the information interface is tested by the test platform, the test stopping condition of the performance test of the information interface is determined. The stop test condition includes at least: the testing time reaches a set time threshold value and/or the number of transactions responding to the testing request reaches a set transaction number threshold value. For example, if the time threshold of the test time for the information interface a is set to 2 hours, the test request test for the information interface a lasting two hours can be performed. When the testing time reaches two hours, the testing platform can automatically stop sending the testing request aiming at the information interface A. Or, setting the number of transactions of the information interface a responding to the test request to 10000, and when the number of transactions of the information interface a responding to the test request reaches 10000, the test platform may automatically stop sending the test request for the information interface a. Through test data management, different data types are processed in the performance test process, and tens of thousands of levels of processing capacity and above can be supported.
In some embodiments, further comprising: determining a request message path and a response message path;
sending the test request based on the determined request message path;
receiving a response fed back by the server side based on the response message path;
wherein the sending the test request comprises: determining a request mode, a request data type, a message header and the like. The request mode may include POST and the like. The POST is used to send data to the server to create/update resources, which is one of HTTP hypertext protocol request methods. The request data type may include text, xml, and the like.
Fig. 2 is a schematic structural diagram illustrating a test platform according to an embodiment of the present application. As shown in fig. 2, the test platform of the present application includes: the system comprises a user display layer, an application service layer, a communication service layer, a basic service layer and a data service layer. The user presentation layer comprises a test platform web end; the application service layer comprises various environment data determination services such as test environment determination, serial number determination, a service data pool, a data function assistant, identity card number determination, data source determination and the like, performance test services such as performance service model determination, performance service scene execution, performance test report management and the like; the communication service layer comprises services such as communication processing, message management, process management, service management, component management, database operation, abnormal information processing, test engineering determination management and the like; the basic service layer comprises services such as project management, user authentication, authority management, scheduling management, system monitoring and the like; the data service layer comprises a cache service, a database persistent storage, a file system, a Git/svn version library service and the like. Wherein,
the test platform web end provides an operation interface for multiple users, and is convenient for unified management and test information sharing.
And the test environment configuration function is used for centrally organizing and managing the IP and the port information of the tested environment, and realizing one-time port information configuration addition and multiple references.
The method comprises serial number configuration, a service data pool, a data function assistant, identity card number configuration and data source configuration, provides flexible multiple data processing capability for an interface test request, configures and refers fields with uniqueness check in the test request for multiple times, reduces dependence on manual operation, and meets the requirement of checking the information of the unique identity card in financial services. The service data pool can meet the requirements of tens of thousands of orders and above.
And the performance service model configuration, the performance service scene execution and the performance test report management gradually realize the whole performance test process.
The communication service layer, the basic service layer and the data service layer provide the bottom layer technology implementation as a performance test platform, and have universality and universality compared with the current technical characteristics.
Fig. 3 is a test flow diagram illustrating an embodiment of the present application. As shown in fig. 3, the test procedure includes:
determining a performance test service case (including reference of an existing interface test case);
determining a performance test business model (comprising single-case test or multi-case combination);
determining a performance test service scene (comprising operation parameter settings such as the number of concurrent users, test time and iteration step length);
and obtaining test result analysis (including displaying test main indexes such as average response time, transaction number per second, total transaction number and the like).
Fig. 4 is a flowchart illustrating a test when a test interface is newly added according to an embodiment of the present application. As shown in fig. 4, in the testing process, if a new test case, i.e., a test request, is required, test data may be added to the file directory added in the number of interface cases, then an information interface to be tested is added, and a new test request is generated according to the new test data to test the new information interface.
The second aspect of the embodiments of the present application provides a test platform. FIG. 5 is a test platform interface diagram illustrating an embodiment of the application. As shown in fig. 5, the test platform includes:
a test interface 51 for determining an information interface to be tested;
a service model interface 52, configured to determine, based on the information interface, test data corresponding to the information interface to be tested, where the test data at least includes user information used for generating a test request;
a scene setting interface 53, configured to determine a setting parameter during the information interface test, where the setting parameter is at least used to determine a service scene for testing the information interface;
and the operation monitoring interface 54 is used for displaying the test result of the test index related to the data processing capability test of the information interface.
In the present exemplary embodiment, the test platform may include a plurality of test interfaces. The performance test of the information interface is executed through a plurality of test interfaces, including generating a test request, sending the test request (namely sending a transaction case), receiving a test response, displaying a test result, setting a service scene during the test, and the like.
In other embodiments, the plurality of test interfaces includes at least:
a test interface 51 for determining an information interface to be tested;
the service model interface 52 refers to an information interface to be tested, and obtains test data corresponding to the information interface to be tested, wherein the test data at least comprises user information for generating a test request;
a scene setting interface 53, which refers to a service model and determines a setting parameter when the information interface is tested, wherein the setting parameter is at least used for determining a service scene for testing the information interface; the service model can determine that the information interface is a single information interface test or a test mode of a plurality of information interfaces in a combined test when the information interface is tested.
And the operation monitoring interface 54 is used for monitoring the performance test of the data processing capacity of the information interface.
A scenario setting interface 53, configured to input setting parameters, where the setting parameters are at least used to determine a service scenario for testing the information interface, and the scenario setting interface includes: when a single information interface test is set in the scene setting interface, the corresponding setting parameters determine the service scene of the single information interface test, such as test time, running times, iteration step length and the like, or,
when a plurality of information interfaces are set in the scene setting interface 53 for joint testing, corresponding setting parameters determine the service scene during the joint testing, such as testing time, running times, iteration step length, proportion of testing request data volume, and the like.
Fig. 7 is a schematic diagram illustrating a service model interface joint test structure in the test platform according to the embodiment of the present application. As shown in FIG. 7, the business model interface 52 is also used to determine the information interface for the joint test during the joint test. For example, when joint testing is required, information interfaces, such as information interface a, information interface B, and information interface C, which perform joint testing simultaneously, may be determined in the business model interface for joint testing. The interface to be tested in combination is selected or loaded directly on the service model interface 52.
In some embodiments, it may further include:
a data augmentation interface for inputting augmented test data, the data augmentation interface having an access control for accessing a database; and the test platform reads the test data stored in the database by operating the access control.
In the present exemplary embodiment, fig. 10 is a schematic diagram illustrating a data amplification interface in a test platform according to an embodiment of the present application. As shown in fig. 10, the data amplification interface can be used to retrieve test data in the database that needs to be amplified. Such as the reusable data and the consumable data described in the above embodiments. When the test data is not sufficient or needs to be updated, the test data can be added through the data augmentation interface. And adding a data pool object on a data amplification interface, importing database information, and inputting an sql database to be inquired and matched. The data amplification interface can be added with test data, and has the functions of modification, deletion, duplication, effective state display, ineffective state display, connection test and the like. The validation status display is used to determine the valid status of the test data at which the test data is valid and available. The failure status display is used to determine that the test data is a failure status and that the data is not available. The connection test is used for establishing a connection test state of the test data, so that the test data can be called by the platform to carry out interface test.
Fig. 11 is a schematic diagram illustrating a data definition interface in a test platform according to an embodiment of the present application. As shown in FIG. 11, the data definition interface may show the data attributes of the test data. For example, whether the data type is reusable or consumable. Whether the data source is non-SOL, static SQL, or database import, etc., and the maximum number of imports, the data column in which the test data is located, and the sequence number in the data column, etc.
Fig. 12 is a schematic diagram illustrating a scenario setup in the test platform according to the embodiment of the present application. As shown in fig. 12, the scenario setting interface may display a scenario type, for example, whether the current test scenario is a mixed scenario (i.e., a joint test scenario) or a single service case test scenario. Besides, the user number, the user loading condition, the running duration, the user release and other conditions during the test can be displayed. The user loading case (policy) may include both the case of loading all users at once and the case of loading a batch of users at intervals, such as loading 10 users per second as shown in fig. 12. The user release case (policy) may include both a case where all users are released (stopped) at once and a case where a batch of users are released at intervals, for example, 10 users are released (stopped) every second as shown in fig. 12. The run duration includes: stopping the test when the operation is finished; and, run to a user specified or set time, such as a set day and set hours, minutes and seconds; and the running duration is indefinite, namely, a tester determines when to stop the test, and the test is stopped by acquiring a test stopping instruction input by the tester.
Fig. 13 is a schematic diagram illustrating a basic information interface display in the test platform according to the embodiment of the present application. As shown in fig. 13, the basic information may include information such as transaction interface name, creator and modifier of the test request, creation time and modification time, in addition to the request message path, response message path, communication type and transaction parameter list. The parameters in the transaction parameter list at least include a request URL path, a request mode, a request SOAP method, a request data type, a transmission header, and the like as shown in fig. 13.
In some embodiments, it may further include:
and the test request interface is used for generating a test request based on the user information in the test data and sending the test request to the server through the information interface.
A test result display interface for displaying the performance test result; wherein,
the performance test of the data processing capacity at least comprises one of the following test indexes:
average response time, transaction processing capacity per second, total number of transactions;
the display performance test result at least comprises one of the following:
displaying the average response time of the information interface to the test request;
displaying the transaction processing capacity of the information interface to the test data per second;
and displaying the total transaction number of the successful response of the information interface to the test request.
In the present exemplary embodiment, the test indexes of the performance test of the test information interface include: the average response time of the information interface to a large number of test requests, the capability of the information interface to respond to the test requests per second, i.e. the transaction processing capability per second, and the number of test requests responded to by the information interface within a predetermined time, i.e. the total number of transactions within the predetermined time. The indexes can be used as evaluation indexes for the performance test of the data processing capability of the information interface. The shorter the average response time is, the stronger the transaction processing capacity per second is, the more the total number of transactions in the preset time is, the stronger the response capacity of the information interface corresponding to the test request is, that is, the stronger the data processing capacity is, that is, the better the service performance of the server side is. The test indexes for identifying the test results can be displayed in a test result display interface. The request message format and the response message format determined in the test request can be determined and displayed in the test request interface.
In some embodiments, fig. 6 is a schematic diagram illustrating a basic information interface structure in a test platform according to an embodiment of the present application. As shown in fig. 6, the test platform further includes:
and the basic information interface is used for determining a request message path, a response message path, a communication type and a request parameter list of the test request. Wherein, the request parameters in the request parameter list include: request mode, request data type, message header, etc. The request means may include a POST. The POST is used to send data to the server to create/update resources, which is one of HTTP hypertext protocol request methods. The request data type may include text, xml, and the like.
In some embodiments, the scenario setup interface is also used to determine the number of users and user loading policies. The test request test can be carried out on the information interface by logging in a plurality of users. The user loading strategy can comprise that all the selected users are loaded at one time, and the users can also be loaded in batches according to a preset rule. Batch loading users according to a predetermined rule, comprising: and sequentially loading the users according to a set time interval or sequentially loading the users according to the number of the sent test requests. For example, a batch of users is loaded every hour, or every time the number of test requests reaches a predetermined number. The number of the loading users is controlled to control the number of the test requests, so that the performance test pressure of the performance test of the information interface is adjusted. The more the number of the requests sent in unit time is, the greater the test pressure of the information interface is; the longer the duration of the test, the greater the test pressure on the information interface.
In some embodiments, a monitoring interface may be operated to generate and display test reports. The test report contains the above test indexes and generates a test curve. The test report can simultaneously display the performance test results of a plurality of information interfaces and can compare the test results of a plurality of information interfaces of the same type. For example, the comparison of the test results between the first interface and the second interface in the plurality of viewing interfaces. The average response time of the first interface is compared with the average response time of the second interface, and so on. Other test indexes are not listed.
In some embodiments, further comprising: and the test file management interface is used for adding or deleting the acquired test files. For example, a text type test file is retrieved from a database and added, or an added audio format test file is deleted, etc.
In some embodiments, further comprising: and the service data pool interface is used for displaying the current state of each source data in the current data pool, such as whether the current data is valid or not, whether the current data is in use in a test request or not, and the like.
Fig. 8A to 8D are schematic diagrams illustrating curves of various test indexes in the test result of the embodiment of the present application. As shown in fig. 8A to 8D, a running user curve, a transaction per second curve, an average transaction response time curve, and a total number of transactions per second curve are included, respectively.
User curve: the magnitude of the pressure condition in the current performance testing business scenario is shown.
Transaction per second curve: and displaying the performance expression result of the interface request in the current performance test service scene, wherein the performance expression result corresponds to the average transaction response time. The test results of the two directly indicate whether the performance of the tested system meets the expected production requirements.
And the total transaction per second curve shows the sum of the transaction per second curves, the data is the same as the transaction per second curve when only one request is available, and the data is the sum of the transactions of a plurality of requests when a plurality of requests are available.
In some embodiments, the scene setting interface includes:
the scene type configuration item is used for determining that the current test scene is a combined test scene or a single service case test scene;
the user loading strategy configuration item is used for determining whether the user loading strategy is to load all users immediately or to load a preset number of users at preset time intervals;
the running duration configuration item is used for determining the running duration of the test;
and the user release strategy configuration item is used for determining that the user release strategy is to release all users immediately or release a preset number of users at preset time intervals.
In the present exemplary embodiment, the configuration of the scenario type configuration item, the user loading policy configuration item, the operation duration configuration item, and the user releasing policy configuration item may be performed in the scenario setting interface.
In some embodiments, further comprising a data definition interface, the data definition interface comprising:
a data type configuration item for determining whether a data type of the test data is reusable or consumable;
a data source configuration item for determining whether the data source is non-SOL, static SQL, or imported by a database;
the data source configuration item is used for acquiring a data source name and is communicated with the test environment database;
the SQL sentence configuration item is used for acquiring the SQL sentences which are used for inquiring and using corresponding table data;
and the maximum import number configuration item is used for determining the maximum import number of the test data.
In the exemplary embodiment, the data definition interface may perform a data type configuration item, a data source configuration item, an SQL statement configuration item, and a maximum import number configuration item.
The third aspect of the embodiments of the present application provides a test apparatus. Fig. 14 is a schematic structural diagram showing a test apparatus according to an embodiment of the present application. As shown in fig. 14, the test apparatus includes:
an interface determination unit 71, configured to determine an information interface to be tested;
a parameter determining unit 72, configured to determine, based on the information interface, test data and set parameters input in a test platform, where the test data at least includes user information used to generate a test request, and the set parameters are at least used to determine a service scenario for testing the information interface;
and the test unit 73 is configured to perform a performance test of the data processing capability on the information interface based on the test data and the setting parameter.
In the exemplary embodiment, the test request may be generated directly on the test platform from user information in the test data input to the test platform. The user information at least comprises one of information such as a user name, a password, identity card information, an address to be accessed and the like.
In the exemplary embodiment, when the test platform sends a test request to test the information interface, a specific service scenario may be determined according to the set parameters. And testing the information interface under the determined service scene. Wherein the service scenario at least comprises: the number of the test requests sent at the same time, the information interfaces to be tested, the number of the test requests needed by one information interface, the time interval between two test requests corresponding to the same information interface, and the like.
The specific service scene during the test in the test platform can be specifically set through the setting parameters on the test platform, so that the service scene needing to be tested is determined.
In the present exemplary embodiment, the information interface for performing the test through the test platform may include: and the access interface is used in any platform such as a login interface, a viewing interface, a payment interface, a registration interface and the like. The login interface at least comprises a login interface for user name login. The viewing interface includes at least a viewing interface to view account information or product information. The payment interface includes a payment interface that needs to be entered when the service is purchased. The registration interface comprises a registration interface in identity registration and the like.
The test method provided by the embodiment of the application comprises the following steps: determining an information interface to be tested; determining test data and set parameters input into the test platform based on the information interface, wherein the test data at least comprises user information used for generating a test request, and the set parameters are at least used for determining a service scene for testing the information interface; and performing performance test of data processing capacity on the information interface based on the test data and the set parameters. According to the method and the device, the determination of the corresponding information interface test request and the test of the specific service scene during the information interface test are completed by inputting the test data and setting the parameters in the test platform, so that the interface test under the specific service scene of the information interface can be realized through the test platform.
In some embodiments, the information interface to be tested is a plurality of;
the parameter determination unit is configured to:
determining test data corresponding to each information interface based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
In the present exemplary embodiment, when determining a service scenario, a scenario in which multiple information interfaces are simultaneously tested or a service model in which multiple information interfaces are simultaneously tested may be determined as needed. When a plurality of information interfaces are simultaneously tested in a combined manner, the setting parameters can be determined according to the incidence relation among the information interfaces, and the method comprises the following steps:
when the sequence of the test requests exists among the plurality of information interfaces, the time sequence of sending the test requests can be set according to the set parameters. For example, the first information interface is a login interface, the second information interface is a viewing interface, and the third information interface is a payment interface, and at this time, when the test request is accessed, the login request needs to be sent first, then the viewing request needs to be sent, and finally the payment request needs to be sent when the service is purchased. The sending sequence among the login request, the viewing request and the payment request can be determined by setting parameters.
In the exemplary embodiment, the proportion of the test requests among the information interfaces can be determined by setting parameters in the test platform. Which comprises the following steps: the ratio of the number of test requests in unit time corresponding to the first information interface to the number of test requests in unit time corresponding to the second information interface, and the like.
In the exemplary embodiment, the service scene of the simultaneous test of the plurality of information interfaces is determined by setting parameters, so that the joint test can be performed according to the incidence relation among the information interfaces, and the test efficiency and the test quality are improved.
The parameter determination unit is configured to:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in the combined test service scene.
In the exemplary embodiment, the quantity relationship among the test requests for the information interfaces can be determined by setting parameters in the test platform. Wherein, the quantity relation at least comprises: and determining the proportion between the number of the test requests corresponding to the first information interface and the number of the test requests corresponding to the second information interface.
In some embodiments, the performance test of the data processing capability includes at least one of the following test indicators:
average response time, transaction processing capacity per second, total number of transactions;
the performance test of the data processing capability of the information interface at least comprises one of the following steps:
testing the average response time of the information interface to the test request;
testing the transaction processing capacity of the information interface to the test request per second;
and testing the total transaction number of successful response of the information interface to the test request.
In the present exemplary embodiment, the test indexes of the performance test of the test information interface include: the average response time of the information interface to a large number of test requests, the capability of the information interface to respond to the test requests per second, i.e. the transaction processing capability per second, and the number of test requests responded to by the information interface within a predetermined time, i.e. the total number of transactions within the predetermined time. The indexes can be used as evaluation indexes for the performance test of the data processing capability of the information interface. The shorter the average response time is, the stronger the transaction processing capacity per second is, the more the total number of transactions in the preset time is, the stronger the response capacity of the information interface corresponding to the test request is, that is, the stronger the data processing capacity is, that is, the better the service performance of the server side is.
In some embodiments, the information interfaces to be tested at least comprise an information interface supporting any one of the following protocols;
the protocol, comprising: hypertext transfer protocol http, hypertext transfer security protocol https, fixed-length message transfer control protocol, indefinite-length message transfer control protocol, and message protocol MQ.
In the exemplary embodiment, when the information interface test is performed through the test platform, the information interface test of a plurality of protocols can be supported. The method can support the test of the information interface under any one protocol of the hypertext transfer protocol http, the hypertext transfer security protocol https, the fixed-length message transfer control protocol, the indefinite-length message transfer control protocol and the message protocol MQ. When the device is used specifically, the data format of the test request supporting the communication of the corresponding protocol can be set according to the set parameters, and then the test request of the corresponding data format is sent to the information interface.
In some embodiments, the test unit is to:
generating the test request based on the test data;
and sending the test request to a server based on the information interface to be tested.
In this exemplary embodiment, the generating the test request based on the test data at least includes: determining a request message format and/or a response message format;
generating a test request conforming to the request message format and/or the response message format based on the test data;
and sending a test request containing a request message and/or a response message to the server through the information interface to be tested. The request message format and the response message format can be determined according to the communication protocol of the information interface to be tested.
In some embodiments, the setting parameters for determining the traffic scenario include at least one of:
the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the testing time of the information interface;
the user information includes at least one of: user name, login password.
In this exemplary embodiment, the setting parameter for determining the service scenario may further include a running number, which is determined as a test number of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; and the running time is determined as the test time of the information interface. When a specific test service scenario is determined, any service scenario can be set according to the setting parameters.
In some embodiments, the test data acquisition unit is further included to:
acquiring the test data;
classifying the test data based on data attributes of the test data, wherein the classified test data at least comprises: reuse type data and/or consumption type data;
and performing performance test on a plurality of information interfaces based on the reuse type data, and/or performing performance test on a single corresponding information interface based on the consumption type data.
In the exemplary embodiment, when the test platform obtains the test data, a data pool capable of processing ten thousand levels or more can be established, and the test data can be directly obtained from the database by connecting the data pool with the database. The obtained test data can be classified according to data attributes of the data. The classified test data includes reusable data and/or consumable data. Wherein the reusable data comprises data that is reusable for a plurality of information interfaces, such as viewing interfaces for a plurality of different products on a platform, and the same user data is reusable for accessing a plurality of viewing interfaces. The consumable data includes data used when only one-time access is made to a single information interface, such as a one-time passcode for a payment interface on a purchasing platform.
In some embodiments, the test data acquisition unit is further included to:
acquiring test data of a user;
identifying test data corresponding to a user name based on the user name;
and calling the test data of the user based on the identification information of the test data.
In the present exemplary embodiment, when obtaining test data, the test data corresponding to the user may be identified according to the user name; and calling the test data of the corresponding user according to the identification information, thereby being beneficial to quickly calling the test data of the corresponding user to carry out information interface test. For example, after a login test is implemented through a user name and a password, after login success information fed back by the server is received, identity information or other information corresponding to the user name can be called to perform a test of an information interface, or when user authentication information required by a response of the server is received, authentication information corresponding to the user can be called to be sent to the server for authentication.
In some embodiments, the test unit is further to:
determining a time threshold value of the information interface test and a transaction number threshold value of the response test request;
and if the testing time of the information interface continuous testing reaches the time threshold value and/or the transaction number responding to the testing request reaches the transaction number threshold value, stopping the performance testing of the information interface.
In the present exemplary embodiment, when an information interface test is performed by a test platform, a stop test condition for stopping a performance test of the information interface may be determined. The stop test condition includes: the testing time reaches a set time threshold value and/or the number of transactions responding to the testing request reaches a set transaction number threshold value. For example, if the time threshold of the test time for the information interface a is set to 2 hours, the test request test for the information interface a lasting two hours can be performed. When the testing time reaches two hours, the testing platform can automatically stop sending the testing request aiming at the information interface A. Or, setting the number of transactions of the information interface a responding to the test request to 10000, and when the number of transactions of the information interface a responding to the test request reaches 10000, the test platform may automatically stop sending the test request for the information interface a.
An embodiment of the present application further provides a test system, including:
the test platform of the above embodiments.
In this exemplary embodiment, the test system includes the test platform and each interface of the test platform, and implements performance test on the information interface.
A server according to a fifth aspect of the embodiments of the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the above embodiments.
A sixth aspect of the embodiments of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method in the above embodiments.
The beneficial technical effects of the technical scheme include:
1. the performance test service model and the performance test service scene are realized, and the performance test assets are configured and managed. Mainly described in the business model management and business scenario content: the business model is used for realizing the design link of test cases in the performance test, the combination of multiple test cases, the setting of case occupation ratio and the like. A single-case or multi-case mixed model can be set in the service model according to test requirements, and the model starts performance tests after being directly quoted in a service scene.
2. And the performance verification content in the software technology is realized by combining the bottom communication engine. The platform supports main stream communication protocols such as http, https, TCP fixed length, TCP indefinite length, MQ and the like, and supports processing of a plurality of message formats such as json, xml and key value.
3. And the performance test report is managed, and the performance test result output and data generation are more convenient. Referring to the description of the test report, key index information such as ART (average response time), TPS (transaction processing capability per second), total number of transactions, etc. can be provided.
4. And test data management realizes different data type processing in the performance test process and can support tens of thousands of levels of processing capacity and above. The database is connected with reference to the use instruction content of the data pool, and the introduction of ten thousand levels and more of test data amount from the database can be supported.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (20)
1. A method of testing, comprising:
determining an information interface to be tested;
determining test data and set parameters input into a test platform based on the information interface, wherein the test data at least comprises user information used for generating a test request, and the set parameters are at least used for determining a service scene for testing the information interface; wherein the setting parameters for determining the service scenario include: the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the time length of the testing time of the information interface; wherein, the determining the test data input into the test platform comprises: acquiring the test data; classifying the test data based on the data attribute of the test data, wherein the classified test data at least comprises: reuse type data or consumption type data;
performing performance test of data processing capacity on the information interface based on the test data and the set parameters; wherein the performance test of the data processing capability of the information interface based on the test data and the setting parameters at least comprises: and performing performance test on a plurality of information interfaces based on the reuse type data, and/or performing performance test on a single corresponding information interface based on the consumption type data.
2. The method of claim 1, wherein the information interface to be tested is plural;
the determining of the test data and the setting parameters input into the test platform based on the information interface comprises:
determining test data corresponding to each information interface in a service model of a test platform based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
3. The method of claim 2, wherein the associating comprises: the proportional relation between the number of the test requests received by the plurality of information interfaces in the same time period;
the determining the setting parameter for determining a service scenario for jointly testing a plurality of information interfaces based on the association relationship among the plurality of information interfaces includes:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in the combined test service scene.
4. The method of claim 1, wherein the performance test of the data processing capability comprises at least one of the following test criteria:
average response time, transaction processing capacity per second, total number of transactions;
the performance test of the data processing capability of the information interface at least comprises one of the following steps:
sending the test request to a server to be tested, and testing the average response time of the information interface to the test request;
sending the test request to a server to be tested, and testing the transaction processing capacity of the information interface to the test request per second;
and sending the test request to a server to be tested, and testing the total transaction number of successful responses of the information interface to the test request.
5. The method of claim 1, wherein the information interfaces to be tested comprise at least an information interface supporting any one of the following protocols;
the protocol, comprising: hypertext transfer protocol http, hypertext transfer security protocol https, fixed-length message transfer control protocol, indefinite-length message transfer control protocol, and message protocol MQ.
6. The method of claim 1, wherein the user information comprises at least one of: a user name, a login password, identity card information and an address to be accessed.
7. A test platform, comprising:
the test interface is used for determining an information interface to be tested;
the business model interface is used for determining test data corresponding to the information interface to be tested based on the information interface, wherein the test data at least comprises user information used for generating a test request;
a scene setting interface for determining the setting parameters during the information interface test, wherein the setting parameters are at least used for determining the service scene for testing the information interface; wherein the setting parameters for determining the service scenario include: the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the time length of the testing time of the information interface;
a data definition interface, the data definition interface comprising: a data type configuration item for determining whether a data type of the test data is reusable or consumable; a data source configuration item for determining whether the data source is non-SOL, static SQL, or imported by a database; the data source configuration item is used for acquiring the name of the data source; the SQL statement configuration item is used for acquiring an SQL statement, and the SQL statement is used for inquiring and using corresponding table data; the maximum import number configuration item is used for determining the maximum import number of the test data;
and the operation monitoring interface is used for displaying the test result of the test index related to the data processing capability test of the information interface.
8. The test platform of claim 7, further comprising:
the data amplification interface is used for acquiring amplified test data and is provided with an access control for accessing the database; and the service model interface reads the test data stored in the database by responding to the operation action of the access control.
9. The test platform of claim 7, further comprising:
the test request interface is used for generating a test request based on the user information in the test data and sending the test request to a server to be tested through the information interface;
the test indexes related to the data processing capability test at least comprise one of the following indexes:
average response time, transaction processing capacity per second, total number of transactions.
10. The test platform of claim 7, wherein the scenario setup interface comprises:
the scene type configuration item is used for determining that the current test scene is a combined test scene or a single service case test scene;
the user loading strategy configuration item is used for determining whether the user loading strategy is to load all users immediately or to load a preset number of users at preset time intervals;
the running duration configuration item is used for determining the running duration of the test;
and the user release strategy configuration item is used for determining that the user release strategy is to release all users immediately or release a preset number of users at preset time intervals.
11. The test platform of claim 7, further comprising:
and the basic information interface is used for determining a request message path, a response message path, a communication type and a request parameter list of the test request.
12. The test platform of claim 7, wherein the operation monitoring interface is specifically configured to generate and display a test report, and the test report simultaneously displays performance test results of a plurality of information interfaces and compares the test results of a plurality of information interfaces of the same type.
13. The test platform of claim 7, further comprising: and the service data pool interface is used for displaying the current state of each source data in the current data pool.
14. A test apparatus, comprising:
the interface determining unit is used for determining an information interface to be tested;
a parameter determining unit, configured to determine, based on the information interface, test data and set parameters input in a test platform, where the test data at least includes user information used to generate a test request, and the set parameters are at least used to determine a service scenario for testing the information interface; wherein the setting parameters for determining the service scenario include: the running times are determined as the testing times of the information interface; iteration step length is determined as the request delay time between adjacent test requests; the data loading mode is determined as the loading mode of the test data corresponding to the information interface; the running time is determined as the time length of the testing time of the information interface; the parameter determination unit is specifically configured to: acquiring the test data; classifying the test data based on data attributes of the test data, wherein the classified test data at least comprises: reuse type data or consumption type data;
the test unit is used for carrying out performance test of data processing capacity on the information interface based on the test data and the set parameters; wherein the test unit is specifically configured to: and performing performance test on a plurality of information interfaces based on the reuse type data, and/or performing performance test on a single corresponding information interface based on the consumption type data.
15. The apparatus of claim 14, wherein the information interface to be tested is plural;
the parameter determining unit is configured to:
determining test data corresponding to each information interface in a test platform service model based on a plurality of information interfaces;
and determining the set parameters for determining the service scene of the joint test of the information interfaces based on the incidence relation among the information interfaces.
16. The apparatus of claim 15, wherein the association comprises: the proportional relation between the number of the test requests received by the plurality of information interfaces in the same time period;
the parameter determination unit is configured to:
and determining the set parameters based on the proportional relationship, wherein the set parameters are used for determining the data volume of the test data corresponding to each information interface in a joint test service scene.
17. The apparatus of claim 14, wherein the performance test of the data processing capability comprises at least one of the following test criteria:
average response time, transaction processing capacity per second, total number of transactions;
the test unit is for one of:
sending the test request to a server to be tested, and testing the average response time of the information interface to the test request;
sending the test request to a server to be tested, and testing the transaction processing capacity of the information interface to the test request per second;
and sending the test request to a server to be tested, and testing the total transaction number of successful responses of the information interface to the test request.
18. A test system, comprising:
the test platform of any one of claims 7-13.
19. A server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 6 are implemented when the processor executes the program.
20. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210175766.8A CN114238155B (en) | 2022-02-25 | 2022-02-25 | Test method, test platform, test device, server and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210175766.8A CN114238155B (en) | 2022-02-25 | 2022-02-25 | Test method, test platform, test device, server and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114238155A CN114238155A (en) | 2022-03-25 |
CN114238155B true CN114238155B (en) | 2022-05-06 |
Family
ID=80748349
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210175766.8A Active CN114238155B (en) | 2022-02-25 | 2022-02-25 | Test method, test platform, test device, server and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114238155B (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5881237A (en) * | 1996-09-10 | 1999-03-09 | Ganymede Software, Inc. | Methods, systems and computer program products for test scenario based communications network performance testing |
CN109101415A (en) * | 2018-06-25 | 2018-12-28 | 平安科技(深圳)有限公司 | Interface test method, system, equipment and the storage medium compared based on database |
CN111045921A (en) * | 2019-10-12 | 2020-04-21 | 平安普惠企业管理有限公司 | Automatic interface testing method and device, computer equipment and storage medium |
CN111767229A (en) * | 2020-06-30 | 2020-10-13 | 北京来也网络科技有限公司 | Performance test method, device and equipment |
CN112882927A (en) * | 2021-01-26 | 2021-06-01 | 北京高因科技有限公司 | Interface automatic testing method, device, equipment and medium |
CN113704089B (en) * | 2021-07-26 | 2023-01-10 | 中国铁道科学研究院集团有限公司通信信号研究所 | Full-scene GSM-R interface server test platform system |
-
2022
- 2022-02-25 CN CN202210175766.8A patent/CN114238155B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114238155A (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210303778A1 (en) | Virtual Redaction Service | |
CN108334436B (en) | Application software optimization method, device, equipment and computer readable storage medium | |
US8095975B2 (en) | Dynamic document merging method and system | |
US8572023B2 (en) | Data services framework workflow processing | |
WO2007064434A2 (en) | On-line business-packet creator for electronic forms | |
CN112488652B (en) | Work order auditing method, system, terminal and storage medium | |
CN111045935A (en) | Automatic version auditing method, device, equipment and storage medium | |
CN116048987A (en) | Processing method, device, electronic equipment, system and storage medium for flow business | |
CN113849473A (en) | Operation recording method, operation recording device, electronic device, and storage medium | |
CN112905492B (en) | Verification method and device | |
US20160275454A1 (en) | Populating Forms for Electronic Signature on a Mobile Device | |
CN114238155B (en) | Test method, test platform, test device, server and storage medium | |
CN112015715A (en) | Industrial Internet data management service testing method and system | |
CN112565064B (en) | Service processing method, device, equipment and medium based on remote multimedia | |
CN109816342B (en) | Contract management method, contract management device, terminal and computer readable storage medium | |
CN107707328B (en) | Abstract information transmission method and device | |
US11972018B2 (en) | Data categories for purpose-based processing of personal data | |
US11989121B2 (en) | Feature interaction continuity testing | |
US20120089989A1 (en) | Systems and methods for executing and implementing computer processes in process environments | |
CN118036054A (en) | Data management system based on test platform and use method | |
CN113205318A (en) | Voucher display method, voucher generation device and computer storage medium | |
CN118394642A (en) | Verification method and device | |
CN115774721A (en) | Method, system and device for self-defining declaration form based on government affair informatization scene | |
CN118410785A (en) | Project processing method, apparatus, device, medium, and program product | |
CN113515438A (en) | Test account management method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |