CN117880139A - Performance test method, device, equipment and storage medium - Google Patents

Performance test method, device, equipment and storage medium Download PDF

Info

Publication number
CN117880139A
CN117880139A CN202311508036.6A CN202311508036A CN117880139A CN 117880139 A CN117880139 A CN 117880139A CN 202311508036 A CN202311508036 A CN 202311508036A CN 117880139 A CN117880139 A CN 117880139A
Authority
CN
China
Prior art keywords
test
scene
performance test
performance
generating
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
CN202311508036.6A
Other languages
Chinese (zh)
Inventor
李�浩
宋雨伦
李大中
吕烨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology 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 China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202311508036.6A priority Critical patent/CN117880139A/en
Publication of CN117880139A publication Critical patent/CN117880139A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application provides a performance test method, a device, equipment and a storage medium, which are applied to computer equipment, wherein the method comprises the following steps: responding to the input operation of the scene parameters, and generating a performance test scene corresponding to the scene parameters; responding to the input operation of the test data, and generating a test script according to the test data; calling and executing a test script to generate a test result corresponding to the performance test scene; generating a flow snapshot according to the test result, and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library; receiving a retest request initiated by a user terminal; and according to the retest request, calling the flow snapshot stored in the scene relation library to perform performance test, and generating a test report, thereby improving the test efficiency.

Description

Performance test method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a performance testing method, apparatus, device, and storage medium.
Background
The performance test is a test for verifying the concurrent processing capability of the system. And the client and the server establish a large number of concurrent connections, and the performance of the system is judged through performance indexes such as response time of the client, system throughput, concurrency number and the like and the resource occupation condition of the server. With the rapid iteration of software versions, a tester needs to perform a performance test on each version.
In the prior art, a tester performs performance tests on software of different versions according to different scenes. The tester writes different test scripts for each different test scenario.
However, in the prior art, for performance testing of a scenario after version iteration, a developer needs to repeatedly write a test script, which results in low test efficiency.
Disclosure of Invention
The application provides a performance test method, device, equipment and storage medium, which are used for solving the problem of low test efficiency in the prior art.
In a first aspect, the present application provides a performance testing method, applied to a computer device, including:
responding to the input operation of scene parameters, and generating a performance test scene corresponding to the scene parameters;
responding to the input operation of test data, and generating a test script according to the test data;
calling and executing the test script to generate a test result corresponding to the performance test scene;
generating a flow snapshot according to the test result, and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library;
receiving a retest request initiated by a user terminal;
and calling the flow snapshot stored in the scene relation library according to the retest request to perform performance test, and generating a test report.
In one possible design, the calling the traffic snapshot stored in the scenario relation library according to the retest request to perform a performance test and generating a test report includes: identifying a performance test scene in the retest request, and sending the performance test scene to a scene relation library; inquiring the scene relation library to obtain a flow snapshot corresponding to the performance test scene; and sending the flow snapshot to a test server to perform performance test, and generating a test report.
In one possible design, the sending the traffic snapshot to a test server for performance testing and generating a test report includes: sending the flow snapshot to a test server so that the test server performs performance test and generates a performance test result; receiving a performance test result sent by the test server; and generating a test report according to the performance test result.
In one possible design, the generating, in response to the input operation of the scene parameter, a performance test scene corresponding to the scene parameter includes: identifying input scene parameters, and classifying the scene parameters to obtain a classification result; generating test requirements for different types of scene parameters according to the classification result; and generating a performance test scene according to the test requirement.
In one possible design, the calling and executing the test script to generate a test result corresponding to the performance test scenario includes: invoking a performance test scene, executing the test script to perform performance test, and generating performance test data; analyzing the performance test data to generate a test result.
In a second aspect, the present application provides a performance testing apparatus, applied to a computer device, including:
the performance test scene module is used for responding to the input operation of the scene parameters and generating a performance test scene corresponding to the scene parameters;
the first generation module is used for responding to the input operation of the test data and generating a test script according to the test data;
the executor module is used for calling and executing the test script to generate a test result corresponding to the performance test scene;
the second generation module is used for generating a flow snapshot according to the test result and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library;
the receiving module is used for receiving a retest request initiated by the user terminal;
and the snapshot scheduling module is used for calling the flow snapshots stored in the scene relation library according to the retest request so as to perform performance test and generate a test report.
In one possible design, the snapshot scheduling module includes: the first identification unit is used for identifying the performance test scene in the retest request and sending the performance test scene to a scene relation library; the query unit is used for querying the scene relation library and acquiring a flow snapshot corresponding to the performance test scene; and the sending unit is used for sending the flow snapshot to a test server to perform performance test and generating a test report.
In one possible design, the transmitting unit includes: the sending subunit is used for sending the flow snapshot to a test server so as to enable the test server to perform performance test and generate a performance test result; a receiving subunit, configured to receive a performance test result sent by the test server; and the generating subunit is used for generating a test report according to the performance test result.
In a third aspect, the present application provides a computer device comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the performance testing method as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, the present application provides a computer storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the performance test method according to the first aspect and the various possible designs of the first aspect.
According to the performance testing method, the device, the equipment and the storage medium, the performance testing is carried out by calling the testing script through obtaining the input scene parameters, and the performance testing result is stored as the flow snapshot. And establishing a corresponding relation between the test scene and the flow snapshot, storing the corresponding relation in a scene relation library, and obtaining the corresponding flow snapshot by inquiring the test scene. In the subsequent retest process, the test scene in the retest request is directly identified, the corresponding flow snapshot is obtained to realize retest of the performance test, repeated writing of test scripts for performance test is avoided, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic system structure of a computer device according to an embodiment of the present application;
FIG. 2 is a flow chart of a performance testing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a performance testing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic hardware structure of a computer device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The performance test is a test for verifying the concurrent processing capability of the system. And the client and the server establish a large number of concurrent connections, and the performance of the system is judged through performance indexes such as response time of the client, system throughput, concurrency number and the like and the resource occupation condition of the server. With the rapid iteration of software versions, a tester needs to perform a performance test on each version. In the prior art, a tester performs performance tests on software of different versions according to different scenes. The tester writes different test scripts for each different test scenario. However, in the prior art, for performance testing of a scenario after version iteration, a developer needs to repeatedly write a test script, which results in low test efficiency.
In order to solve the above technical problems, the embodiments of the present application provide the following technical ideas: the inventor considers generating a performance test scene and calling the test script to generate a flow snapshot. Aiming at the flow snapshots of different performance test scenes, storing the corresponding relation between the performance test scenes and the flow snapshots in a scene relation library, and when a retest request is received, realizing the performance test of the retest scenes by calling the flow snapshots stored in the scene relation library. The following will explain in detail the embodiments.
Fig. 1 is a schematic system structure of a computer device according to an embodiment of the present application. As shown in fig. 1, the computer device includes: a receiving device 101, a processor 102 and a display device 103.
It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the method of identifying an article. In other possible embodiments of the present application, the architecture may include more or fewer components than those illustrated, or some components may be combined, some components may be separated, or different component arrangements may be specifically determined according to the actual application scenario, and the present application is not limited herein. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
In a specific implementation, the receiving device 101 may be an input/output interface, or may be a communication interface, and may be operated in response to an input of a scene parameter.
The processor 102 may generate a traffic snapshot and invoke the traffic snapshot to perform performance testing according to the retest request.
The display device 103 may be used to display the performance test results and the like.
The display device may also be a touch display screen for receiving user instructions while displaying the above content to enable operational interaction with the user.
It should be understood that the above-described processor may be implemented by a processor that reads instructions in a memory and executes the instructions, or may be implemented by a chip circuit.
In addition, the network architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application, and as a person of ordinary skill in the art can know, with evolution of the network architecture and appearance of a new service scenario, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
Example 1
Fig. 2 is a schematic flow chart of a performance test method according to an embodiment of the present application, where the execution subject of the embodiment may be a computer device, and the embodiment is not particularly limited herein. As shown in fig. 2, the method includes:
s201: and responding to the input operation of the scene parameters, and generating a performance test scene corresponding to the scene parameters.
In this embodiment, the performance test scenario simulates the performance of the user in the specific service scenario or application according to the parameters set by the user, so as to detect and verify the performance capability of the system performance.
Specifically, after the user inputs the set scene parameters, the test scene module generates a performance test scene simulating the actual environment according to the scene parameters set by the user.
The test scene module is used for managing and storing performance test scenes, and a plurality of performance test scenes are stored in the test scene module.
Exemplary scene parameters include, but are not limited to, number of users, concurrency request and amount of data, etc.
S202: and responding to the input operation of the test data, and generating a test script according to the test data.
In this embodiment, the test data includes, but is not limited to, user data, concurrency data, data volume data, and system load data.
By way of example, the user data may be a user name, a user password, the number of users, and the like.
By way of example, the concurrency data may be the number of concurrent requests, the type of concurrent request, the distribution of concurrent requests, etc.
By way of example, the data volume data may be a data volume size, a data volume type, a data distribution, and the like.
By way of example, the system load data may be system response time, system throughput, and number of concurrent users, etc.
S203: and calling and executing the test script to generate a test result corresponding to the performance test scene.
In this embodiment, the test scripts are computer readable instructions that simulate user behavior and business scenarios. The test script controls the test environment and executes the performance test task under the test environment.
The test script may be an automation script or a semi-automation script.
Specifically, the executor acquires performance test scene information and executes a test script to generate a test result.
Wherein, the executor can run the test script for a specific test scenario.
S204: and generating a flow snapshot according to the test result, and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library.
In this embodiment, the traffic snapshot is a method for recording the traffic situation of the application program after a period of time in a specific test scenario.
Exemplary traffic snapshots include, but are not limited to, request and response times, number of requests and responses, error rates, user behavior, and the like.
In this embodiment, the scenario relation library is used to save the correspondence between the traffic snapshot and the performance test scenario. After a user initiates a call request to the snapshot scene relation library, the scene relation library searches for a flow snapshot according to the request information.
Specifically, the test result is transmitted to a snapshot generator, the snapshot generator generates a flow snapshot under a corresponding scene, and the flow snapshot and the performance test scene are transmitted to a scene relation library, wherein the scene relation library stores the flow snapshot and the corresponding scene relation.
One of the traffic snapshots may correspond to at least one performance test scenario.
Wherein, a plurality of flow snapshots are stored in the scene relation library.
S205: and receiving a retest request initiated by the user terminal.
In this embodiment, the retest request initiated by the user terminal includes at least one performance test scenario.
For example, the retest request may be a performance test performed by a developer for the iterated software after the software version iterates.
S206: and calling the flow snapshot stored in the scene relation library according to the retest request to perform performance test, and generating a test report.
Specifically, a performance test scene in the retest request is obtained, the retest request is sent to a snapshot scheduling module, the snapshot scheduling module sends the performance test scene in the retest request to a scene relation library, a corresponding flow snapshot is obtained, and the flow snapshot is sent to a tested scene to generate a test report.
From the above embodiments, it can be seen that, by acquiring the input scene parameters, the performance test script is invoked to perform the performance test, and the performance test result is saved as a flow snapshot. And establishing a corresponding relation between the test scene and the flow snapshot, storing the corresponding relation in a scene relation library, and obtaining the corresponding flow snapshot by inquiring the test scene. In the subsequent retest process, the test scene in the retest request is directly identified, the corresponding flow snapshot is obtained to realize retest of the performance test, repeated writing of test scripts for performance test is avoided, and the test efficiency is improved.
Example two
In one embodiment of the present application, step S206 describes a process of invoking a flow snapshot for performance testing, the method comprising:
s301: and identifying the performance test scene in the retest request, and sending the performance test scene to a scene relation library.
Specifically, the snapshot scheduling module receives a retest request initiated by a user, acquires a plurality of performance test scenes in the retest request, and sends names of the performance test scenes to the scene relation library.
S302: and inquiring a scene relation library to obtain a flow snapshot corresponding to the performance test scene.
Specifically, the scene relation library queries the recorded flow snapshot according to the performance test scene name.
The method comprises the steps that classification is carried out in a scene relation library according to the names of snapshots, each flow snapshot corresponds to at least one test scene, the scene relation library traverses the scene names, and a plurality of flow snapshots corresponding to the scene names are obtained.
S303: and sending the flow snapshot to a test server for performance testing, and generating a test report.
Specifically, step S303 includes:
s3031: and sending the flow snapshot to the test server so that the test server performs performance test and generates a performance test result.
Specifically, the snapshot scheduling module receives the flow snapshots sent by the scene relation library, sends the flow snapshots to the test server, and the test server runs the flow snapshots corresponding to the scenes according to each test scene to perform performance test, so as to generate a test result.
S3032: receiving a performance test result sent by a test server;
in the present embodiment, the performance test results include, but are not limited to, test scenarios, performance indicators, resource utilization, error analysis, and the like
S3033: and generating a test report according to the performance test result.
In this embodiment, performance indicators and server resource usage are recorded in the test report.
Exemplary performance metrics include, but are not limited to, the number of concurrent jobs, the duration of the performance test, and the file size of the data source.
Exemplary server resources include, but are not limited to, central processor occupancy, memory occupancy, disk occupancy, network occupancy, and the like of the server.
According to the embodiment, the test scene in the retest request is obtained, the scene relation library is queried to obtain the flow snapshot corresponding to the test scene, and the flow snapshot is sent to the test server to realize retest of the performance test. And a test report is generated aiming at the retest result, so that the condition of performance test is intuitively represented, and the test efficiency is improved.
Example III
In one embodiment of the present application, step S201 describes a process of generating a performance test scenario, the method comprising the steps of:
s2011: and identifying the input scene parameters, and classifying the scene parameters to obtain a classification result.
Specifically, the test scene module identifies the types of scene parameters, classifies the scene parameters of the same type, and obtains a classification result.
For example, parameters of the number of concurrent tasks executed by the software are divided into the same category.
S2012: and generating test requirements for different types of scene parameters according to the classification result.
Specifically, the test scene module classifies scene parameters input by a user, saves the scene parameters of the same type, and generates test requirements according to the scene parameters.
By way of example, the test requirement may be a resource occupancy rate of the monitoring software for fifty concurrent data acquisition operations for a period of five minutes.
S2013: and generating a performance test scene according to the test requirement.
Specifically, the test scene module acquires scene parameters in the test requirements of the user, generates performance test scenes according to the scene parameters, and classifies and stores the test scenes of the same type.
For example, for a plurality of test scenes for judging the occupancy rate of the software resources, the plurality of test scenes are stored in a test scene classification module under the same classification.
After classifying the test scenes, the test scene module sends the test scenes to an executor, and the executor generates test scripts aiming at the test scenes of the same type.
According to the embodiment, the performance test requirements of the user are clarified by acquiring the scene parameters, the test scenes are generated according to the performance test requirements of the user, the test scenes of the same type are stored, the executor can conveniently generate the scripts according to the test scenes of the same type, and the test efficiency is improved.
Example IV
In one embodiment of the present application, step S203 describes a process of generating a test result, the method comprising the steps of:
s2031: and calling a performance test scene, executing a test script to perform performance test, and generating performance test data.
Specifically, the executor executes performance test by identifying performance test scenes and calling scripts, and test data of each scene is generated aiming at different test scenes.
In this embodiment, the performance test is a software running condition of the software under normal, peak and abnormal load conditions.
By way of example, the performance test may be a stress test and a load test.
S2032: analyzing the performance test data to generate a test result.
Exemplary performance test data includes response time, number of concurrency, data throughput, error rate, and resource utilization.
Specifically, the snapshot generator judges whether the performance test scene reaches a set standard according to the performance test data, and generates a performance test result.
The performance test result is displayed on a front-end page of the user, and a developer modifies a software version according to the performance test result so as to achieve the performance test standard.
According to the embodiment, the performance test is performed in the performance test scene by calling the test script, whether the test data meet the performance test requirement is judged, and a test result is generated. The performance test result is intuitively reflected, and a developer can conveniently adjust the software according to the test result so as to achieve the performance test standard.
Example five
Fig. 3 is a schematic structural diagram of a performance testing apparatus according to an embodiment of the present application. As shown in fig. 3, the performance test apparatus 30 includes: a performance test scenario module 301, a first generation module 302, an executor module 303, a second generation module 304, a receiving module 305, and a snapshot scheduling module 306.
The performance test scene module 301 is configured to generate a performance test scene corresponding to the scene parameter in response to an input operation of the scene parameter.
The first generating module 302 is configured to generate a test script according to the test data in response to an input operation of the test data.
And the executor module 303 is configured to call and execute the test script to generate a test result corresponding to the performance test scenario.
The second generating module 304 is configured to generate a flow snapshot according to the test result, and store a corresponding relationship between the flow snapshot and the performance test scene in the scene relationship library.
The receiving module 305 is configured to receive a retest request initiated by a user terminal.
And the snapshot scheduling module 306 is used for calling the flow snapshots stored in the scene relation library according to the retest request to perform performance test and generating a test report.
In one embodiment of the present application, snapshot scheduling module 306 includes:
the first identifying unit 3061 is configured to identify a performance test scenario in the retest request, and send the performance test scenario to the scenario relation library.
And the query unit 3062 is used for querying the scene relation library and acquiring the flow snapshot corresponding to the performance test scene.
And the sending unit 3063 is used for sending the traffic snapshot to the test server to perform performance test and generating a test report.
In one embodiment of the present application, the transmitting unit 3063 includes:
and the sending subunit a is used for sending the flow snapshot to the test server so as to enable the test server to perform performance test and generate a performance test result.
And the receiving subunit b is used for receiving the performance test result sent by the test server.
And the generating subunit c is used for generating a test report according to the performance test result.
In one embodiment of the present application, the performance test scenario module 301 includes:
the second recognition unit 3011 is configured to recognize an input scene parameter, and classify the scene parameter to obtain a classification result.
The first generation unit 3012 is configured to generate test requirements for different types of scene parameters according to the classification result.
And the second generating unit 3013 is used for generating a performance test scene according to the test requirement.
In one embodiment of the present application, the actuator module 303 includes:
the third generating unit 3031 is configured to call a performance test scenario and execute a test script to perform a performance test, and generate performance test data.
And the analyzing unit 3032 is used for analyzing the performance test data and generating a test result.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Example six
Fig. 4 is a schematic hardware structure of a computer device according to an embodiment of the present application. As shown in fig. 4, the computer device includes: at least one processor 401 and a memory 402; the memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to perform the performance test method as described above.
Alternatively, the memory 402 may be separate or integrated with the processor 401.
When the memory 402 is provided separately, the computer device further comprises a bus 403 for connecting the memory 402 and the processor 401.
Example seven
The embodiment of the application also provides a computer storage medium, in which computer execution instructions are stored, and when a processor executes the computer execution instructions, the performance test method is realized.
Example eight
The embodiment of the application also provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the performance test method is realized.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of modules is merely a logical function division, and there may be other manners of division in actual implementation, for example, multiple modules may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described above as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some steps of the methods of the various embodiments of the present application.
It should be understood that the above processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A performance testing method, applied to a computer device, comprising:
responding to the input operation of scene parameters, and generating a performance test scene corresponding to the scene parameters;
responding to the input operation of test data, and generating a test script according to the test data;
calling and executing the test script to generate a test result corresponding to the performance test scene;
generating a flow snapshot according to the test result, and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library;
receiving a retest request initiated by a user terminal;
and calling the flow snapshot stored in the scene relation library according to the retest request to perform performance test, and generating a test report.
2. The method of claim 1, wherein the invoking the traffic snapshot stored in the context library for performance testing and generating a test report according to the retest request comprises:
identifying a performance test scene in the retest request, and sending the performance test scene to a scene relation library;
inquiring the scene relation library to obtain a flow snapshot corresponding to the performance test scene;
and sending the flow snapshot to a test server to perform performance test, and generating a test report.
3. The method of claim 2, wherein the sending the traffic snapshot to a test server for performance testing and generating a test report comprises:
sending the flow snapshot to a test server so that the test server performs performance test and generates a performance test result;
receiving a performance test result sent by the test server;
and generating a test report according to the performance test result.
4. The method of claim 1, wherein generating a performance test scene corresponding to a scene parameter in response to an input operation of the scene parameter comprises:
identifying input scene parameters, and classifying the scene parameters to obtain a classification result;
generating test requirements for different types of scene parameters according to the classification result;
and generating a performance test scene according to the test requirement.
5. The method of any one of claims 1 to 4, wherein the invoking and executing the test script to generate test results corresponding to the performance test scenario comprises:
invoking a performance test scene, executing the test script to perform performance test, and generating performance test data;
analyzing the performance test data to generate a test result.
6. A performance testing apparatus for use with a computer device, comprising:
the performance test scene module is used for responding to the input operation of the scene parameters and generating a performance test scene corresponding to the scene parameters;
the first generation module is used for responding to the input operation of the test data and generating a test script according to the test data;
the executor module is used for calling and executing the test script to generate a test result corresponding to the performance test scene;
the second generation module is used for generating a flow snapshot according to the test result and storing the corresponding relation between the flow snapshot and the performance test scene into a scene relation library;
the receiving module is used for receiving a retest request initiated by the user terminal;
and the snapshot scheduling module is used for calling the flow snapshots stored in the scene relation library according to the retest request so as to perform performance test and generate a test report.
7. The apparatus of claim 6, wherein the snapshot scheduling module comprises:
the first identification unit is used for identifying the performance test scene in the retest request and sending the performance test scene to a scene relation library;
the query unit is used for querying the scene relation library and acquiring a flow snapshot corresponding to the performance test scene;
and the sending unit is used for sending the flow snapshot to a test server to perform performance test and generating a test report.
8. The apparatus of claim 7, wherein the transmitting unit comprises:
the sending subunit is used for sending the flow snapshot to a test server so as to enable the test server to perform performance test and generate a performance test result;
a receiving subunit, configured to receive a performance test result sent by the test server;
and the generating subunit is used for generating a test report according to the performance test result.
9. A computer device, comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the performance testing method of any one of claims 1 to 5.
10. A computer storage medium having stored therein computer executable instructions which, when executed by a processor, implement the performance test method of any one of claims 1 to 5.
CN202311508036.6A 2023-11-13 2023-11-13 Performance test method, device, equipment and storage medium Pending CN117880139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311508036.6A CN117880139A (en) 2023-11-13 2023-11-13 Performance test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311508036.6A CN117880139A (en) 2023-11-13 2023-11-13 Performance test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117880139A true CN117880139A (en) 2024-04-12

Family

ID=90585222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311508036.6A Pending CN117880139A (en) 2023-11-13 2023-11-13 Performance test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117880139A (en)

Similar Documents

Publication Publication Date Title
CN107436844B (en) Method and device for generating interface use case aggregate
CN108459962B (en) Code normalization detection method and device, terminal equipment and storage medium
CN111897724B (en) Automatic testing method and device suitable for cloud platform
CN109815119B (en) APP link channel testing method and device
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN114546738B (en) Universal test method, system, terminal and storage medium for server
CN113240258A (en) Industrial asset detection method, equipment and device
CN111597110B (en) Page test method and device, electronic equipment and storage medium
CN110955409B (en) Method and device for creating resources on cloud platform
CN111367873A (en) Log data storage method and device, terminal and computer storage medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN115221071A (en) Chip verification method and device, electronic equipment and storage medium
CN111338958A (en) Parameter generation method and device of test case and terminal equipment
CN112948262A (en) System test method, device, computer equipment and storage medium
CN117880139A (en) Performance test method, device, equipment and storage medium
CN111046393A (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN115934537A (en) Interface test tool generation method, device, equipment, medium and product
CN115061924A (en) Automatic test case generation method and generation device
CN113448867A (en) Software pressure testing method and device
CN112527584A (en) Software efficiency improving method and system based on script compiling and data acquisition
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program
CN113220586A (en) Automatic interface pressure test execution method, device and system
CN114338846A (en) Message testing method and device
CN111625459A (en) Application program testing method and device, computer equipment and storage medium
CN114968829B (en) Full link pressure test method, electronic device 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