CN115543768A - System interface test method, device and system - Google Patents

System interface test method, device and system Download PDF

Info

Publication number
CN115543768A
CN115543768A CN202110738560.7A CN202110738560A CN115543768A CN 115543768 A CN115543768 A CN 115543768A CN 202110738560 A CN202110738560 A CN 202110738560A CN 115543768 A CN115543768 A CN 115543768A
Authority
CN
China
Prior art keywords
test
interface
round
access
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110738560.7A
Other languages
Chinese (zh)
Inventor
王党军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110738560.7A priority Critical patent/CN115543768A/en
Publication of CN115543768A publication Critical patent/CN115543768A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The application discloses a system interface testing method, device and system. Wherein, the method comprises the following steps: receiving a plurality of N-th round access requests for accessing a tested interface in an M-th time period, and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, wherein M and N are positive integers; responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface; and when the Nth round of access requests reach a test ending condition, determining a test result of the tested interface according to the N-round test indexes. The method and the device solve the technical problems that due to the fact that a method for carrying out pressure testing on a data transmission interface of a system is lacked, developers cannot accurately solve the bottleneck of the performance of the system, and cannot timely optimize the performance of the system.

Description

System interface test method, device and system
Technical Field
The present application relates to the field of data interface performance testing, and in particular, to a method, an apparatus, and a system for testing a system interface.
Background
The pressure test of the data transmission interface of the system is used for verifying the efficiency and stability of the interface, acquiring the maximum concurrency, the system response time, the TPS, the throughput and the resource condition, and analyzing the test result of the system interface to know the performance bottleneck of the system. However, a method for performing a pressure test on a data transmission interface of a system is absent at present, so that developers cannot accurately solve the performance bottleneck of the system and cannot optimize the performance of the system in time.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for testing a system interface, so as to at least solve the technical problems that developers cannot accurately solve the system performance bottleneck and cannot timely optimize the system performance due to the lack of a method for performing pressure testing on a data transmission interface of the system.
According to an aspect of an embodiment of the present application, there is provided a method for testing a system interface, the system including: the test method comprises the following steps: receiving a plurality of N-th round access requests for accessing a tested interface in an Mth time period, and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, wherein M and N are positive integers; responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface; and when the Nth round of access requests reach a test ending condition, determining a test result of the tested interface according to the N-round test indexes.
Optionally, receiving a plurality of nth access requests for accessing the tested interface in the mth time period includes: and respectively receiving a plurality of N-th round access requests for accessing the tested interface under a plurality of test scenes, wherein the test scenes comprise a single-service test scene, a single-service persistence test scene and a mixed-service persistence test scene.
Optionally, determining a system test parameter corresponding to the nth round of access request according to the nth round of access request includes: respectively simulating different numbers of virtual users in a single service test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to simultaneously access a single tested interface; respectively simulating different numbers of virtual users under a single service persistence test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to continuously access a single tested interface within a first preset time length; under a mixed service persistence test scene, different numbers of virtual users are simulated respectively, concurrent threads with the same number as the virtual users are created, and the different numbers of virtual users are controlled to continuously access the plurality of tested interfaces simultaneously within a second preset time length respectively.
Optionally, responding to the nth access request according to the system test parameters corresponding to the nth access request to obtain an nth test index corresponding to the tested interface, where the method includes: respectively controlling virtual users with different numbers to simultaneously access the tested interface according to the corresponding threads to obtain test indexes, wherein the test indexes at least comprise: average response time, throughput, and the occurrence of access failures.
Optionally, respectively controlling different numbers of virtual users to access the tested interface simultaneously according to the corresponding threads includes: sequentially controlling different numbers of virtual users from small to large according to the number of the virtual users to simultaneously access the tested interface; and if the interface fails to access, stopping continuously accessing the tested interface.
Optionally, when the nth round of access request meets the test deadline, determining a test result of the interface to be tested according to the nth round of test indicator, where the determining includes: determining the number of virtual users accessing the tested interface simultaneously when the access failure occurs; determining whether a first relationship exists between the response time and the number of virtual users simultaneously accessing the tested interface; a second relationship is determined whether throughput exists with the number of virtual users simultaneously accessing the interface under test.
According to another aspect of the embodiments of the present application, there is also provided a system interface testing apparatus, including: the device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for receiving a plurality of N-th round access requests for accessing a tested interface in an M-th time period and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, and M and N are positive integers; the test module is used for responding to the Nth round of access requests according to the system test parameters corresponding to the Nth round of access requests to obtain Nth round of test indexes corresponding to the tested interfaces; and the second determining module is used for determining the test result of the tested interface according to the N-round test indexes when the Nth round access request reaches the test ending condition.
According to another aspect of the embodiments of the present application, there is also provided a system interface testing system, including: the system comprises scheduling equipment and a plurality of execution equipment, wherein the scheduling equipment is used for issuing a test script to the plurality of execution equipment, and the test script comprises: the testing method comprises the following steps of carrying out a testing scene of a pressure test on a tested interface and a testing method corresponding to the testing scene, wherein the tested interface is used for receiving access data; and the plurality of executing devices are communicated with the scheduling device and are used for executing the testing method of the system interface.
According to still another aspect of the embodiments of the present application, there is provided a nonvolatile storage medium, where the nonvolatile storage medium includes a stored program, and when the program runs, a device in which the nonvolatile storage medium is located is controlled to execute the above test method for the system interface.
According to still another aspect of the embodiments of the present application, there is also provided a processor for executing a program stored in a memory, wherein the program executes the above method for testing a system interface.
In the embodiment of the application, a plurality of Nth round access requests for accessing a tested interface in an Mth time period are received, and system test parameters corresponding to the Nth round access requests are determined according to the Nth round access requests, wherein M and N are positive integers; responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface; when the Nth round of access requests reach a test cut-off condition, the mode of determining the test result of the tested interface according to the N round of test indexes is adopted, the data transmission interfaces are respectively subjected to pressure test in different test scenes, and then the test result is determined according to the test indexes, so that the technical effect of helping developers to know and find the performance bottleneck of the system in time and optimizing the performance of the system in time is achieved, and the technical problems that the developers cannot accurately solve the performance bottleneck of the system and cannot optimize the performance of the system in time due to the lack of a method for performing pressure test on the data transmission interfaces of the system are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for testing a system interface according to an embodiment of the present application;
FIG. 2a is a flowchart of a testing method in a single-service testing scenario according to an embodiment of the present application;
FIG. 2b is a flowchart of a testing method in a single service persistence testing scenario according to an embodiment of the present application;
fig. 2c is a flowchart of a testing method in a mixed service persistence testing scenario according to an embodiment of the present application;
FIG. 3 is a block diagram of a system interface testing apparatus according to an embodiment of the present application;
FIG. 4 is a block diagram of a test system for a system interface according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present application, there is provided an embodiment of a method for testing a system interface, where it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a method for testing a system interface according to an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
step S102, receiving a plurality of Nth round access requests for accessing a tested interface in an Mth time period, and determining system test parameters corresponding to the Nth round access requests according to the Nth round access requests, wherein M and N are positive integers;
according to an optional embodiment of the present application, the interface to be tested in step S102 is a data transmission interface of the e-commerce platform system.
Step S104, responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface;
and step S106, when the Nth round of access requests reach the test cut-off condition, determining the test result of the tested interface according to the N-round test indexes.
Through the steps, the data transmission interface is respectively subjected to pressure testing under different testing scenes, and then the testing result is determined according to the testing index, so that the technical effect of helping developers to know and find the performance bottleneck of the system in time so as to optimize the performance of the system in time is achieved.
According to an optional embodiment of the present application, when step S102 is executed to receive a plurality of nth round access requests for accessing a tested interface in an mth time period, a plurality of nth round access requests for accessing the tested interface in a plurality of test scenarios are respectively received, where the test scenarios include a single service test scenario, a single service persistence test scenario, and a mixed service persistence test scenario.
In some optional embodiments of the present application, when step S102 is executed, the system test parameter corresponding to the nth round access request is determined according to the nth round access request, and the method includes: respectively simulating different numbers of virtual users in a single service test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to simultaneously access a single tested interface; respectively simulating different numbers of virtual users under a single service persistence test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to continuously access a single tested interface at the same time within a first preset time length; respectively simulating different numbers of virtual users under a mixed service persistence test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to continuously access the plurality of tested interfaces simultaneously within a second preset time length.
It should be noted that the single service test scenario refers to that different numbers of virtual users are simulated to access a single interface respectively, for example, 60/90/120/150/300 users access the tested interface concurrently to obtain the key index for analysis. The analysis content includes, but is not limited to, the following: when the number of the concurrency is reached, whether the access fails or not occurs; whether the response time increases with an increase in the number of concurrencies; whether the throughput decreases as the number of concurrencies increases.
Fig. 2a is a flowchart of a testing method under a single service testing scenario according to an embodiment of the present application, and as shown in fig. 2a, the method includes the following steps:
s1, setting the number of concurrent threads to be 60, circulating for 1 time, and establishing all threads in 1S;
s2, recording a test result after the execution is finished;
s3, starting a second round of test, setting the number of concurrent threads to be 90, and establishing all threads in 1S;
step S4, executing the step S2;
step S5, sequentially starting a third round, setting the number of concurrent threads to be 120, and establishing all threads in 1S
Step S6, executing the step S2;
s7, sequentially starting a fourth round, setting the number of concurrent threads to be 150, and establishing all threads in 1S;
step S8, executing step S2;
step S9, sequentially starting a fifth round, setting the number of concurrent threads to be 300, and establishing all threads in 1S;
step S10, executing step S2;
step S11, if the server reaches the bottleneck, pausing; otherwise, continuing to increase concurrency until the concurrency number reaches the system bottleneck;
and S12, analyzing the key indexes after the completion, and outputting an analysis conclusion.
The single-service persistence test scenario refers to that different numbers of virtual users are simulated to continuously access a single interface for a first preset duration (the first preset duration of continuous access can be determined according to actual conditions), for example, 300/600/900/1200/1500 users access the tested interface concurrently, and key indexes are obtained for analysis. The analysis content includes, but is not limited to, the following: when the number of the concurrency is reached, whether the access fails or not occurs; whether the response time increases with an increase in the number of concurrencies; whether the throughput decreases with an increase in the number of concurrency.
Fig. 2b is a flowchart of a testing method in a single-service persistence testing scenario according to an embodiment of the present application, and as shown in fig. 2b, the testing method includes the following steps:
step S21, setting the number of concurrent threads to be 300, circulating for 1 time, and establishing all threads in 1S;
step S22, recording a test result after the execution is finished;
step S23, starting a second round of test, setting the number of concurrent threads to be 600, and establishing all threads in 1S;
step S24, executing step S22;
step S25, sequentially starting a third round, setting the number of concurrent threads to be 900, and establishing all threads in 1S
Step S26, executing step S22;
step S27, starting the fourth round in sequence, setting the number of concurrent threads to be 1200, and establishing all threads in 1S;
step S28, executing step S22;
step S29, sequentially starting a fifth round, setting the number of concurrent threads to be 1500, and establishing all threads in 1S;
step S210, executing step S22;
step S211, if the server reaches the bottleneck, pausing; otherwise, continuing to increase concurrency until the concurrency number reaches the system bottleneck;
and step S212, analyzing the key indexes after the completion, and outputting an analysis conclusion.
It should be noted that the fact that the concurrency number reaches the system bottleneck means that the system reports an error when the number of users accessing the system interface simultaneously reaches a certain number.
The mixed service persistence test scenario refers to that different numbers of virtual users are simulated to continuously access a plurality of interfaces for a second preset duration (the second preset duration of continuous access can be determined according to actual conditions), for example, 300/600/900/1200/1500 users access the tested interfaces concurrently, and key indexes are obtained for analysis. The analysis content includes, but is not limited to, the following: when the number of the concurrency is reached, whether the access fails or not occurs; whether the response time increases with an increase in the number of concurrencies; whether the throughput decreases with an increase in the number of concurrency.
Fig. 2c is a flowchart of a testing method under a mixed service persistence test scenario according to an embodiment of the present application, and as shown in fig. 2c, the testing method includes the following steps:
step S31, setting the number of concurrent threads to be 300, circulating for 1 time, and establishing all threads in 1S;
step S32, recording a test result after the execution is finished;
step S33, starting a second round of test, setting the number of concurrent threads to be 600, and establishing all threads in 1S;
step S34, executing step S32;
step S35, sequentially starting a third round, setting the number of concurrent threads to be 900, and establishing all threads in 1S
Step S36, executing step S32;
step S37, starting the fourth round in sequence, setting the number of concurrent threads to be 1200, and establishing all threads in 1S;
step S38, executing step S32;
step S39, sequentially starting a fifth round, setting the number of concurrent threads to be 1500, and establishing all threads in 1S;
step S310, executing step S32;
step S311, if the server reaches the bottleneck, pausing; otherwise, continuing to increase concurrency until the concurrency number reaches the system bottleneck;
and step S312, analyzing the key indexes after the completion, and outputting an analysis conclusion.
In some optional embodiments of the present application, when step S104 is executed, the N-th round of test indexes corresponding to the tested interface are obtained by responding to the N-th round of access request according to the system test parameters corresponding to the N-th round of access request, including the following steps: respectively simulating virtual users with different numbers, and creating threads with the same number as the virtual users; respectively controlling virtual users with different numbers to simultaneously access the tested interface according to the corresponding threads to obtain test indexes, wherein the test indexes at least comprise: average response time, throughput, and the occurrence of access failures.
In other optional embodiments of the present application, controlling different numbers of virtual users to access the tested interface simultaneously according to corresponding threads includes: sequentially controlling different numbers of virtual users from small to large according to the number of the virtual users to simultaneously access the tested interface; and if the access failure of the interface to be tested occurs, stopping continuously accessing the interface to be tested.
In this step, the interfaces are tested according to the test methods corresponding to the different test scenarios. And in the testing process, sequentially accessing the tested interfaces from few concurrent users to many concurrent users, stopping testing the tested interfaces when the concurrent number reaches the system bottleneck, and analyzing the testing result according to the testing index. The above test indicators include, but are not limited to, average response time, median, throughput, and system access failure.
According to an optional embodiment of the present application, when step S106 is executed, and when the nth round of access request reaches the test deadline condition, the test result of the interface under test is determined according to the nth round of test index, and the method is implemented by: determining the number of virtual users accessing the tested interface simultaneously when the access failure occurs; determining whether a first relationship exists between the response time and a number of virtual users simultaneously accessing the interface under test; a second relationship is determined whether throughput exists with the number of virtual users simultaneously accessing the interface under test.
As mentioned above, when the number of users accessing the interface under test at the same time reaches the system bottleneck, the testing of the interface under test is stopped, and the concurrent number of users accessing the interface under test is recorded. Analyzing whether the system response time increases with the increase of the concurrency number; whether the throughput decreases as the number of concurrencies increases.
In the embodiment provided by the application, as the number of concurrent users accessing the tested interface at the same time gradually increases, the throughput gradually increases, and when the number of concurrent users increases to 1200-1500, the throughput of the system reaches the maximum value (some concurrent interfaces have higher throughput), and the resource condition of the monitoring server is normal in the test process.
Fig. 3 is a block diagram of a testing apparatus for a system interface according to an embodiment of the present application, and as shown in fig. 3, the apparatus includes:
the first determining module 30 is configured to receive multiple nth round access requests for accessing a tested interface in an mth time period, and determine a system test parameter corresponding to the nth round access request according to the nth round access request, where M and N are positive integers;
the test module 32 is configured to respond to the nth round access request according to the system test parameters corresponding to the nth round access request, so as to obtain an nth round test index corresponding to the tested interface;
and a second determining module 34, configured to determine a test result of the interface to be tested according to the N-round test indexes when the nth round access request reaches a test termination condition.
It should be noted that, reference may be made to the description related to the embodiment shown in fig. 1 for a preferred implementation of the embodiment shown in fig. 3, and details are not described here again.
Fig. 4 is a block diagram of a test system of a system interface according to an embodiment of the present application, and as shown in fig. 4, the test system includes: a scheduling device 40, and a plurality of execution devices 42, wherein,
the scheduling device 40 is configured to issue a test script to a plurality of execution devices, where the test script includes: the testing method comprises the following steps of carrying out a testing scene of a pressure test on a tested interface and a testing method corresponding to the testing scene, wherein the tested interface is used for receiving access data;
and a plurality of execution devices 42, which are communicated with the scheduling device 40, for executing the above system interface test method.
The pressure testing system provided by the present application is described below with a specific embodiment:
first, the hardware device needs 4 execution devices, 1 scheduling device. The dispatching equipment is used for running the test scripts and respectively sending the test scripts to the execution equipment through the dispatching equipment. And the execution equipment simulates a real user to perform pressure test on the data transmission interface of the system to be tested according to the test script, and returns the test result to the scheduling equipment for storage after obtaining the test result. It should be noted that the system under test includes, but is not limited to, a Web server, an application server, and a database server.
It should be noted that, reference may be made to the description related to the embodiment shown in fig. 1 for a preferred implementation of the embodiment shown in fig. 4, and details are not repeated here.
The embodiment of the application also provides a nonvolatile storage medium, wherein the nonvolatile storage medium comprises a stored program, and the device where the nonvolatile storage medium is located is controlled to execute the test method of the system interface when the program runs.
The nonvolatile storage medium stores a program for executing the following functions: receiving a plurality of N-th round access requests for accessing a tested interface in an M-th time period, and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, wherein M and N are positive integers; responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface; and when the Nth round of access requests reach a test ending condition, determining a test result of the tested interface according to the N-round test indexes.
The embodiment of the application also provides a processor, wherein the processor is used for running the program stored in the memory, and the program is used for executing the above system interface test method during running.
The processor is used for running a program for executing the following functions: receiving a plurality of N-th round access requests for accessing a tested interface in an M-th time period, and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, wherein M and N are positive integers; responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface; and when the Nth round of access requests reach a test ending condition, determining a test result of the tested interface according to the N-round test indexes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for testing a system interface, wherein the system comprises a plurality of servers and an interface to be tested, the method comprising:
receiving a plurality of N-th round access requests for accessing the tested interface in an M-th time period, and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, wherein M and N are positive integers;
responding to the Nth round access request according to the system test parameters corresponding to the Nth round access request to obtain an Nth round test index corresponding to the tested interface;
and when the N round of access requests reach a test ending condition, determining a test result of the tested interface according to the N round of test indexes.
2. The method of claim 1, wherein receiving a plurality of nth round access requests for access to the tested interface during an mth time period comprises: and respectively receiving a plurality of N-th round access requests for accessing the tested interface under a plurality of test scenes, wherein the plurality of test scenes comprise a single-service test scene, a single-service persistence test scene and a mixed-service persistence test scene.
3. The method of claim 2, wherein determining the system test parameters corresponding to the nth round of access request according to the nth round of access request comprises:
respectively simulating different numbers of virtual users under the single service test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of virtual users to simultaneously access a single tested interface;
respectively simulating different numbers of the virtual users under the single service persistence test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of the virtual users to simultaneously and continuously access a single tested interface within a first preset time length;
and respectively simulating different numbers of the virtual users under the mixed service persistence test scene, creating concurrent threads with the same number as the virtual users, and respectively controlling the different numbers of the virtual users to continuously access the plurality of tested interfaces simultaneously within a second preset time length.
4. The method of claim 3, wherein responding to the nth round access request according to system test parameters corresponding to the nth round access request to obtain an nth round test index corresponding to the tested interface comprises:
respectively controlling the virtual users with different numbers to simultaneously access the tested interface according to the corresponding threads to obtain test indexes, wherein the test indexes at least comprise: average response time, throughput, and the occurrence of access failures.
5. The method of claim 4, wherein controlling the different numbers of virtual users to simultaneously access the interface under test according to the corresponding threads comprises:
sequentially controlling the virtual users with different numbers to access the tested interface at the same time according to the number of the virtual users from few to most;
and if the access of the interface to be tested fails, stopping continuously accessing the interface to be tested.
6. The method of claim 4, wherein determining the test result of the interface under test according to the Nth round test indicator when the Nth round access request reaches a test cutoff condition comprises:
determining the number of virtual users accessing the tested interface simultaneously when the access failure occurs;
determining whether a first relationship exists between the response time and a number of virtual users simultaneously accessing the interface under test;
determining whether a second relationship exists between the throughput and a number of virtual users concurrently accessing the interface under test.
7. A system interface testing apparatus, comprising:
the device comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for receiving a plurality of N-th round access requests for accessing a tested interface in an M-th time period and determining system test parameters corresponding to the N-th round access requests according to the N-th round access requests, and M and N are positive integers;
the test module is used for responding to the Nth round of access request according to the system test parameters corresponding to the Nth round of access request to obtain an Nth round of test indexes corresponding to the tested interface;
a second determination module for determining whether the first determination module is ready for use, for when the nth round of access requests reaches a test deadline condition, and determining the test result of the tested interface according to the N-round test indexes.
8. A system interface test system, comprising: a scheduling device and a plurality of execution devices, wherein,
the scheduling device is configured to issue a test script to the multiple execution devices, where the test script includes: the method comprises the steps of carrying out a test scene of pressure test on a tested interface and a test method corresponding to the test scene, wherein the tested interface is used for receiving access data;
a plurality of the execution devices, in communication with the scheduling device, for executing the method for testing the system interface according to any one of claims 1 to 6.
9. A non-volatile storage medium, comprising a stored program, wherein when the program runs, a device in which the non-volatile storage medium is located is controlled to execute the method for testing the system interface according to any one of claims 1 to 6.
10. A processor for executing a program stored in a memory, wherein the program executes to perform the method for testing a system interface according to any one of claims 1 to 6.
CN202110738560.7A 2021-06-30 2021-06-30 System interface test method, device and system Pending CN115543768A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110738560.7A CN115543768A (en) 2021-06-30 2021-06-30 System interface test method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110738560.7A CN115543768A (en) 2021-06-30 2021-06-30 System interface test method, device and system

Publications (1)

Publication Number Publication Date
CN115543768A true CN115543768A (en) 2022-12-30

Family

ID=84716951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110738560.7A Pending CN115543768A (en) 2021-06-30 2021-06-30 System interface test method, device and system

Country Status (1)

Country Link
CN (1) CN115543768A (en)

Similar Documents

Publication Publication Date Title
CN104765678B (en) The method and device tested the application on mobile terminal device
CN112148542B (en) Reliability testing method, device and system for distributed storage cluster
CN106487603B (en) Response testing method and device
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN105607994A (en) Mobile terminal software testing method and system
CN110833693B (en) Game running method and device, storage medium and electronic device
CN105760307B (en) The test method of intelligent terminal, apparatus and system
CN111124911A (en) Automatic testing method, device, equipment and readable storage medium
CN109522181B (en) Performance test method, device and equipment of distributed storage system
CN111464376A (en) Website availability monitoring method and device, storage medium and computer equipment
CN113342515A (en) Method, device and equipment for selecting server-free computing resources and storage medium
CN113688025A (en) Interface test method, device, equipment and storage medium
CN111984519B (en) Test method and device for service system
CN109985387B (en) Automatic testing method and device
CN115733741B (en) Abnormal scene test method and device for system to be tested
CN115543768A (en) System interface test method, device and system
CN114124727B (en) Network management communication pressure testing method and system
CN115562926A (en) Server pressure testing method, system, device and computer readable storage medium
CN116074228A (en) Network card testing method and device, storage medium and electronic equipment
CN115617668A (en) Compatibility testing method, device and equipment
CN115495381A (en) Interactive scene testing method and system, processor and electronic equipment
CN110730342B (en) Video quality analysis method and device, server and terminal
CN115017018A (en) Method and device for testing performance of server and computer readable storage medium
CN114328196A (en) Method, device and equipment for testing data leakage prevention system and storage medium
CN109039770B (en) Server CMC refreshing method and device and related equipment

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