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

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

Info

Publication number
CN114385493A
CN114385493A CN202111656672.4A CN202111656672A CN114385493A CN 114385493 A CN114385493 A CN 114385493A CN 202111656672 A CN202111656672 A CN 202111656672A CN 114385493 A CN114385493 A CN 114385493A
Authority
CN
China
Prior art keywords
test
performance
parameter
performance test
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111656672.4A
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.)
Lianlian Yintong Electronic Payment Co ltd
Original Assignee
Lianlian Yintong Electronic Payment 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 Lianlian Yintong Electronic Payment Co ltd filed Critical Lianlian Yintong Electronic Payment Co ltd
Priority to CN202111656672.4A priority Critical patent/CN114385493A/en
Publication of CN114385493A publication Critical patent/CN114385493A/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
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

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 invention provides a performance testing method, a performance testing device, electronic equipment and a storage medium, and relates to the field of automatic testing, wherein the method comprises the following steps: calling a preset method keyword in the process of executing an automated test based on an interface test case, wherein the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case; executing a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data; and executing performance test on the interface to be tested according to the performance test script and the performance test data and aiming at the interface test case. The invention calls the packaged method key words for generating the performance test script and the data, can automatically generate the performance test script and the performance test data, executes the performance test while executing the automatic test, does not need to additionally prepare the performance data and compile the performance test script, and improves the efficiency of the performance test.

Description

Performance test method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of automated testing, and in particular, to a performance testing method and apparatus, an electronic device, and a storage medium.
Background
When a test framework based on keyword driving is used for carrying out project automatic test, the keyword driving automatic test can only be executed simply, and performance test cannot be carried out simultaneously; when the performance test is performed on the test case interface, the used performance test scripts and data are often written manually, and for some complex multi-scenario performance tests, the problem of data dependency of different scenarios exists before and after, when the performance test is performed, not only basic performance test data and methods need to be prepared, but also the dependency relationship of parameters among the methods needs to be clarified, so that the performance test efficiency is low, and the test cost is high.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present application is to provide a performance testing method, apparatus, electronic device and storage medium, so as to solve the problems in the related art that an automated test and a performance test cannot be performed simultaneously, and that the performance testing efficiency is low and the testing cost is high.
The technical scheme is as follows:
in one aspect, a performance testing method is provided, including:
calling a preset method keyword in the process of executing an automated test based on an interface test case, wherein the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case;
executing a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data;
and executing performance test on the interface to be tested according to the performance test script and the performance test data and aiming at the interface test case.
Optionally, the executing the method for generating the performance test script and the performance test data corresponding to the interface test case to obtain the performance test script and the performance test data includes:
executing a method for generating a performance test script and data corresponding to the interface test case, and determining a parameter value of a first parameter and a parameter value of a second parameter; the first parameter indicates whether to generate the performance test data, and the second parameter indicates whether to perform the performance test;
generating the performance test script and the performance test data when the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value.
Optionally, the method further includes:
responding to a method keyword generation instruction aiming at the interface test case, and acquiring an initial keyword corresponding to the interface test case;
acquiring the parameter value of the first parameter and the parameter value of the second parameter input by a parameter configuration unit;
generating the method keyword according to the initial keyword, the parameter value of the first parameter and the parameter value of the second parameter;
and establishing a calling relation between an automatic test framework corresponding to the automatic test and the method keywords.
Optionally, the invoking of the preset method keyword includes:
and calling the preset method keywords based on the calling relation between the automatic test frame corresponding to the automatic test and the method keywords.
Optionally, the automated testing framework is a testing framework based on keyword driving.
Optionally, before the performing, according to the performance test script and the performance test data, a performance test on the interface to be tested with respect to the interface test case, the method further includes:
determining a parameter value of a third parameter, wherein the third parameter indicates a mode of the interface test case for executing the performance test;
determining to execute the performance test in a web execution mode if the third parameter is a third target value;
determining to execute the performance test in a command line execution mode if the third parameter is a fourth target value.
Optionally, the method further includes:
obtaining the result of the performance test of the interface test case;
verifying the result of the performance test according to the expected test result in the interface test case;
and generating a test report according to the verification result.
In another aspect, a performance testing apparatus is provided, including:
the system comprises a creating module, a test execution module and a control module, wherein the creating module is used for calling a preset method keyword in the process of executing an automated test based on an interface test case, and the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case;
the analysis module is used for executing a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data;
and the test module is used for executing performance test on the interface to be tested aiming at the interface test case according to the performance test script and the performance test data.
In one possible embodiment, the creating module includes:
the parameter configuration unit is used for executing a method for generating a performance test script and data corresponding to the interface test case, and determining a parameter value of a first parameter and a parameter value of a second parameter; the first parameter indicates whether to generate the performance test data, and the second parameter indicates whether to perform the performance test;
a script generation unit, configured to generate the performance test script and the performance test data when the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value.
In one possible implementation, the creating module further includes:
the initial keyword acquisition unit is used for responding to a method keyword generation instruction aiming at the interface test case and acquiring an initial keyword corresponding to the interface test case;
a first parameter obtaining unit configured to obtain the parameter value of the first parameter and the parameter value of the second parameter, which are input based on a parameter configuration unit;
a method keyword generation unit configured to generate the method keyword according to the initial keyword, the parameter value of the first parameter, and the parameter value of the second parameter;
and the calling unit is used for establishing a calling relation between an automatic test framework corresponding to the automatic test and the method keywords.
In one possible embodiment, the test module comprises:
a second parameter obtaining unit, configured to determine a parameter value of a third parameter, where the third parameter indicates a mode in which the interface test case executes the performance test;
a first execution unit configured to determine to execute the performance test in a web execution mode if the third parameter is a third target value;
a second execution unit to determine to execute the performance test in a command line execution mode if the third parameter is a fourth target value.
In one possible embodiment, the performance testing apparatus further includes:
the execution recording unit is used for acquiring the result of the performance test of the interface test case;
the verification unit is used for verifying the result of the performance test according to the expected test result in the interface test case;
and the test report generating unit is used for generating a test report according to the verified result.
In another aspect, an electronic device is provided, which includes a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the steps of the performance testing method as described above.
In another aspect, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, the at least one instruction or the at least one program being loaded and executed by a processor to implement the steps of the performance testing method as described above.
The beneficial effect that adopts above-mentioned technical scheme's obtaining is:
the embodiment of the invention can automatically generate the performance test script and the performance test data by calling the packaged method key words for generating the performance test script and the data and executing the performance test without additionally preparing the performance data and compiling the performance test script, thereby greatly improving the efficiency of the performance test and reducing the test cost.
Additional features and advantages of the invention will be set forth in the detailed description which follows.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that are required to be used in the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, wherein like reference numerals generally represent like parts. For a person skilled in the art, without inventive effort, further figures can be obtained from these figures.
Fig. 1 is a schematic flow chart of a performance testing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an optional method for invoking a preset method keyword, where the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a performance testing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a server for operating a performance testing method according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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 invention.
Reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic may be included in at least one implementation of the invention. In the description of the present invention, it is to be understood that the terms "upper", "lower", "top", "bottom", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are only for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," and the like 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 invention described herein are capable of operation in sequences other than those illustrated or described herein.
Referring to fig. 1, a flow chart of a performance testing method according to an embodiment of the present invention is shown. It is noted that the present specification provides the method steps as described in the examples or flowcharts, but may include more or less steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In actual system or product execution, sequential execution or parallel execution (e.g., parallel processor or multi-threaded environment) may be possible according to the embodiments or methods shown in the figures. The performance test method provided by the embodiment of the invention comprises the following steps:
s101, calling a preset method keyword in the process of executing the automated test based on the interface test case, wherein the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case.
Specifically, the test case is an expression of a complete software test process composed of one or more test steps, the automatic test is generally based on a functional test, and the performance test is performed on one interface of the test case. The embodiment of the invention selects the test case according to the actual requirement, performs the performance test on one interface, and obtains the test case input by the user by receiving the input instruction, or obtains the pre-stored test case from the storage unit, or obtains the test case by receiving the data transmitted by other devices.
According to the interface test case, presetting method keywords which comprise execution steps corresponding to a method for generating a performance test script and data corresponding to the interface test case, wherein a method keyword file is a file which can be identified and read by an automatic test device so as to execute a performance test process of the interface test case. And the performance testing device calls the method keywords to generate a performance testing script and a data method corresponding to the interface testing case.
S102, executing a method for generating the performance test script and the data corresponding to the interface test case to obtain the performance test script and the performance test data.
In a possible embodiment, the step S102, when executing the method for generating the performance test script and the performance test data corresponding to the interface test case to obtain the performance test script and the performance test data, may include the following steps:
(1) executing a method for generating a performance test script and data corresponding to the interface test case, and determining a parameter value of a first parameter and a parameter value of a second parameter; the first parameter indicates whether to generate the performance test data, and the second parameter indicates whether to perform the performance test;
(2) generating the performance test script and the performance test data when the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value.
Specifically, two interface variables are preset in the method keyword: the device comprises a first parameter and a second parameter, wherein the first parameter and the second parameter can be respectively provided with two parameter values, and under the condition that the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value, a performance test script and performance test data are generated corresponding to an interface to be tested of a test case. In one embodiment, the parameter value of the first parameter may be 0 or 1, when the parameter value of the first parameter is 0, indicating that the performance test data is not generated, and when the parameter value is 1, indicating that the performance test data is generated; the parameter value of the second parameter value may also be 0 or 1, and when the parameter value of the second parameter is 0, it is indicated that the performance test is not to be performed, and when the parameter value is 1, it is indicated that the performance test is to be performed.
The method key words corresponding to the test case interface are formed by introducing the first parameter and the second parameter into the key words, the method key words can be directly called to execute the performance test, the parameter values of the first parameter and the second parameter can be set by self, a script of the performance test does not need to be written additionally, the operation is simple, and the test flow is simplified.
And in the process of executing the method for generating the performance test script and the data corresponding to the interface test case to obtain the performance test script and the performance test data, calling the method keywords based on the calling relation between the automatic test framework corresponding to the automatic test and the method keywords, and indicating the method for generating the performance test script and the data corresponding to the interface test case.
Based on this, the method may further include a step of establishing a call relationship between the automated test framework and the method keyword, specifically please refer to fig. 2, which is a schematic flow diagram of an optional method for establishing a call relationship between the automated test framework and the method keyword according to an embodiment of the present invention, including:
s201, responding to a method keyword generation instruction aiming at the interface test case, and acquiring an initial keyword corresponding to the interface test case;
s202, acquiring the parameter value of the first parameter and the parameter value of the second parameter input by a parameter configuration unit;
s203, generating the method keyword according to the initial keyword, the parameter value of the first parameter and the parameter value of the second parameter;
and S204, establishing a calling relation between an automatic test framework corresponding to the automatic test and the method keywords.
Specifically, in general, a keyword file is created according to a test step in a test case, the keyword file is composed of an execution step, the execution step is correspondingly created according to the test step in the test case, and the test device calls the keyword corresponding to the test case and analyzes the keyword, and sequentially executes the corresponding test steps. The execution step comprises test object keywords and action keywords, wherein the test object keywords are keywords corresponding to a test object to be tested currently, and the test object is a to-be-tested interface selected for an interface test case in the embodiment; the action keywords are keywords corresponding to the test action to be executed on the test object. Now, in an initial keyword corresponding to an interface test of a test case, a first parameter is introduced into a test object keyword, a second parameter is introduced into an action keyword, a corresponding target parameter value is preset, a new method keyword is generated, a method for generating a performance test script and data and executing the performance test on the test interface is indicated, a test device calls the method keyword, the automatic test of the interface to be tested of the test case is executed, and the performance test is executed at the same time, so that a tester does not need to write the performance test script additionally.
The method comprises the steps that a calling method keyword is based on a calling relation between an automatic testing frame corresponding to automatic testing and the method keyword, the automatic frame is a testing frame based on keyword driving, in one embodiment, a RobotFrameWork testing frame is selected, the RobotFrameWork testing frame is provided with table testing data grammar which is easy to use, a keyword driving testing method is used, the testing function of the RobotFrameWork can be expanded through a testing library which is realized by using Python or Java, a new keyword with a higher level is created from an existing keyword, a first parameter and a second parameter can be introduced into an initial keyword, and performance testing can be executed while automatic testing is realized. The robotframe version described in this embodiment is 3.0.4.
S103, according to the performance test script and the performance test data, performing performance test on the interface to be tested aiming at the interface test case.
In a possible embodiment, step S103 may include, before performing a performance test on the interface to be tested according to the performance test script and the performance test data and aiming at the interface test case, the following steps:
(1) determining a parameter value of a third parameter, wherein the third parameter indicates a mode of the interface test case for executing the performance test;
(2) determining to execute the performance test in a web execution mode if the third parameter is a third target value;
(3) determining to execute the performance test in a command line execution mode if the third parameter is a fourth target value.
Specifically, the performance test for the interface to be tested supports a web execution mode and a command line execution mode. After the step S102 is executed, a performance test script and performance test data are generated, a third parameter is set in the performance test script, a parameter value of the third parameter indicates a mode in which the test interface executes the performance test, and the third parameter may set two parameter values, where the two parameter values respectively indicate a mode in which the interface to be tested executes the performance test. In one embodiment, with 0 and 1, when the parameter value of the third parameter is set to 0, the interface to be tested performs the performance test in a web execution mode; and when the parameter value of the third parameter is set to be 1, the interface to be tested executes the performance test in a command line execution mode.
Aiming at the condition that different performance tests exist in the to-be-tested interface of the test case, the third parameter is set, so that the performance tests in different modes can be executed according to the actual condition after the method keywords are called, the unicity of the performance tests is improved, and the performance test process is more flexible.
In one possible embodiment, after performing the performance test on the interface test case, the method further includes the steps of:
(1) obtaining the result of the performance test of the interface test case;
(2) verifying the result of the performance test according to the expected test result in the interface test case;
(3) and generating a test report according to the verification result.
Specifically, the performance testing apparatus in the embodiment of the present invention executes the testing module, executes the performance test on the interface to be tested according to the performance testing script and the performance testing data, and records the execution result information of the execution step after executing the statement, thereby completing the test. And after the test module obtains the test result, the test result is imported into the test result file according to a preset format, and a test report is generated. After the test result is imported into the test result file, the test result file can be further sent to the management terminal through the communication connection with the management terminal, so that an administrator can read the test result.
Corresponding to the performance testing method, an embodiment of the present invention further provides a performance testing apparatus, please refer to fig. 3, which is a schematic structural diagram of the performance testing apparatus according to the embodiment of the present invention, and the apparatus has a function of implementing the performance testing method according to the embodiment of the method, where the function may be implemented by hardware or implemented by hardware executing corresponding software. As shown in fig. 3, the apparatus may include:
the creating module 310 is configured to call a preset method keyword in a process of executing an automated test based on an interface test case, where the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case;
the analysis module 320 is configured to execute a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data;
the parsing module 320 parses each execution step in the method keywords into execution statements that can be identified by the automated testing framework, and after the automated testing framework obtains the execution statements, combines the program execution testing steps correspondingly to complete the automated testing and performance testing process.
The test module 330 is configured to execute a performance test on the interface to be tested according to the performance test script and the performance test data.
In one possible embodiment, the performance testing apparatus further includes:
the obtaining module 340 is configured to obtain an interface test case, where the interface test case includes at least one testing step.
The obtaining module 340 may obtain the interface test case input by the user by receiving the input instruction, obtain a pre-stored test case from the storage unit, and select a test interface therein, or obtain the interface test case by receiving data transmitted by other devices.
In one possible implementation, the creating module 310 includes:
the parameter configuration unit is used for executing a method for generating a performance test script and data corresponding to the interface test case, and determining a parameter value of a first parameter and a parameter value of a second parameter; the first parameter indicates whether to generate the performance test data, and the second parameter indicates whether to perform the performance test;
a script generation unit, configured to generate the performance test script and the performance test data when the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value.
In one possible implementation, the creating module 310 further includes:
the initial keyword acquisition unit is used for responding to a method keyword generation instruction aiming at the interface test case and acquiring an initial keyword corresponding to the interface test case;
a first parameter obtaining unit configured to obtain the parameter value of the first parameter and the parameter value of the second parameter, which are input based on a parameter configuration unit;
a method keyword generation unit configured to generate the method keyword according to the initial keyword, the parameter value of the first parameter, and the parameter value of the second parameter;
and the calling unit is used for establishing a calling relation between an automatic test framework corresponding to the automatic test and the method keywords.
In one possible embodiment, the test module 330 further includes:
a second parameter obtaining unit, configured to determine a parameter value of a third parameter, where the third parameter indicates a mode in which the interface test case executes the performance test;
a first execution unit configured to determine to execute the performance test in a web execution mode if the third parameter is a third target value;
a second execution unit to determine to execute the performance test in a command line execution mode if the third parameter is a fourth target value.
In one possible embodiment, the test module 330 further includes:
the execution recording unit is used for acquiring the result of the performance test of the interface test case;
the verification unit is used for verifying the result of the performance test according to the expected test result in the interface test case;
and the test report generating unit is used for generating a test report according to the verified result.
The embodiment of the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the steps of the performance testing method as described above.
The memory may be used to store software programs and modules, and the processor may execute various functional applications by executing the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory. The processor may be a central processing unit, but may also be other general purpose processors, such as a microprocessor or the processor may be any conventional processor, a digital signal processor, an application specific integrated circuit or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
The method provided by the embodiment of the invention can be executed in a computer terminal, a server or a similar operation device. Taking an example of the server running on the server, fig. 4 is a schematic diagram of a hardware structure of the server running a performance testing method according to the embodiment of the present invention, as shown in fig. 4, the server 400 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 410 (the processors 410 may include but are not limited to Processing devices such as a microprocessor MCU or a programmable logic device FPGA), a memory 430 for storing data, and one or more storage media 420 (e.g., one or more mass storage devices) for storing applications 423 or data 422. Memory 430 and storage medium 420 may be, among other things, transient or persistent storage. The program stored on the storage medium 420 may include one or more modules, each of which may include a series of instruction operations on a server. Further, the processor 410 may be configured to communicate with the storage medium 420 to execute a series of instruction operations in the storage medium 420 on the server 400. The server 400 may also include one or more power supplies 460, one or more wired or wireless network interfaces 450, one or more input-output interfaces 440, and/or one or more operating systems 421, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The input/output interface 440 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 400. In one example, the input/output Interface 440 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the input/output interface 440 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 4 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 400 may also include more or fewer components than shown in FIG. 4, or have a different configuration than shown in FIG. 4.
The embodiment of the present invention further provides a computer-readable storage medium, where at least one instruction or at least one program is stored in the computer-readable storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the steps of the performance testing method as described above. In the present embodiment, the computer program comprises computer program code, which may be in source code form, object code form, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunications signal, software distribution medium, etc.
Embodiments of the present invention also provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the performance testing method provided in the various alternative implementations described above.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method of performance testing, comprising:
calling a preset method keyword in the process of executing an automated test based on an interface test case, wherein the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case;
executing a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data;
and executing performance test on the interface to be tested according to the performance test script and the performance test data and aiming at the interface test case.
2. The performance testing method according to claim 1, wherein the step of executing a method for generating the performance testing script and the data corresponding to the interface testing case to obtain the performance testing script and the performance testing data comprises:
executing a method for generating a performance test script and data corresponding to the interface test case, and determining a parameter value of a first parameter and a parameter value of a second parameter; the first parameter indicates whether to generate the performance test data, and the second parameter indicates whether to perform the performance test;
generating the performance test script and the performance test data when the parameter value of the first parameter is a first target value and the parameter value of the second parameter is a second target value.
3. The performance testing method of claim 2, further comprising:
responding to a method keyword generation instruction aiming at the interface test case, and acquiring an initial keyword corresponding to the interface test case;
acquiring the parameter value of the first parameter and the parameter value of the second parameter input by a parameter configuration unit;
generating the method keyword according to the initial keyword, the parameter value of the first parameter and the parameter value of the second parameter;
and establishing a calling relation between an automatic test framework corresponding to the automatic test and the method keywords.
4. The performance testing method of claim 3, wherein invoking the preset method key comprises:
and calling the preset method keywords based on the calling relation between the automatic test frame corresponding to the automatic test and the method keywords.
5. The performance testing method of claim 4, the automated testing framework being a keyword-driven based testing framework.
6. The performance testing method of claim 1, wherein before performing the performance test on the interface to be tested for the interface test case according to the performance testing script and the performance testing data, the method further comprises:
determining a parameter value of a third parameter, wherein the third parameter indicates a mode of the interface test case for executing the performance test;
determining to execute the performance test in a web execution mode if the third parameter is a third target value;
determining to execute the performance test in a command line execution mode if the third parameter is a fourth target value.
7. The performance testing method of claim 1, further comprising:
obtaining the result of the performance test of the interface test case;
verifying the result of the performance test according to the expected test result in the interface test case;
and generating a test report according to the verified result.
8. A performance testing device, comprising:
the system comprises a creating module, a test execution module and a control module, wherein the creating module is used for calling a preset method keyword in the process of executing an automated test based on an interface test case, and the method keyword indicates a method for generating a performance test script and data corresponding to the interface test case;
the analysis module is used for executing a method for generating a performance test script and data corresponding to the interface test case to obtain the performance test script and the performance test data;
and the test module is used for executing performance test on the interface to be tested aiming at the interface test case according to the performance test script and the performance test data.
9. An electronic device comprising a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the steps of the performance testing method as described above. The process steps of any one of claims 1 to 7.
10. A computer-readable storage medium, in which at least one instruction or at least one program is stored, which is loaded and executed by a processor to implement the steps of the method according to any one of claims 1 to 7.
CN202111656672.4A 2021-12-30 2021-12-30 Performance test method and device, electronic equipment and storage medium Pending CN114385493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111656672.4A CN114385493A (en) 2021-12-30 2021-12-30 Performance test method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111656672.4A CN114385493A (en) 2021-12-30 2021-12-30 Performance test method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114385493A true CN114385493A (en) 2022-04-22

Family

ID=81200493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111656672.4A Pending CN114385493A (en) 2021-12-30 2021-12-30 Performance test method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114385493A (en)

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
CN109388535A (en) A kind of storing performance testing method, device and application server
CN105120483B (en) Automatic testing method and system for compatibility of smart card and mobile terminal
CN107391362A (en) Application testing method, mobile terminal and storage medium
CN111158741A (en) Method and device for monitoring change of dependency relationship of business module on third-party class library
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN110543427A (en) Test case storage method and device, electronic equipment and storage medium
CN115757014A (en) Power consumption testing method and device
CN111209188A (en) Testing method and device for distributed storage system
CN112988578A (en) Automatic testing method and device
CN112416747A (en) Test case execution method, device, equipment and medium
CN111427582A (en) Management method, device and equipment of RT L code and computer readable storage medium
CN114385493A (en) Performance test method and device, electronic equipment and storage medium
CN110609786A (en) Software testing method and device, computer equipment and storage medium
CN115827410A (en) Test method and device of performance evaluation tool, test equipment and storage medium
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN110806967A (en) Unit testing method and device
CN114218072A (en) Test script generation method and device, storage medium and computer equipment
CN112346994A (en) Test information correlation method and device, computer equipment and storage medium
CN112433946A (en) Interface test management method, device, equipment and storage medium
CN112860585A (en) Test script assertion generation method and device
CN111881021A (en) Interface test method, device and system
CN112988585B (en) PaaS platform testing method, paaS platform testing device, paaS platform testing equipment and PaaS platform testing medium
CN114401032B (en) Testing method and system for satellite communication comprehensive tester

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