WO2020082585A1 - Method and device for interface testing - Google Patents

Method and device for interface testing Download PDF

Info

Publication number
WO2020082585A1
WO2020082585A1 PCT/CN2018/123986 CN2018123986W WO2020082585A1 WO 2020082585 A1 WO2020082585 A1 WO 2020082585A1 CN 2018123986 W CN2018123986 W CN 2018123986W WO 2020082585 A1 WO2020082585 A1 WO 2020082585A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
pressure
interface
tested
parameter
Prior art date
Application number
PCT/CN2018/123986
Other languages
French (fr)
Chinese (zh)
Inventor
程学峰
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020082585A1 publication Critical patent/WO2020082585A1/en

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/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present application belongs to the field of information processing technology, and in particular relates to an interface testing method and equipment.
  • the terminal device contains many interfaces. In order to detect the data processing capability of the interface in actual applications, it is often necessary to perform stress tests on each interface.
  • the existing interface testing method requires the user to manually configure the pressure parameters for each operating parameter.
  • the number of interfaces is large, it takes a lot of manpower to perform Configuration reduces the efficiency of stress testing.
  • the embodiments of the present application provide an interface testing method and equipment to solve the existing interface testing technology, which requires the user to manually configure the pressure parameters for each operating parameter. When there are many interfaces, then It takes more manpower to configure, which reduces the problem of the efficiency of stress testing.
  • the first aspect of the embodiments of the present application provides an interface testing method, including:
  • the interface information records the rated operating parameters of each interface to be tested in the test object;
  • a pressure test script is generated, and then the control test is run corresponding to the pressure test script to obtain each
  • FIG. 1 is an implementation flowchart of an interface testing method provided by the first embodiment of the present application
  • FIG. 2 is a specific implementation flowchart of an interface testing method S102 provided in a second embodiment of the present application
  • FIG. 3 is a flowchart of a specific implementation of an interface testing method S104 provided in a third embodiment of the present application.
  • FIG. 4 is a specific implementation flowchart of an interface testing method provided by a fourth embodiment of the present application.
  • FIG. 5 is a flowchart of a specific implementation of an interface testing method S104 provided in a fifth embodiment of the present application.
  • FIG. 6 is a structural block diagram of a terminal device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a terminal device according to another embodiment of the present application.
  • the execution subject of the process is a terminal device.
  • the terminal equipment includes but is not limited to: computers, smart phones, and tablet computers that can perform interface testing.
  • FIG. 1 shows an implementation flowchart of the interface testing method provided in the first embodiment of the present application, which is described in detail as follows:
  • the interface information of the test object is obtained; the interface information records the rated operating parameters of each interface to be tested in the test object.
  • the terminal device may perform a stress test on the interface within the test object to determine the robustness of each interface. Since the test object is not in the rated working state at all times during the actual operation, it may be in an overload state. Therefore, whether the test object can run stably under the overload state will directly affect the stability of the test object as a whole. Based on this Before the test object leaves the factory or is released, it is necessary to perform a pressure test on each interface to determine the operating parameters of each interface of the test object under overload and determine whether it meets the factory or release standards. The terminal device can identify all the interfaces included in the test object as the interface to be tested.
  • the terminal device will traverse each interface of the analysis test object, obtain the rated operating parameters of each interface, and based on the corresponding ratings of all interfaces Run parameters generate interface information.
  • the terminal device can also select a part of the interface from the test object as the interface to be tested. Specifically, the terminal device can select an interface of a certain type or types of interfaces as the interface to be tested for this stress test according to the interface type of each interface, and can also receive a list of interfaces to be tested preset by the user based on the test to be tested The interface list obtains the rated operating parameters of each interface to be tested from the test object and generates interface information.
  • the rated operating parameter specifically refers to: the data processing capability of the interface to be tested under the rated operating environment.
  • the rated operating parameter can be a range of parameter values. Since the operating parameters of each interface may float during operation, in order to more accurately determine the data processing capability of the interface under test in the rated operating environment, you can pass
  • the parameter value range represents the rated operating parameter, that is, under the rated operating environment, when the actual operating parameter of the interface to be tested is within this parameter value range, it indicates that the interface to be tested is in a normal state.
  • Rated operating parameters can be used to define the operating parameters of the input signal and / or the output signal of the interface to be tested, for example, the operating parameters of the input signal can include: the transmission rate of the input signal, the number of concurrent threads, and the rated data of a single file
  • the operating parameters of the output signal can include: data processing rate, bit error rate, etc.
  • the test object may be a physical device.
  • the terminal device may establish a communication connection with the physical device, and send an interface information reporting request to the physical device, so that the physical device can test each interface to be tested.
  • the rated operating parameters are summarized, interface information is generated and returned to the terminal device.
  • the terminal device may also obtain product design information of the device model according to the device model of the physical device, and obtain rated operating parameters of each interface to be tested based on the product design information, and generate interface information.
  • the test object can also be an application program.
  • the terminal device can parse the program file of the application program, determine the virtual interface contained in the program file, and obtain the corresponding rated operating parameters according to the interface identifier corresponding to each virtual interface to generate the interface information. It should be noted that if the test object is an application, the application can be installed on the terminal device or any other device, which is not limited herein.
  • the rated operating parameters are respectively imported into a pressure test parameter conversion model, the pressure test parameters of each interface to be tested are calculated, and a pressure test script of the test object is generated based on the pressure test parameters.
  • the terminal device since the terminal device needs to perform a pressure test on each interface to be tested, it is necessary to place each interface to be tested in an overloaded operating environment, so as to collect the operation status of each interface to be tested under an overloaded environment, to Generate stress test report. Based on this, the terminal device will configure a pressure test parameter matching the rated operating parameter for each interface to be tested according to the rated operating parameter of each interface to be tested. As the parameter value of the rated operating parameter is larger, it means that the data processing capability of the interface to be tested is higher, and the corresponding pressure test parameter should also be increased accordingly; and the smaller the parameter value of the rated operating parameter, it means that the interface of the test is to be tested. The data processing capability is low, and the corresponding pressure test parameters should be reduced accordingly.
  • the pressure test parameters of each interface to be tested are related to its rated operating parameters, and the terminal device will generate a pressure test parameter conversion model based on the conversion relationship between the two. After the terminal device receives the rated operating parameters of the interface to be tested , Then each rated operating parameter can be separately imported into the pressure test parameter conversion model to calculate the pressure test parameter corresponding to each rated operating parameter.
  • the pressure test parameter conversion model is configured with a pressure measurement ratio, and the parameter value of the rated operating parameter is adjusted based on the pressure measurement ratio to obtain a corresponding pressure test parameter conversion model.
  • the preset pressure measurement ratio is 50%
  • a certain rated operating parameter is the transmission rate
  • the parameter value is 100M / s
  • the parameters can be calculated in the above manner.
  • the pressure measurement ratio in the pressure test parameter calculation model may be fixed, that is, the pressure measurement ratio is the same for each interface to be tested, and of course, the pressure measurement ratio may also be changed.
  • the terminal device may determine the pressure measurement ratio with the interface type according to the interface type of the interface to be tested, and adjust the pressure test parameter conversion model based on the pressure measurement ratio, and import the rated operating parameters of the interface to be tested into the adjustment After the pressure test parameter conversion model, the pressure measurement ratio of the pressure test parameter conversion model can be dynamically adjusted in the above manner, thereby improving the accuracy of the pressure test parameter.
  • the terminal device may adjust each interface test instance based on the pressure test parameter, and generate a pressure test script about the test object based on each interface test instance.
  • the stress test script is sent to the test object, and the test object is controlled to run the stress test script to collect test data output by each interface to be tested based on the stress test script.
  • the terminal device may send the stress test script to the test object, and send a stress test start instruction to the test object, so that the test object starts the stress test process.
  • the terminal device may establish a communication link with each test interface in the physical device through the communication interface, and configure a corresponding excitation signal for each test interface, and then the physical device According to the excitation signal and the stress test script, each interface to be tested can be stress-tested; if the test object is an application, the terminal device can configure the corresponding based on the input data type of each interface to be tested and the corresponding pressure test parameters Training samples, import each training sample to each interface to be tested, and realize the stress test of each interface to be tested.
  • the terminal device collects the actual operating parameters during the pressure test process of each interface to be tested and the output results of each interface to be tested, and generates test data according to the actual operating parameters and the output results.
  • the actual operating parameters include, but are not limited to: the resource occupancy rate, data processing rate, and response time of the test object.
  • the terminal device can determine whether the test object can be carried out within the preset operating range under the overload state based on the actual operation parameters Data processing, and based on the training samples of each excitation signal, determine whether the output results match the training samples to determine whether the proportion of abnormal responses.
  • the terminal device may separately perform stress tests on each interface to be tested , That is, test each interface to be tested in turn according to the stress test script.
  • the terminal device can recognize the correlation between the interfaces to be tested, select multiple interfaces to be tested with a low correlation as concurrent test interfaces, and perform concurrent tests on the concurrent test interfaces, thereby improving test efficiency.
  • test data is imported into a data analysis template associated with the test object, and a stress test report on the test object is generated.
  • the terminal device may obtain the data analysis template corresponding to the object identifier from the data analysis database according to the object identifier of the test object, as the data analysis template associated with the test object.
  • the data analysis template records the verification algorithm of each interface to be tested.
  • the terminal device will parse the test data of each interface to be tested from the test data and import it into the corresponding verification algorithm in the data analysis template to determine each Test the test results of the interface and generate a stress test report based on each test result.
  • test object is identified as a qualified object, and subsequent follow-up factory or release links can be carried out; otherwise, if any of the test reports If the test result of the test interface is that the test fails, abnormal test information is generated, and the abnormal test interface is recorded in the test abnormal information, so that the developer can adjust the abnormal test interface to be tested.
  • the test data may be a jtl format file, that is, when the stress test script is executed, the test data of each interface to be tested is obtained through the jmeter program, and the corresponding jtl file is generated Because of the low readability of the jtl file, the terminal device can parse the jtl file and import the test results of the interfaces to be tested in the jtl file into the data analysis template in HTML format to generate HTML about the test object The HTML page is used to display the test results, which can be easily read by each user, thereby improving the readability of the test report.
  • an interface test method obtained by an embodiment of the present application obtains interface information of a test object and configures a corresponding pressure test parameter for each interface that needs to be subjected to a pressure test according to the interface information to generate a pressure test script.
  • control test is run corresponding to the stress test script to obtain the test data output by each interface to be tested and generate a stress test report, without requiring the user to configure stress test parameters for each interface, which improves the efficiency of the stress test, and the terminal equipment will also Analyze the test data, import the corresponding data analysis template, and generate a more readable test report, without the user's experience and test data to determine whether the interface is abnormal, improve the readability of the test results, even non-technical personnel can Clearly understand the test situation of each interface.
  • FIG. 2 shows a specific implementation flowchart of an interface testing method S102 provided by the second embodiment of the present application.
  • the method for interface testing provided in this embodiment separately imports each of the rated operating parameters into a pressure test parameter conversion model to calculate the pressure of each of the interfaces to be tested Test parameters, including: S1021 ⁇ S1025, detailed as follows:
  • the memory capacity and cache capacity of the test object are obtained, and the average text capacity and the number of rated threads are extracted from the rated operating parameters.
  • each test object after receiving data, each test object will first store the data in the cache area, and based on the data type of the data and the operation to be performed, it will be transferred from the cache area to the corresponding memory area Perform arithmetic processing. Therefore, the data processing capability of a test object is not only related to the data processing capability of the interface, but also related to the memory capacity and cache capacity of the test object. Based on this, the terminal device needs to determine the pressure test parameters before determining The storage capacity of the test object, so the memory capacity and cache capacity of the test object will be obtained.
  • the terminal device extracts the average text capacity and the number of rated threads from the rated operating parameters, where the average text capacity specifically refers to the average value of the file data volume when the interface under test receives file data ;
  • the number of rated threads is specifically the number of threads that the interface can maintain simultaneously under the rated operating environment during the operation of the interface to be tested, for example, an interface can establish communication connections with multiple user terminals at the same time, and each communication Each link requires an independent concurrent thread for maintenance, so the number of connected user terminals is the number of threads corresponding to the interface.
  • the average text volume is imported into a first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested;
  • the first pressure parameter conversion conversion model is specifically:
  • DocVol is the first pressure parameter
  • Scale is the pressure measurement ratio
  • DocVol 0 is the average text volume.
  • the pressure test parameters include three types of pressure parameters, which are a first pressure parameter related to the text volume, a second pressure parameter related to the maximum concurrent thread, and a third pressure test parameter related to the pressure test running time.
  • a first pressure parameter related to the text volume a second pressure parameter related to the maximum concurrent thread
  • a third pressure test parameter related to the pressure test running time you can determine the data processing situation of the interface to be tested in the overload state. If the maximum text capacity is larger, it means that the interface to be tested can quickly process a single file with a large amount of data. That is, the larger the range of processing files, and the more the maximum number of concurrent threads, the higher the parallel data processing capability of the interface to be tested.
  • the average text volume is imported into the first pressure parameter conversion model to determine the first pressure test parameter corresponding to the average text volume, so as to calculate the amount of text data for each training sample during the stress test.
  • the greater the amount of text data the greater the computational pressure on the interface to be tested.
  • the terminal device will calculate the first pressure parameter based on the preset pressure measurement ratio and the average text volume.
  • the number of rated threads is imported into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested;
  • the second pressure parameter conversion conversion model is specifically:
  • ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads.
  • the terminal device imports the number of rated threads into the second pressure parameter conversion model to determine the second pressure test parameter corresponding to the number of rated threads, thereby determining the concurrency required to be called during the pressure test The number of threads. As the number of concurrent threads increases, the test object needs to process multiple data at the same time, so the corresponding arithmetic processing capability is greater. The terminal device will calculate the second pressure parameter based on the preset pressure measurement ratio and the number of rated threads.
  • the first pressure parameter, the second pressure parameter, the memory capacity, and the cache capacity are imported into a third pressure parameter conversion model to calculate the third pressure parameter of the interface to be tested;
  • the third pressure parameter conversion model is specifically:
  • RunTime is the third pressure parameter
  • RAM is the memory capacity
  • Cache is the cache capacity
  • the file size of each training sample is the first stress test parameter, and the amount of instantaneous data received by the test object at a certain time is specific It is: ThreadNum * DocVol, and the test object can store the training samples in the cache area and the content area, so the running time of the stress test, that is, the third stress parameter can be based on the ratio between (RAM + Cache) and (ThreadNum * DocVol) Make sure.
  • the test terminal can perform arithmetic processing on the data when it receives the data and eliminates the processed data, the value of the pressure measurement ratio may be greater than 1.
  • a pressure test parameter of the interface to be tested is generated based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  • the terminal device packages and integrates the first pressure parameter, the second pressure parameter, and the third pressure parameter to obtain the pressure test parameter of the interface to be tested.
  • the terminal device can package and integrate the three pressure parameters in the form of an array.
  • the pressure test parameters of the interface to be tested are generated by calculating the three types of pressure parameters of the interface to be tested respectively, and the data processing capability of the interface is characterized by multiple dimensions, so that the pressure test script can be improved.
  • the matching degree of the interface so as to accurately test the interface.
  • FIG. 3 shows a specific implementation flowchart of an interface testing method S104 provided in the second embodiment of the present application.
  • the method for interface testing provided in this embodiment imports the test data into a data analysis template associated with the test object to generate information about the test object.
  • Stress test report including: S1041 ⁇ S1044, detailed as follows:
  • a pressure measurement trajectory curve about the interface to be tested is generated according to the test data.
  • the terminal device will acquire the interface parameters of each interface to be tested within a preset collection time period, so the test data corresponding to each interface to be tested contains the operating parameter values corresponding to multiple collection points. Based on the collection time of each collection point, each collection point is marked on a preset coordinate axis, thereby generating a pressure measurement trajectory curve about the interface to be tested.
  • the terminal device can determine whether the divergence point is included in the pressure measurement trajectory curve through a divergence point recognition algorithm, for example, the derivative value corresponding to a certain collection point is less than the first threshold, and the derivative value of the collection point adjacent to the collection point If the values are opposite to each other, and the value is greater than the second threshold, it can be determined that the collection point is a divergence point, and the collection point is smoothed out.
  • a divergence point recognition algorithm for example, the derivative value corresponding to a certain collection point is less than the first threshold, and the derivative value of the collection point adjacent to the collection point If the values are opposite to each other, and the value is greater than the second threshold, it can be determined that the collection point is a divergence point, and the collection point is smoothed out.
  • a standard trajectory curve of the interface to be tested and the pressure trajectory curve are drawn on a preset coordinate axis, and the distance between each coordinate point on the standard trajectory curve and the pressure trajectory curve is obtained value.
  • the terminal device may display the standard trajectory curve of the interface to be tested on the same coordinate axis as the pressure measurement trajectory curve, thereby comparing the pressure measurement trajectory curve and the standard trajectory
  • the curve can identify the degree of deviation of the interface to be tested from the ideal situation during the actual operation. Therefore, the terminal device may use the distance between each coordinate point on the standard trajectory curve and the corresponding coordinate point on the pressure trajectory curve as the deviation value between the two curves.
  • an average distance between the standard trajectory curve and the pressure measurement trajectory curve is calculated based on the distance value of each coordinate point, and the average distance is used as the pressure measurement response level of the interface to be tested.
  • the terminal device can calculate the average distance between the two curves according to the distance value of each coordinate point.
  • the terminal device can weight the different distance values according to the collection time corresponding to each coordinate point , And then averaged after the weighted operation, thereby determining the average distance between the two trajectory curves.
  • the coordinate point corresponding to the later collection time has a larger weighting weight
  • the coordinate point corresponding to the earlier collection time has a smaller weighting weight.
  • the coordinate points with a later acquisition time indicate that the longer the interface to be tested runs in an overloaded environment, the more robust the interface can be characterized, so the corresponding weight should also be greater.
  • the terminal device can use the average distance as the pressure test response level of the interface to be tested.
  • the pressure test report is generated according to the pressure test response level of each interface to be tested.
  • the terminal device may generate a correspondence table about the interface to be tested and the response level of the pressure test, and the user may quickly determine the data processing capability of the overload state of each interface to be tested through the correspondence table.
  • the terminal device can also encapsulate the rated operating parameters, pressure test parameters, the corresponding relationship, standard trajectory curve and / or pressure trajectory curve table of each interface to be tested to generate the pressure test report, so that the user can easily determine each The operating parameters of the interface to be tested.
  • FIG. 4 shows a specific implementation flowchart of an interface testing method provided by a fourth embodiment of the present application.
  • the test object is controlled to run the stress test script to collect each of the interfaces to be tested After the test data output based on the stress test script, it also includes: S401 to S403, which are described in detail as follows:
  • the method further includes:
  • the interface to be tested is determined according to the current time and the startup time corresponding to running the test script Pressure test running time.
  • the test object will feed back test data to the terminal device at a preset time interval during the stress test.
  • the terminal device will set a data reception timer.
  • the test Set the count value of the reception timer. If the count value of the counter is greater than the waiting time threshold, it means that the test object has not sent test data to the terminal device according to the preset data feedback process.
  • the interface to be tested is in an abnormal state, for example, in a down state , Or the interface data is blocked.
  • the reason for the above situation may be that the pressure test parameter is too high, which exceeds the processing range of the interface to be tested, so the pressure test parameter needs to be adjusted.
  • the terminal device will obtain the time value of the current time, and the time value of the corresponding startup time when running the test script, and based on the difference between the two time values, it may be determined that the interface to be tested is running The stress test running time of the stress test script.
  • the pressure test parameter of the interface to be tested is adjusted based on the pressure test running time.
  • the terminal device may reduce the pressure test parameters according to the pressure test running time, thereby preventing the pressure test script from exceeding the executable range of the interface to be tested.
  • the terminal device can calculate the ratio between the pressure test running time and the preset pressure test time, reduce each pressure test parameter of the interface to be tested in proportion, and identify the reduced pressure test parameter as the adjusted pressure test parameter .
  • the terminal device re-imports the adjusted stress test parameters into the stress test script, and re-tests the test object according to the adjusted stress test script, and collects each interface to be tested under the stress test script The output test data.
  • the pressure test parameters are automatically adjusted by collecting the pressure test time, so that the pressure test parameters and the test object can be adjusted adaptively, thereby improving the intelligence and test efficiency of the pressure test.
  • FIG. 5 shows a specific implementation flowchart of an interface testing method S104 provided in the fifth embodiment of the present application.
  • S104 includes: S1045 to S1046, and details are as follows:
  • test data is compared with the standard parameter range of each interface to be tested in the data analysis template.
  • the standard parameter range of each interface to be tested is recorded in the data analysis template, and the terminal device determines the actual operating parameters of each interface to be tested through the test data, and compares the actual operating parameters with the standard parameters of the interface to be tested The range is compared, if the actual operating parameter is within the standard parameter range, the interface to be tested is identified as a normal interface; conversely, if the actual operating parameter of an interface to be tested is outside the standard parameter range, the relevant operation of S1046 is performed .
  • test data can be converted into the pressure response level by the method provided in the third embodiment, and whether the pressure response level is within the preset standard response level range is determined, and the corresponding is performed based on the comparison result Operation.
  • test data exceeds the standard parameter range of any one of the interfaces to be tested, the interface to be tested is identified as an abnormal interface, and interface abnormal information about the abnormal interface is output.
  • the terminal device when the terminal device recognizes that a certain interface to be tested is an abnormal interface, it may generate interface abnormal information about the abnormal interface.
  • the terminal device may use the actual operating parameters and pressure test parameters of the abnormal interface And / or rated operating parameters are added to the interface abnormal information, so that the user can easily repair the abnormal interface according to the multiple parameter values recorded in the interface abnormal information.
  • FIG. 6 shows a structural block diagram of a terminal device provided by an embodiment of the present application. Each unit included in the terminal device is used to execute each step in the embodiment corresponding to FIG. 1. For details, please refer to the related descriptions in the embodiments corresponding to FIG. 1 and FIG. 1. For ease of explanation, only the parts related to this embodiment are shown.
  • the terminal device includes:
  • the interface information obtaining unit 61 is used to obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
  • the pressure test script generating unit 62 is configured to respectively import each of the rated operating parameters into a pressure test parameter conversion model, calculate the pressure test parameters of each of the interfaces to be tested, and generate the pressure of the test object based on the pressure test parameters Test script
  • the stress test execution unit 63 is configured to send the stress test script to the test object, and control the test object to run the stress test script to collect tests output by each of the interfaces to be tested based on the stress test script data;
  • the stress test report generating unit 64 is configured to import the test data into a data analysis template associated with the test object, and generate a stress test report on the test object.
  • the stress test script generating unit 62 includes:
  • test object parameter acquisition unit used to acquire the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters
  • the first pressure parameter calculation unit is used to import the average text volume into the first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested;
  • the first pressure parameter conversion conversion model is specifically:
  • the second pressure parameter calculation unit is used to introduce the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested;
  • the second pressure parameter conversion conversion model is specifically:
  • ThreadNum is the second pressure parameter
  • ThreadNum 0 is the number of rated threads
  • the third pressure parameter calculation unit is configured to import the first pressure parameter, the second pressure parameter, the memory capacity, and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested Pressure parameter;
  • the third pressure parameter conversion model is specifically:
  • RunTime is the third pressure parameter
  • RAM is the memory capacity
  • Cache is the cache capacity
  • the pressure test parameter generating unit is configured to generate a pressure test parameter of the interface to be tested based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  • the stress test report generating unit 64 includes:
  • a pressure measurement trajectory curve generating unit configured to generate a pressure measurement trajectory curve about the interface to be tested according to the test data
  • a pressure measurement trajectory curve comparison unit used to draw a standard trajectory curve of the interface to be tested and the pressure trajectory curve on a preset coordinate axis, to obtain each coordinate point on the standard trajectory curve Distance value between trajectory curves;
  • the pressure measurement response level determination unit is used to calculate the average distance between the standard trajectory curve and the pressure measurement trajectory curve based on the distance value of each coordinate point, and use the average distance as the interface to be tested Pressure response level;
  • the pressure measurement response level summary unit is used to generate the pressure test report according to the pressure measurement response level of each interface to be tested.
  • the terminal device further includes:
  • the pressure test running time determining unit is used to determine if the test data sent by the interface to be tested is not received within a preset waiting time threshold, based on the current time and the start time corresponding to running the test script Describe the running time of the pressure test interface to be tested;
  • a pressure test parameter adjusting unit configured to adjust the pressure test parameter of the interface to be tested based on the pressure test running time
  • a stress test script adjusting unit configured to add the adjusted stress test parameters to the stress test script, return to execute the sending of the stress test script to the test object, and control the test object to run
  • the stress test script collects test data output by each of the interfaces to be tested based on the stress test script.
  • the stress test report generating unit 64 includes:
  • a standard parameter range comparison unit used to compare the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template
  • the abnormal interface identification unit is configured to identify the interface to be tested as an abnormal interface if the test data exceeds the standard parameter range of any of the interfaces to be tested, and output interface abnormal information about the abnormal interface.
  • the terminal device provided by the embodiment of the present application can also obtain the interface information of the test object and configure corresponding pressure test parameters for each interface that needs to be subjected to the pressure test according to the interface information, generate a pressure test script, and then correspond to the control test Run the stress test script to obtain the test data output from each interface to be tested and generate a stress test report, without the need for users to configure stress test parameters for each interface, which improves the efficiency of stress testing, and the terminal equipment will also analyze the test data , Import the corresponding data analysis template to generate a more readable test report, without the need for users to determine whether the interface is abnormal through experience and test data, and improve the readability of the test results, even non-technical personnel can clearly understand the interface Test the situation.
  • the terminal device 7 of this embodiment includes: a processor 70, a memory 71, and computer-readable instructions 72 stored in the memory 71 and executable on the processor 70, for example, interface tested program.
  • the processor 70 executes the computer-readable instructions 72
  • the steps in the method embodiment of each interface test described above are implemented, for example, S101 to S104 shown in FIG. 1.
  • the processor 70 executes the computer-readable instructions 72
  • the functions of each unit in the foregoing device embodiments are realized, for example, the functions of the modules 61 to 64 shown in FIG. 6.
  • the computer-readable instructions 72 may be divided into one or more units, and the one or more units are stored in the memory 71 and executed by the processor 70 to complete the application .
  • the one or more units may be a series of computer-readable instruction instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 72 in the terminal device 7.
  • the computer-readable instructions 72 may be divided into an interface information acquisition unit, a stress test script generation unit, a stress test execution unit, and a stress test report generation unit, and the specific functions of each unit are as described above.
  • each functional unit and module is used as an example for illustration.
  • the above-mentioned functions can be allocated by different functional units
  • Module completion means that the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
  • the functional units and modules in the embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit may use hardware It can also be implemented in the form of software functional units.
  • the specific names of each functional unit and module are only for the purpose of distinguishing each other, and are not used to limit the protection scope of the present application.

Abstract

A method and device for interface testing. The method comprises: acquiring interface information of a test object (S101); importing each rated operating parameter into a pressure test parameter conversion model respectively, calculating a pressure test parameter of each interface to be tested, and generating a pressure test script of the test object on the basis of the pressure test parameter (S102); sending the pressure test script to the test object, and controlling the test object to run the pressure test script, and collecting test data output based on the pressure test script by each interface to be tested (S103); and importing the test data into a data analysis template associated with the test object, and generating a pressure test report on the test object (S104). It is not necessary for a user to configure a pressure test parameter for each interface, and therefore, the efficiency of pressure testing is improved.

Description

一种接口测试的方法及设备Interface testing method and equipment
本申请申明享有2018年10月25日递交的申请号为201811252453.8、名称为“一种接口测试的方法及设备”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application declares that it enjoys the priority of the Chinese patent application with the application number 201811252453.8 and the name "a method and equipment for interface testing" filed on October 25, 2018. The entire content of the Chinese patent application is incorporated by reference in this document Applying.
技术领域Technical field
本申请属于信息处理技术领域,尤其涉及一种接口测试的方法及设备。The present application belongs to the field of information processing technology, and in particular relates to an interface testing method and equipment.
背景技术Background technique
随着终端技术的不断发展,为了满足用户使用过程中的各种需求,终端设备的数量以及更新速度也不断增长,因此,如何高效地对终端设备进行测试,则直接影响设备的更新速度。终端设备中包含多了接口,为了检测接口在实际应用中的数据处理能力,往往需要对各个接口进行压力测试。With the continuous development of terminal technology, in order to meet the various needs of users during use, the number of terminal devices and the update speed are also continuously increasing. Therefore, how to effectively test the terminal device directly affects the update speed of the device. The terminal device contains many interfaces. In order to detect the data processing capability of the interface in actual applications, it is often necessary to perform stress tests on each interface.
然而现有接口测试的方法,由于设备内每个各个接口的运行参数存在差异,需要用户手动为每个运行参数进行压力参数的配置操作,当接口数量较多时,则需要花费较多人力来进行配置,降低了压力测试的效率。However, due to the differences in the operating parameters of each interface in the device, the existing interface testing method requires the user to manually configure the pressure parameters for each operating parameter. When the number of interfaces is large, it takes a lot of manpower to perform Configuration reduces the efficiency of stress testing.
技术问题technical problem
有鉴于此,本申请实施例提供了一种接口测试的方法及设备,以解决现有的接口测试技术,需要用户手动为每个运行参数进行压力参数的配置操作,当接口数量较多时,则需要花费较多人力来进行配置,降低了压力测试的效率的问题。In view of this, the embodiments of the present application provide an interface testing method and equipment to solve the existing interface testing technology, which requires the user to manually configure the pressure parameters for each operating parameter. When there are many interfaces, then It takes more manpower to configure, which reduces the problem of the efficiency of stress testing.
技术解决方案Technical solution
本申请实施例的第一方面提供了一种接口测试的方法,包括:The first aspect of the embodiments of the present application provides an interface testing method, including:
获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;Obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;Importing each of the rated operating parameters into a pressure test parameter conversion model, calculating pressure test parameters of each interface to be tested, and generating a pressure test script of the test object based on the pressure test parameters;
将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;Sending the stress test script to the test object, and controlling the test object to run the stress test script, and collecting test data output by each of the interfaces to be tested based on the stress test script;
将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。Import the test data into the data analysis template associated with the test object to generate a stress test report on the test object.
有益效果Beneficial effect
本申请实施例通过获取测试对象的接口信息,并根据接口信息为每个需要进行压力测试的接口配置对应的压力测试参数,生成压力测试脚本,继而将控制测试对应运行该压力测试脚本,获取各个待测试接口输出的测试数据,并生成压力测试报告,无需用户为每个接口配置压力测试参数,提高了压力测试的效率,并且终端设备还会对测试数据进行分析,导入对应的数据解析模板,生成可读性较强的测试报告,无需用户通过经验以及测试数据判断接口是否异常,提高了测试结果的可读性,即便非技术人员也可以清楚了解各个接口的测试情况。In the embodiment of the present application, by acquiring the interface information of the test object, and configuring corresponding pressure test parameters for each interface that needs to be subjected to the pressure test according to the interface information, a pressure test script is generated, and then the control test is run corresponding to the pressure test script to obtain each The test data output from the interface to be tested and generate a pressure test report without the need for users to configure pressure test parameters for each interface, which improves the efficiency of the pressure test, and the terminal equipment will also analyze the test data and import the corresponding data analysis template, Generate highly readable test reports, without requiring users to determine whether the interface is abnormal through experience and test data, which improves the readability of the test results. Even non-technical personnel can clearly understand the test status of each interface.
附图说明BRIEF DESCRIPTION
图1是本申请第一实施例提供的一种接口测试的方法的实现流程图;FIG. 1 is an implementation flowchart of an interface testing method provided by the first embodiment of the present application;
图2是本申请第二实施例提供的一种接口测试的方法S102具体实现流程图;2 is a specific implementation flowchart of an interface testing method S102 provided in a second embodiment of the present application;
图3是本申请第三实施例提供的一种接口测试的方法S104具体实现流程图;3 is a flowchart of a specific implementation of an interface testing method S104 provided in a third embodiment of the present application;
图4是本申请第四实施例提供的一种接口测试的方法的具体实现流程图;4 is a specific implementation flowchart of an interface testing method provided by a fourth embodiment of the present application;
图5是本申请第五实施例提供的一种接口测试的方法S104具体实现流程图;5 is a flowchart of a specific implementation of an interface testing method S104 provided in a fifth embodiment of the present application;
图6是本申请一实施例提供的一种终端设备的结构框图;6 is a structural block diagram of a terminal device according to an embodiment of the present application;
图7是本申请另一实施例提供的一种终端设备的示意图。7 is a schematic diagram of a terminal device according to another embodiment of the present application.
本申请的实施方式Implementation of this application
在本申请实施例中,流程的执行主体为终端设备。该终端设备包括但不限于:计算机、智能手机以及平板电脑等能够进行接口测试的设备。图1示出了本申请第一实施例提供的接口测试的方法的实现流程图,详述如下:In the embodiment of the present application, the execution subject of the process is a terminal device. The terminal equipment includes but is not limited to: computers, smart phones, and tablet computers that can perform interface testing. FIG. 1 shows an implementation flowchart of the interface testing method provided in the first embodiment of the present application, which is described in detail as follows:
在S101中,获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数。In S101, the interface information of the test object is obtained; the interface information records the rated operating parameters of each interface to be tested in the test object.
在本实施例中,终端设备可以对测试对象内的接口进行压力测试,确定各个接口的鲁棒性。由于测试对象在实际运行的过程中,并非时刻均处于额定工作状态,有可能会处于过载状态,从而在过载状态下测试对象是否能够稳定运行,则会直接影响测试对象整体的稳定性,基于此,测试对象在出厂或发布之前,需要对各个接口进行压力测试,从而确定测试对象在过载状态下各个接口的运行参数,并判断是否满足出厂或发布标准。终端设备可以将测试对象中包含的所有接口均识别为待测试接口,在该情况下,终端设备会遍历解析测试对象的每个接口,获取各个接口的额定运行参数,并基于所有接口对应的额定运行参数生成接口信息。终端设备还可以从测试对象中选取部分接口作为待测试接口。具体地,终端设备可以根据各个接口的接口类型,选取某一类或某几类接口类型的接口作为本次压力测试的待测试接口,还可以接收用户预先设置的待测试接口列表,基于待测试接口列表从测试对象中获取各个待测试接口的 额定运行参数,生成接口信息。In this embodiment, the terminal device may perform a stress test on the interface within the test object to determine the robustness of each interface. Since the test object is not in the rated working state at all times during the actual operation, it may be in an overload state. Therefore, whether the test object can run stably under the overload state will directly affect the stability of the test object as a whole. Based on this Before the test object leaves the factory or is released, it is necessary to perform a pressure test on each interface to determine the operating parameters of each interface of the test object under overload and determine whether it meets the factory or release standards. The terminal device can identify all the interfaces included in the test object as the interface to be tested. In this case, the terminal device will traverse each interface of the analysis test object, obtain the rated operating parameters of each interface, and based on the corresponding ratings of all interfaces Run parameters generate interface information. The terminal device can also select a part of the interface from the test object as the interface to be tested. Specifically, the terminal device can select an interface of a certain type or types of interfaces as the interface to be tested for this stress test according to the interface type of each interface, and can also receive a list of interfaces to be tested preset by the user based on the test to be tested The interface list obtains the rated operating parameters of each interface to be tested from the test object and generates interface information.
在本实施例中,额定运行参数具体指的是:待测试接口在额定运行环境下的数据处理能力。该额定运行参数可以为一参数值范围,由于每个接口在运行的过程中运行参数会存在浮动的可能,因而为了更为准确地确定待测试接口在额定运行环境下的数据处理能力,可以通过参数值范围来表示额定运行参数,即在额定运行环境下,待测试接口的实际运行参数在该参数值范围内时,则表示待测试接口处于正常状态。额定运行参数可以用于限定待测试接口的输入信号的运行参数和/或输出信号的运行参数,例如输入信号的运行参数可以包括:输入信号的传输速率、并发线程个数、单个文件的额定数据量等,输出信号的运行参数可以包括:数据处理速率、误码率等。In this embodiment, the rated operating parameter specifically refers to: the data processing capability of the interface to be tested under the rated operating environment. The rated operating parameter can be a range of parameter values. Since the operating parameters of each interface may float during operation, in order to more accurately determine the data processing capability of the interface under test in the rated operating environment, you can pass The parameter value range represents the rated operating parameter, that is, under the rated operating environment, when the actual operating parameter of the interface to be tested is within this parameter value range, it indicates that the interface to be tested is in a normal state. Rated operating parameters can be used to define the operating parameters of the input signal and / or the output signal of the interface to be tested, for example, the operating parameters of the input signal can include: the transmission rate of the input signal, the number of concurrent threads, and the rated data of a single file The operating parameters of the output signal can include: data processing rate, bit error rate, etc.
在本实施例中,测试对象可以为一实体设备,在该情况下,终端设备可以与该实体设备建立通信连接,并向该实体设备发送一个接口信息上报请求,以便实体设备将各个待测试接口的额定运行参数进行汇总,生成接口信息并返回给终端设备。可选地,终端设备还可以根据该实体设备的设备型号,获取该设备型号的产品设计信息,并基于该产品设计信息获取各个待测试接口的额定运行参数,并生成接口信息。该测试对象还可以为一应用程序,终端设备可以解析该应用程序的程序文件,确定该程序文件内包含的虚拟接口,并根据各个虚拟接口对应的接口标识,获取对应的额定运行参数,生成接口信息。需要说明的是,若测试对象为一应用程序,则该应用程序可以安装于终端设备或任一其他设备上,在此不做限定。In this embodiment, the test object may be a physical device. In this case, the terminal device may establish a communication connection with the physical device, and send an interface information reporting request to the physical device, so that the physical device can test each interface to be tested. The rated operating parameters are summarized, interface information is generated and returned to the terminal device. Optionally, the terminal device may also obtain product design information of the device model according to the device model of the physical device, and obtain rated operating parameters of each interface to be tested based on the product design information, and generate interface information. The test object can also be an application program. The terminal device can parse the program file of the application program, determine the virtual interface contained in the program file, and obtain the corresponding rated operating parameters according to the interface identifier corresponding to each virtual interface to generate the interface information. It should be noted that if the test object is an application, the application can be installed on the terminal device or any other device, which is not limited herein.
在S102中,分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本。In S102, the rated operating parameters are respectively imported into a pressure test parameter conversion model, the pressure test parameters of each interface to be tested are calculated, and a pressure test script of the test object is generated based on the pressure test parameters.
在本实施例中,终端设备由于需要对各个待测接口进行压力测试,则需要将各个待测试接口放置于过载的运行环境下,从而采集到各个待测试接口在过载环境下的运行情况,以生成压力测试报告。基于此,终端设备会根据各个待测试接口的额定运行参数,为每个待测试接口配置与该额定运行参数匹配的压力测试参数。由于额定运行参数的参数值越大,则表示该待测试接口的数据处理能力越高,对应的压力测试参数也应相应增加;而额定运行参数的参数值越小,则表示该待测试接口的数据处理能力较低,对应的压力测试参数也应相应减少。由此可见,每个待测试接口的压力测试参数与其额定运行参数相关,终端设备会基于两者的转换关系,生成一个压力测试参数转换模型,终端设备在接收到待测试接口的额定运行参数后,则可以分别将各个额定运行参数导入到该压力测试参数转换模型,计算各个额定运行参数对应的压力测试参数。In this embodiment, since the terminal device needs to perform a pressure test on each interface to be tested, it is necessary to place each interface to be tested in an overloaded operating environment, so as to collect the operation status of each interface to be tested under an overloaded environment, to Generate stress test report. Based on this, the terminal device will configure a pressure test parameter matching the rated operating parameter for each interface to be tested according to the rated operating parameter of each interface to be tested. As the parameter value of the rated operating parameter is larger, it means that the data processing capability of the interface to be tested is higher, and the corresponding pressure test parameter should also be increased accordingly; and the smaller the parameter value of the rated operating parameter, it means that the interface of the test is to be tested. The data processing capability is low, and the corresponding pressure test parameters should be reduced accordingly. It can be seen that the pressure test parameters of each interface to be tested are related to its rated operating parameters, and the terminal device will generate a pressure test parameter conversion model based on the conversion relationship between the two. After the terminal device receives the rated operating parameters of the interface to be tested , Then each rated operating parameter can be separately imported into the pressure test parameter conversion model to calculate the pressure test parameter corresponding to each rated operating parameter.
可选地,该压力测试参数转换模型配置有一压测比例,基于该压测比例调整额定运行参数的参数值,得到对应的压力测试参数转换模型。例如,预设的压测比例为50%,而某一额定运行参数为传输速率,参数值为100M/s,则压力测试参数则为:(1+50%)*100M/s=150M/s,对于其他额定测试参数可以参数上述方式进行计算。压力测试参数计算模型中的压测比例可以是固定的,即对于各个待测试接口该压 测比例均相同,当然,该压测比例也可以是变化的。优选地,终端设备可以根据待测试接口的接口类型,确定与该接口类型的压测比例,并基于该压测比例调整压力测试参数转换模型,并将该待测试接口的额定运行参数导入到调整后的压力测试参数转换模型,通过上述方式,可以动态调整压力测试参数转换模型的压测比例,从而提高压力测试参数的准确性。Optionally, the pressure test parameter conversion model is configured with a pressure measurement ratio, and the parameter value of the rated operating parameter is adjusted based on the pressure measurement ratio to obtain a corresponding pressure test parameter conversion model. For example, if the preset pressure measurement ratio is 50%, and a certain rated operating parameter is the transmission rate, the parameter value is 100M / s, then the pressure test parameter is: (1 + 50%) * 100M / s = 150M / s For other rated test parameters, the parameters can be calculated in the above manner. The pressure measurement ratio in the pressure test parameter calculation model may be fixed, that is, the pressure measurement ratio is the same for each interface to be tested, and of course, the pressure measurement ratio may also be changed. Preferably, the terminal device may determine the pressure measurement ratio with the interface type according to the interface type of the interface to be tested, and adjust the pressure test parameter conversion model based on the pressure measurement ratio, and import the rated operating parameters of the interface to be tested into the adjustment After the pressure test parameter conversion model, the pressure measurement ratio of the pressure test parameter conversion model can be dynamically adjusted in the above manner, thereby improving the accuracy of the pressure test parameter.
在本实施例中,终端设备在确定了待测试接口的压力测试参数后,可以基于该压力测试参数调整各个接口测试实例,并基于各个接口测试实例生成关于该测试对象的压力测试脚本。In this embodiment, after determining the pressure test parameter of the interface to be tested, the terminal device may adjust each interface test instance based on the pressure test parameter, and generate a pressure test script about the test object based on each interface test instance.
在S103中,将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。In S103, the stress test script is sent to the test object, and the test object is controlled to run the stress test script to collect test data output by each interface to be tested based on the stress test script.
在本实施例中,终端设备在生成了压力测试脚本后,可以将该压力测试脚本发送给测试对象,并向该测试对象发送一个压力测试启动指令,以便测试对象启动压力测试流程。具体地,若该测试对象为一实体设备,终端设备可以通过通信接口与该实体设备内的各个待测试接口建立通信链路,并为每个待测试接口配置对应的激励信号,继而该实体设备可以根据该激励信号以及该压力测试脚本,对各个待测试接口进行压力测试;若该测试对象为一应用程序,终端设备可以基于各个待测试接口的输入数据类型以及对应的压力测试参数,配置对应的训练样本,将各个训练样本导入到各个待测试接口,实现对各个待测试接口的压力测试。In this embodiment, after the stress test script is generated, the terminal device may send the stress test script to the test object, and send a stress test start instruction to the test object, so that the test object starts the stress test process. Specifically, if the test object is a physical device, the terminal device may establish a communication link with each test interface in the physical device through the communication interface, and configure a corresponding excitation signal for each test interface, and then the physical device According to the excitation signal and the stress test script, each interface to be tested can be stress-tested; if the test object is an application, the terminal device can configure the corresponding based on the input data type of each interface to be tested and the corresponding pressure test parameters Training samples, import each training sample to each interface to be tested, and realize the stress test of each interface to be tested.
在本实施例中,终端设备会采集各个待测试接口执行压力测试过程中的实际运行参数,以及各个待测试接口的输出结果,根据实际运行参数以及输出结果生成测试数据。该实际运行参数包括但不限于:测试对象的资源占用率、数据处理速率、响应时长等,终端设备基于实际运行参数可以判断该测试对象在过载的状态下是否能够在预设的运行范围内进行数据处理,并且基于各个激励信号的训练样本,判断输出结果与训练样本是否匹配,从而确定是否异常响应的比例。In this embodiment, the terminal device collects the actual operating parameters during the pressure test process of each interface to be tested and the output results of each interface to be tested, and generates test data according to the actual operating parameters and the output results. The actual operating parameters include, but are not limited to: the resource occupancy rate, data processing rate, and response time of the test object. The terminal device can determine whether the test object can be carried out within the preset operating range under the overload state based on the actual operation parameters Data processing, and based on the training samples of each excitation signal, determine whether the output results match the training samples to determine whether the proportion of abnormal responses.
需要说明的是,由于不同的待测试接口所属的功能模块可能相同,为了避免不同的待测试接口在压力测试的过程中测试脚本的相互影响,终端设备可以分别对各个待测试接口分别进行压力测试,即根据压力测试脚本依次对各个待测试接口进行测试。优选地,终端设备可以识别各个待测试接口之间的关联性,选取关联性较低的多个待测试接口作为并发测试接口,对于并发测试接口可以进行并发测试,从而提高测试效率。It should be noted that, because the functional modules to which different interfaces to be tested belong may be the same, in order to avoid the mutual influence of the test scripts of the different interfaces to be tested during the stress test, the terminal device may separately perform stress tests on each interface to be tested , That is, test each interface to be tested in turn according to the stress test script. Preferably, the terminal device can recognize the correlation between the interfaces to be tested, select multiple interfaces to be tested with a low correlation as concurrent test interfaces, and perform concurrent tests on the concurrent test interfaces, thereby improving test efficiency.
在S104中,将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。In S104, the test data is imported into a data analysis template associated with the test object, and a stress test report on the test object is generated.
在本实施例中,终端设备可以根据测试对象的对象标识,从数据解析数据库中获取该对象标识对应的数据解析模板,作为该测试对象关联的数据解析模板。该数据解析模板记录有各个待测试接口的校验算法,终端设备会从测试数据中解析得到各个待测试接口的测试子数据,并导入到数据解析模板中对应的校验算法中,确定各个待测试接口的测试结果,并根据各个测试结果生成压力测试报告。In this embodiment, the terminal device may obtain the data analysis template corresponding to the object identifier from the data analysis database according to the object identifier of the test object, as the data analysis template associated with the test object. The data analysis template records the verification algorithm of each interface to be tested. The terminal device will parse the test data of each interface to be tested from the test data and import it into the corresponding verification algorithm in the data analysis template to determine each Test the test results of the interface and generate a stress test report based on each test result.
可选地,若该压力测试报告中各个待测试接口的测试结果均为测试成功,则识别该测试对象为合格对象,可以进行后续的出厂或发布等环节;反之,若测试报告中任一待测试接口的测试结果为测试失败,则生成测试异常信息,该测试异常信息中记录有该存在异常的待测试接口,以便开发人员对存在异常的待测试接口进行调整。Optionally, if the test results of each to-be-tested interface in the stress test report are all tested successfully, the test object is identified as a qualified object, and subsequent follow-up factory or release links can be carried out; otherwise, if any of the test reports If the test result of the test interface is that the test fails, abnormal test information is generated, and the abnormal test interface is recorded in the test abnormal information, so that the developer can adjust the abnormal test interface to be tested.
可选地,在本实施例中,该测试数据可以为一jtl格式的文件,即在执行压力测试脚本时,是通过jmeter程序来获取各个待测试接口的测试数据的,并生成对应的jtl文件,由于jtl文件的可读性较低,终端设备可以对该jtl文件进行解析,将jtl文件中各个待测试接口的测试结果导入到以HTML格式的数据解析模板内,生成关于该测试对象的HTML页面,通过HTML页面来展示测试结果,可以便于各个用户进行阅读,从而提高了测试报告的可读性。Optionally, in this embodiment, the test data may be a jtl format file, that is, when the stress test script is executed, the test data of each interface to be tested is obtained through the jmeter program, and the corresponding jtl file is generated Because of the low readability of the jtl file, the terminal device can parse the jtl file and import the test results of the interfaces to be tested in the jtl file into the data analysis template in HTML format to generate HTML about the test object The HTML page is used to display the test results, which can be easily read by each user, thereby improving the readability of the test report.
以上可以看出,本申请实施例提供的一种接口测试的方法通过获取测试对象的接口信息,并根据接口信息为每个需要进行压力测试的接口配置对应的压力测试参数,生成压力测试脚本,继而将控制测试对应运行该压力测试脚本,获取各个待测试接口输出的测试数据,并生成压力测试报告,无需用户为每个接口配置压力测试参数,提高了压力测试的效率,并且终端设备还会对测试数据进行分析,导入对应的数据解析模板,生成可读性较强的测试报告,无需用户通过经验以及测试数据判断接口是否异常,提高了测试结果的可读性,即便非技术人员也可以清楚了解各个接口的测试情况。It can be seen from the above that an interface test method provided by an embodiment of the present application obtains interface information of a test object and configures a corresponding pressure test parameter for each interface that needs to be subjected to a pressure test according to the interface information to generate a pressure test script. Then the control test is run corresponding to the stress test script to obtain the test data output by each interface to be tested and generate a stress test report, without requiring the user to configure stress test parameters for each interface, which improves the efficiency of the stress test, and the terminal equipment will also Analyze the test data, import the corresponding data analysis template, and generate a more readable test report, without the user's experience and test data to determine whether the interface is abnormal, improve the readability of the test results, even non-technical personnel can Clearly understand the test situation of each interface.
图2示出了本申请第二实施例提供的一种接口测试的方法S102的具体实现流程图。参见图2,相对于图1所述实施例,本实施例提供的一种接口测试的方法所述分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,包括:S1021~S1025,具体详述如下:FIG. 2 shows a specific implementation flowchart of an interface testing method S102 provided by the second embodiment of the present application. Referring to FIG. 2, relative to the embodiment shown in FIG. 1, the method for interface testing provided in this embodiment separately imports each of the rated operating parameters into a pressure test parameter conversion model to calculate the pressure of each of the interfaces to be tested Test parameters, including: S1021 ~ S1025, detailed as follows:
在S1021中,获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数。In S1021, the memory capacity and cache capacity of the test object are obtained, and the average text capacity and the number of rated threads are extracted from the rated operating parameters.
在本实施例中,每个测试对象在接收到数据后,会先将数据存储与缓存区域,基于该数据的数据类型以及所需执行的操作,则会从缓存区域转移到对应的内存区域中进行运算处理。因此,一个测试对象对于数据的处理能力,除了与接口的数据处理能力相关外,还与该测试对象的内存容量以及缓存容量的大小相关,基于此,终端设备在确定压力测试参数之前,需要确定测试对象的存储能力,因此会获取该测试对象的内存容量以及缓存容量。In this embodiment, after receiving data, each test object will first store the data in the cache area, and based on the data type of the data and the operation to be performed, it will be transferred from the cache area to the corresponding memory area Perform arithmetic processing. Therefore, the data processing capability of a test object is not only related to the data processing capability of the interface, but also related to the memory capacity and cache capacity of the test object. Based on this, the terminal device needs to determine the pressure test parameters before determining The storage capacity of the test object, so the memory capacity and cache capacity of the test object will be obtained.
在本实施例中,终端设备会从额定运行参数中提取平均文本容量以及额定线程个数,其中,平均文本容量具体指的是,该待测试接口接收文件数据时,文件的数据量的平均均值;而额定线程个数具体为待测试接口在运行过程中,该接口在额定运行环境下可以同时维护的线程个数,例如某一接口可以同时与多个用户终端建立通信连接,而每个通信链路均需要一个独立的并发线程来进行维护,因此连接的用户终端的个数即为该接口对应的线程个数。In this embodiment, the terminal device extracts the average text capacity and the number of rated threads from the rated operating parameters, where the average text capacity specifically refers to the average value of the file data volume when the interface under test receives file data ; The number of rated threads is specifically the number of threads that the interface can maintain simultaneously under the rated operating environment during the operation of the interface to be tested, for example, an interface can establish communication connections with multiple user terminals at the same time, and each communication Each link requires an independent concurrent thread for maintenance, so the number of connected user terminals is the number of threads corresponding to the interface.
在S1022中,将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参 数;所述第一压力参数转换转换模型具体为:In S1022, the average text volume is imported into a first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
Figure PCTCN2018123986-appb-000001
Figure PCTCN2018123986-appb-000001
其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量。 Wherein, DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text volume.
在本实施例中,压力测试参数包括三个类型的压力参数,分别为关于文本容量的第一压力参数、关于最大并发线程的第二压力参数以及关于压力测试运行时间的第三压力测试参数。通过上述三个类型的压力参数,可以判断待测试接口在过载的状态下的数据处理情况,若最大文本容量越大,则表示该待测试接口可以对数据量较大的单个文件进行快速处理,即处理文件的范围较大,而最大并发线程的个数越多,则表示待测试接口的并行数据处理能力越高,在过载状态下,能够快速处理堆积的服务请求;而压力测试运行时间越长,则表示该待测试接口的鲁棒性越高,可以长时间在过载的环境下运行,因此,不同的压力参数可以用于表征待测试接口在多个维度的过载处理能力。In this embodiment, the pressure test parameters include three types of pressure parameters, which are a first pressure parameter related to the text volume, a second pressure parameter related to the maximum concurrent thread, and a third pressure test parameter related to the pressure test running time. Through the above three types of pressure parameters, you can determine the data processing situation of the interface to be tested in the overload state. If the maximum text capacity is larger, it means that the interface to be tested can quickly process a single file with a large amount of data. That is, the larger the range of processing files, and the more the maximum number of concurrent threads, the higher the parallel data processing capability of the interface to be tested. Under overload, it can quickly process accumulated service requests; and the more time the stress test runs Long means that the interface to be tested is more robust and can be operated in an overloaded environment for a long time. Therefore, different pressure parameters can be used to characterize the overload handling capabilities of the interface to be tested in multiple dimensions.
在本实施例中,将平均文本容量导入到第一压力参数转换模型,确定该平均文本容量对应的第一压力测试参数,从而计算出压力测试时,每个训练样本的文本数据量大小。文本数据量越大,则对于待测试接口的运算压力越大。终端设备会基于预设的压测比例以及平均文本容量,计算出第一压力参数。In this embodiment, the average text volume is imported into the first pressure parameter conversion model to determine the first pressure test parameter corresponding to the average text volume, so as to calculate the amount of text data for each training sample during the stress test. The greater the amount of text data, the greater the computational pressure on the interface to be tested. The terminal device will calculate the first pressure parameter based on the preset pressure measurement ratio and the average text volume.
在S1023中,将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:In S1023, the number of rated threads is imported into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
Figure PCTCN2018123986-appb-000002
Figure PCTCN2018123986-appb-000002
其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数。 Wherein, ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads.
在本实施例中,终端设备将额定线程个数导入到第二压力参数转换模型,确定该额定线程个数对应的第二压力测试参数,从而确定在压力测试的过程中,所需调用的并发线程的个数。由于并发线程的数目越多,则测试对象需要同时对多个数据进行处理,从而对应的运算处理能力就越大。终端设备会基于预设的压测比例以及额定线程个数,计算出第二压力参数。In this embodiment, the terminal device imports the number of rated threads into the second pressure parameter conversion model to determine the second pressure test parameter corresponding to the number of rated threads, thereby determining the concurrency required to be called during the pressure test The number of threads. As the number of concurrent threads increases, the test object needs to process multiple data at the same time, so the corresponding arithmetic processing capability is greater. The terminal device will calculate the second pressure parameter based on the preset pressure measurement ratio and the number of rated threads.
在S1024中,将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:In S1024, the first pressure parameter, the second pressure parameter, the memory capacity, and the cache capacity are imported into a third pressure parameter conversion model to calculate the third pressure parameter of the interface to be tested; The third pressure parameter conversion model is specifically:
Figure PCTCN2018123986-appb-000003
Figure PCTCN2018123986-appb-000003
其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量。Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity.
在本实施例中,由于每条并发线程会向并行向测试对象发送训练样本,每个训练样本的文件容量即为第一压力测试参数,则某一时刻测试对象所接收到的瞬时数据量具体为:ThreadNum*DocVol,而测试对象可以将训练样本存储与缓存区域以及内容区域,因此压力测试的运行时间,即第三压力参数可 以根据(RAM+Cache)以及(ThreadNum*DocVol)之间的比值进行确定。具体地,由于测试终端在接收到数据时可以对数据进行运算处理,并将处理后的数据进行消除,因而该压测比例的值可以大于1。In this embodiment, since each concurrent thread sends training samples to the test object in parallel, the file size of each training sample is the first stress test parameter, and the amount of instantaneous data received by the test object at a certain time is specific It is: ThreadNum * DocVol, and the test object can store the training samples in the cache area and the content area, so the running time of the stress test, that is, the third stress parameter can be based on the ratio between (RAM + Cache) and (ThreadNum * DocVol) Make sure. Specifically, since the test terminal can perform arithmetic processing on the data when it receives the data and eliminates the processed data, the value of the pressure measurement ratio may be greater than 1.
在S1025中,基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试参数。In S1025, a pressure test parameter of the interface to be tested is generated based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
在本实施例中,终端设备将第一压力参数、第二压力参数以及第三压力参数进行封装集成,得到该待测试接口的压力测试参数。具体地,终端设备可以将三种压力参数以数组的形式进行封装集成。In this embodiment, the terminal device packages and integrates the first pressure parameter, the second pressure parameter, and the third pressure parameter to obtain the pressure test parameter of the interface to be tested. Specifically, the terminal device can package and integrate the three pressure parameters in the form of an array.
在本申请实施例中,通过分别计算待测试接口的三种类型的压力参数,生成该待测试接口的压力测试参数,通过多个维度表征该接口的数据处理能力,从而能够提高压力测试脚本对接口的匹配程度,从而准确地对接口进行测试。In the embodiment of the present application, the pressure test parameters of the interface to be tested are generated by calculating the three types of pressure parameters of the interface to be tested respectively, and the data processing capability of the interface is characterized by multiple dimensions, so that the pressure test script can be improved. The matching degree of the interface, so as to accurately test the interface.
图3示出了本申请第二实施例提供的一种接口测试的方法S104的具体实现流程图。参见图3,相对于图1所述的实施例,本实施例提供的一种接口测试的方法所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:S1041~S1044,具体详述如下:FIG. 3 shows a specific implementation flowchart of an interface testing method S104 provided in the second embodiment of the present application. Referring to FIG. 3, relative to the embodiment shown in FIG. 1, the method for interface testing provided in this embodiment imports the test data into a data analysis template associated with the test object to generate information about the test object. Stress test report, including: S1041 ~ S1044, detailed as follows:
在S1041中,根据所述测试数据生成关于待测试接口的压测轨迹曲线。In S1041, a pressure measurement trajectory curve about the interface to be tested is generated according to the test data.
在本实施例中,终端设备会在预设的采集时间段内获取各个待测试接口的接口参数,因而每个待测试接口对应的测试数据均包含多个采集点所对应的运行参数值。基于各个采集点的采集时间,在预设的坐标轴上标记出各个采集点,从而生成关于待测试接口的压测轨迹曲线。In this embodiment, the terminal device will acquire the interface parameters of each interface to be tested within a preset collection time period, so the test data corresponding to each interface to be tested contains the operating parameter values corresponding to multiple collection points. Based on the collection time of each collection point, each collection point is marked on a preset coordinate axis, thereby generating a pressure measurement trajectory curve about the interface to be tested.
优选地,终端设备可以通过歧异点识别算法,判断该压测轨迹曲线中是否包含歧异点,例如某一采集点对应的导数值小于第一阈值,且与该采集点相邻的采集点的导数值互为相反数,且其值大于第二阈值,则可以判定该采集点为歧异点,对该采集点进行平滑消除处理。Preferably, the terminal device can determine whether the divergence point is included in the pressure measurement trajectory curve through a divergence point recognition algorithm, for example, the derivative value corresponding to a certain collection point is less than the first threshold, and the derivative value of the collection point adjacent to the collection point If the values are opposite to each other, and the value is greater than the second threshold, it can be determined that the collection point is a divergence point, and the collection point is smoothed out.
在S1042中,在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值。In S1042, a standard trajectory curve of the interface to be tested and the pressure trajectory curve are drawn on a preset coordinate axis, and the distance between each coordinate point on the standard trajectory curve and the pressure trajectory curve is obtained value.
在本实施例中,终端设备在生成压测轨迹曲线后,可以在与压测轨迹曲线相同的坐标轴上会出该待测试接口的标准轨迹曲线,从而通过比对压测轨迹曲线以及标准轨迹曲线,则可以识别待测试接口在实际运行过程中与理想情况的偏离程度。因此,终端设备可以根据标准轨迹曲线上各个坐标点与压测轨迹曲线上对应坐标点之间的距离值,作为两个曲线之间的偏离值。In this embodiment, after generating the pressure measurement trajectory curve, the terminal device may display the standard trajectory curve of the interface to be tested on the same coordinate axis as the pressure measurement trajectory curve, thereby comparing the pressure measurement trajectory curve and the standard trajectory The curve can identify the degree of deviation of the interface to be tested from the ideal situation during the actual operation. Therefore, the terminal device may use the distance between each coordinate point on the standard trajectory curve and the corresponding coordinate point on the pressure trajectory curve as the deviation value between the two curves.
在S1043中,基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级。In S1043, an average distance between the standard trajectory curve and the pressure measurement trajectory curve is calculated based on the distance value of each coordinate point, and the average distance is used as the pressure measurement response level of the interface to be tested.
在本实施例中,终端设备可以根据各个坐标点的距离值,计算两条曲线之间的平均相距距离,当然,终端设备可以根据各个坐标点对应的采集时间,对不同的距离值进行加权运算,在加权运算后再求平均,从而确定了两台轨迹曲线之间的平均相距距离。具体地,采集时间越晚的坐标点对应的加权权重越大, 反之,采集时间越早的坐标点对应的加权权重越小。由于采集时间较后的坐标点,表示待测试接口在过载环境下运行的时间越长,则越能表征该接口的鲁棒性,因此对应的加权权重也应越大。In this embodiment, the terminal device can calculate the average distance between the two curves according to the distance value of each coordinate point. Of course, the terminal device can weight the different distance values according to the collection time corresponding to each coordinate point , And then averaged after the weighted operation, thereby determining the average distance between the two trajectory curves. Specifically, the coordinate point corresponding to the later collection time has a larger weighting weight, and conversely, the coordinate point corresponding to the earlier collection time has a smaller weighting weight. The coordinate points with a later acquisition time indicate that the longer the interface to be tested runs in an overloaded environment, the more robust the interface can be characterized, so the corresponding weight should also be greater.
在本实施例中,由于两条曲线之间的平均相距距离越大,则表示该接口的压力响应能力越差,在过载情况下处理数据的速率较慢;而平均相距距离越小,则表示该接口与预设的理想运行状态越接近,在过载情况下仍能保持较高的数据能力。因此,终端设备可以通过该平均相距距离作为待测试接口的压测响应等级。In this embodiment, as the average distance between the two curves is larger, it means that the pressure response capability of the interface is poorer, and the data processing rate is slower in the case of overload; and the smaller the average distance is, it means The closer the interface is to the preset ideal operating state, the higher data capacity can be maintained under overload conditions. Therefore, the terminal device can use the average distance as the pressure test response level of the interface to be tested.
在S1044中,根据各个待测试接口的压测响应等级生成所述压力测试报告。In S1044, the pressure test report is generated according to the pressure test response level of each interface to be tested.
在本实施例中,终端设备可以生成一个关于待测试接口与压测响应等级的对应关系表,用户可以通过该对应关系表快速确定各个待测试接口的过载状态的数据处理能力。可选地,终端设备还可以将各个待测试接口的额定运行参数、压力测试参数、该对应关系、标准轨迹曲线和/或压力轨迹曲线表进行封装,生成该压力测试报告,从而方便用户确定各个待测试接口的运行参数情况。In this embodiment, the terminal device may generate a correspondence table about the interface to be tested and the response level of the pressure test, and the user may quickly determine the data processing capability of the overload state of each interface to be tested through the correspondence table. Optionally, the terminal device can also encapsulate the rated operating parameters, pressure test parameters, the corresponding relationship, standard trajectory curve and / or pressure trajectory curve table of each interface to be tested to generate the pressure test report, so that the user can easily determine each The operating parameters of the interface to be tested.
在本申请实施例中,通过生成压力测试轨迹曲线,从而能够直观地确定实际运行过程中待测试接口与标准轨迹曲线的偏离程度,确定压力响应等级,直观确定得到各个待测试接口的过载运行情况。In the embodiment of the present application, by generating a pressure test trajectory curve, it is possible to intuitively determine the degree of deviation of the interface to be tested from the standard trajectory curve during actual operation, determine the pressure response level, and intuitively determine the overload operation of each interface to be tested .
图4示出了本申请第四实施例提供的一种接口测试的方法的具体实现流程图。参见图4,相对于图1-图3所述实施例,本实施例提供的一种接口测试的方法中在所述控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据之后,还包括:S401~S403,具体详述如下:FIG. 4 shows a specific implementation flowchart of an interface testing method provided by a fourth embodiment of the present application. Referring to FIG. 4, relative to the embodiments described in FIGS. 1-3, in an interface testing method provided in this embodiment, the test object is controlled to run the stress test script to collect each of the interfaces to be tested After the test data output based on the stress test script, it also includes: S401 to S403, which are described in detail as follows:
进一步地,在所述控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据之后,还包括:Further, after the controlling the test object to run the stress test script and collecting test data output by each of the interfaces to be tested based on the stress test script, the method further includes:
在S401中,若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运行时间。In S401, if the test data sent by the interface to be tested is not received within a preset waiting time threshold, the interface to be tested is determined according to the current time and the startup time corresponding to running the test script Pressure test running time.
在本实施例中,测试对象在压力测试过程中会以预设的时间间隔向终端设备反馈测试数据,终端设备会设置一数据接收计时器,在接收到测试对象发送的测试数据时,会重置该接收计时器的计数值。若该计数器的计数值大于是的等待时间阈值,则表示该测试对象并没有按照预设的数据反馈流程向终端设备发送测试数据,此时可以识别待测试接口处于异常状态,例如处于宕机状态,或接口数据堵塞状态。导致上述情况的原因可能是压力测试参数过高,则超过待测试接口的可处理范围内,因此需要对压力测试参数进行调整。In this embodiment, the test object will feed back test data to the terminal device at a preset time interval during the stress test. The terminal device will set a data reception timer. When receiving test data sent by the test object, the test Set the count value of the reception timer. If the count value of the counter is greater than the waiting time threshold, it means that the test object has not sent test data to the terminal device according to the preset data feedback process. At this time, it can be identified that the interface to be tested is in an abnormal state, for example, in a down state , Or the interface data is blocked. The reason for the above situation may be that the pressure test parameter is too high, which exceeds the processing range of the interface to be tested, so the pressure test parameter needs to be adjusted.
在本实施例中,终端设备会获取当前时刻的时间值,以及运行该测试脚本时对应的启动时刻的时间值,基于上述两个时间值之间的差值,则可以确定该待测试接口运行压力测试脚本的压测运行时间。In this embodiment, the terminal device will obtain the time value of the current time, and the time value of the corresponding startup time when running the test script, and based on the difference between the two time values, it may be determined that the interface to be tested is running The stress test running time of the stress test script.
在S402中,基于所述压测运行时间调整所述待测试接口的所述压力测试参数。In S402, the pressure test parameter of the interface to be tested is adjusted based on the pressure test running time.
本实施例中,终端设备可以根据压测运行时间降低压力测试参数,从而避免压力测试脚本超过待测 试接口的可执行范围。具体地,终端设备可以计算压测运行时间以及预设的压力测试时间之间比值,等比例降低待测试接口的各个压力测试参数,并将降低后的压力测试参数识别为调整后的压力测试参数。In this embodiment, the terminal device may reduce the pressure test parameters according to the pressure test running time, thereby preventing the pressure test script from exceeding the executable range of the interface to be tested. Specifically, the terminal device can calculate the ratio between the pressure test running time and the preset pressure test time, reduce each pressure test parameter of the interface to be tested in proportion, and identify the reduced pressure test parameter as the adjusted pressure test parameter .
在S403中,将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。In S403, add the adjusted stress test parameters to the stress test script, return to execute the sending of the stress test script to the test object, and control the test object to run the stress test script To collect test data output by each of the interfaces to be tested based on the stress test script.
在本实施例中,终端设备将调整后的压力测试参数重新导入到压力测试脚本中,并根据该调整后的压力测试脚本重新对测试对象进行压力测试,采集各个待测试接口在压力测试脚本下输出的测试数据。In this embodiment, the terminal device re-imports the adjusted stress test parameters into the stress test script, and re-tests the test object according to the adjusted stress test script, and collects each interface to be tested under the stress test script The output test data.
在本申请实施例中,通过采集压力测试时间,自动调整压力测试参数,从而能够在压力测试参数与测试对象不匹配的情况下,进行自适应调整,提高了压力测试的智能化以及测试效率。In the embodiment of the present application, the pressure test parameters are automatically adjusted by collecting the pressure test time, so that the pressure test parameters and the test object can be adjusted adaptively, thereby improving the intelligence and test efficiency of the pressure test.
图5示出了本申请第五实施例提供的一种接口测试的方法S104的具体实现流程图。参见图5,相对于图1-图3所述实施例,本实施例提供的一种接口测试的方法中S104包括:S1045~S1046,具体详述如下:FIG. 5 shows a specific implementation flowchart of an interface testing method S104 provided in the fifth embodiment of the present application. Referring to FIG. 5, relative to the embodiments described in FIGS. 1 to 3, in a method for interface testing provided in this embodiment, S104 includes: S1045 to S1046, and details are as follows:
在S1045中,将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对。In S1045, the test data is compared with the standard parameter range of each interface to be tested in the data analysis template.
在本实施例中,数据解析模板中记录有各个待测试接口的标准参数范围,终端设备通过测试数据确定各个待测试接口的实际运行参数,并将该实际运行参数与对应待测试接口的标准参数范围进行比对,若该实际运行参数在标准参数范围内,则识别该待测试接口为正常接口;反之,若某一待测试接口的实际运行参数在标准参数范围外,则执行S1046的相关操作。In this embodiment, the standard parameter range of each interface to be tested is recorded in the data analysis template, and the terminal device determines the actual operating parameters of each interface to be tested through the test data, and compares the actual operating parameters with the standard parameters of the interface to be tested The range is compared, if the actual operating parameter is within the standard parameter range, the interface to be tested is identified as a normal interface; conversely, if the actual operating parameter of an interface to be tested is outside the standard parameter range, the relevant operation of S1046 is performed .
需要说明的是,该测试数据可以通过第三实施例提供的方式,将测试数据转换为压力响应等级,并识别该压力响应等级是否在预设的标准响应等级范围内,基于比对结果执行对应的操作。It should be noted that the test data can be converted into the pressure response level by the method provided in the third embodiment, and whether the pressure response level is within the preset standard response level range is determined, and the corresponding is performed based on the comparison result Operation.
在S1046中,若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。In S1046, if the test data exceeds the standard parameter range of any one of the interfaces to be tested, the interface to be tested is identified as an abnormal interface, and interface abnormal information about the abnormal interface is output.
在本实施例中,当终端设备识别到某一待测试接口为异常接口后,可以生成关于该异常接口的接口异常信息,优选地,终端设备可以将该异常接口的实际运行参数、压力测试参数和/或额定运行参数添加到该接口异常信息内,从而方便用户根据接口异常信息内记录的多项参数值,对该异常接口进行异常修复。In this embodiment, when the terminal device recognizes that a certain interface to be tested is an abnormal interface, it may generate interface abnormal information about the abnormal interface. Preferably, the terminal device may use the actual operating parameters and pressure test parameters of the abnormal interface And / or rated operating parameters are added to the interface abnormal information, so that the user can easily repair the abnormal interface according to the multiple parameter values recorded in the interface abnormal information.
在本申请实施例中,通过与标准参数范围进行比对,识别出异常的接口,提高了异常响应的效率。In the embodiment of the present application, by comparing with the standard parameter range, an abnormal interface is identified, and the efficiency of abnormal response is improved.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
图6示出了本申请一实施例提供的一种终端设备的结构框图,该终端设备包括的各单元用于执行图1对应的实施例中的各步骤。具体请参阅图1与图1所对应的实施例中的相关描述。为了便于说明,仅 示出了与本实施例相关的部分。FIG. 6 shows a structural block diagram of a terminal device provided by an embodiment of the present application. Each unit included in the terminal device is used to execute each step in the embodiment corresponding to FIG. 1. For details, please refer to the related descriptions in the embodiments corresponding to FIG. 1 and FIG. 1. For ease of explanation, only the parts related to this embodiment are shown.
参见图6,所述终端设备包括:Referring to FIG. 6, the terminal device includes:
接口信息获取单元61,用于获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;The interface information obtaining unit 61 is used to obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
压力测试脚本生成单元62,用于分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;The pressure test script generating unit 62 is configured to respectively import each of the rated operating parameters into a pressure test parameter conversion model, calculate the pressure test parameters of each of the interfaces to be tested, and generate the pressure of the test object based on the pressure test parameters Test script
压力测试执行单元63,用于将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;The stress test execution unit 63 is configured to send the stress test script to the test object, and control the test object to run the stress test script to collect tests output by each of the interfaces to be tested based on the stress test script data;
压力测试报告生成单元64,用于将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。The stress test report generating unit 64 is configured to import the test data into a data analysis template associated with the test object, and generate a stress test report on the test object.
可选地,所述压力测试脚本生成单元62包括:Optionally, the stress test script generating unit 62 includes:
测试对象参数获取单元,用于获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数;A test object parameter acquisition unit, used to acquire the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters;
第一压力参数计算单元,用于将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参数;所述第一压力参数转换转换模型具体为:The first pressure parameter calculation unit is used to import the average text volume into the first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
Figure PCTCN2018123986-appb-000004
Figure PCTCN2018123986-appb-000004
其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量; DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text capacity;
第二压力参数计算单元,用于将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:The second pressure parameter calculation unit is used to introduce the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
Figure PCTCN2018123986-appb-000005
Figure PCTCN2018123986-appb-000005
其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数; Where ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads;
第三压力参数计算单元,用于将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:The third pressure parameter calculation unit is configured to import the first pressure parameter, the second pressure parameter, the memory capacity, and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested Pressure parameter; the third pressure parameter conversion model is specifically:
Figure PCTCN2018123986-appb-000006
Figure PCTCN2018123986-appb-000006
其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量;Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity;
压力测试参数生成单元,用于基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试参数。The pressure test parameter generating unit is configured to generate a pressure test parameter of the interface to be tested based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
可选地,所述压力测试报告生成单元64包括:Optionally, the stress test report generating unit 64 includes:
压测轨迹曲线生成单元,用于根据所述测试数据生成关于待测试接口的压测轨迹曲线;A pressure measurement trajectory curve generating unit, configured to generate a pressure measurement trajectory curve about the interface to be tested according to the test data;
压测轨迹曲线比对单元,用于在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值;A pressure measurement trajectory curve comparison unit, used to draw a standard trajectory curve of the interface to be tested and the pressure trajectory curve on a preset coordinate axis, to obtain each coordinate point on the standard trajectory curve Distance value between trajectory curves;
压测响应等级确定单元,用于基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级;The pressure measurement response level determination unit is used to calculate the average distance between the standard trajectory curve and the pressure measurement trajectory curve based on the distance value of each coordinate point, and use the average distance as the interface to be tested Pressure response level;
压测响应等级汇总单元,用于根据各个待测试接口的压测响应等级生成所述压力测试报告。The pressure measurement response level summary unit is used to generate the pressure test report according to the pressure measurement response level of each interface to be tested.
可选地,所述终端设备还包括:Optionally, the terminal device further includes:
压测运行时间确定单元,用于若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运行时间;The pressure test running time determining unit is used to determine if the test data sent by the interface to be tested is not received within a preset waiting time threshold, based on the current time and the start time corresponding to running the test script Describe the running time of the pressure test interface to be tested;
压力测试参数调整单元,用于基于所述压测运行时间调整所述待测试接口的所述压力测试参数;A pressure test parameter adjusting unit, configured to adjust the pressure test parameter of the interface to be tested based on the pressure test running time;
压力测试脚本调整单元,用于将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。A stress test script adjusting unit, configured to add the adjusted stress test parameters to the stress test script, return to execute the sending of the stress test script to the test object, and control the test object to run The stress test script collects test data output by each of the interfaces to be tested based on the stress test script.
可选地,所述压力测试报告生成单元64包括:Optionally, the stress test report generating unit 64 includes:
标准参数范围比对单元,用于将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对;A standard parameter range comparison unit, used to compare the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template;
异常接口识别单元,用于若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。The abnormal interface identification unit is configured to identify the interface to be tested as an abnormal interface if the test data exceeds the standard parameter range of any of the interfaces to be tested, and output interface abnormal information about the abnormal interface.
因此,本申请实施例提供的终端设备同样可以通过获取测试对象的接口信息,并根据接口信息为每个需要进行压力测试的接口配置对应的压力测试参数,生成压力测试脚本,继而将控制测试对应运行该压力测试脚本,获取各个待测试接口输出的测试数据,并生成压力测试报告,无需用户为每个接口配置压力测试参数,提高了压力测试的效率,并且终端设备还会对测试数据进行分析,导入对应的数据解析模板,生成可读性较强的测试报告,无需用户通过经验以及测试数据判断接口是否异常,提高了测试结果的可读性,即便非技术人员也可以清楚了解各个接口的测试情况。Therefore, the terminal device provided by the embodiment of the present application can also obtain the interface information of the test object and configure corresponding pressure test parameters for each interface that needs to be subjected to the pressure test according to the interface information, generate a pressure test script, and then correspond to the control test Run the stress test script to obtain the test data output from each interface to be tested and generate a stress test report, without the need for users to configure stress test parameters for each interface, which improves the efficiency of stress testing, and the terminal equipment will also analyze the test data , Import the corresponding data analysis template to generate a more readable test report, without the need for users to determine whether the interface is abnormal through experience and test data, and improve the readability of the test results, even non-technical personnel can clearly understand the interface Test the situation.
图7是本申请另一实施例提供的一种终端设备的示意图。如图7所示,该实施例的终端设备7包括:处理器70、存储器71以及存储在所述存储器71中并可在所述处理器70上运行的计算机可读指令72,例如接口测试的程序。所述处理器70执行所述计算机可读指令72时实现上述各个接口测试的方法实施例中的步骤,例如图1所示的S101至S104。或者,所述处理器70执行所述计算机可读指令72时实现上述各装置实施例中各单元的功能,例如图6所示模块61至64功能。7 is a schematic diagram of a terminal device according to another embodiment of the present application. As shown in FIG. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71, and computer-readable instructions 72 stored in the memory 71 and executable on the processor 70, for example, interface tested program. When the processor 70 executes the computer-readable instructions 72, the steps in the method embodiment of each interface test described above are implemented, for example, S101 to S104 shown in FIG. 1. Alternatively, when the processor 70 executes the computer-readable instructions 72, the functions of each unit in the foregoing device embodiments are realized, for example, the functions of the modules 61 to 64 shown in FIG. 6.
示例性的,所述计算机可读指令72可以被分割成一个或多个单元,所述一个或者多个单元被存储 在所述存储器71中,并由所述处理器70执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机可读指令指令段,该指令段用于描述所述计算机可读指令72在所述终端设备7中的执行过程。例如,所述计算机可读指令72可以被分割成接口信息获取单元、压力测试脚本生成单元、压力测试执行单元以及压力测试报告生成单元,各单元具体功能如上所述。Exemplarily, the computer-readable instructions 72 may be divided into one or more units, and the one or more units are stored in the memory 71 and executed by the processor 70 to complete the application . The one or more units may be a series of computer-readable instruction instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 72 in the terminal device 7. For example, the computer-readable instructions 72 may be divided into an interface information acquisition unit, a stress test script generation unit, a stress test execution unit, and a stress test report generation unit, and the specific functions of each unit are as described above.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated by different functional units, Module completion means that the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above integrated unit may use hardware It can also be implemented in the form of software functional units. In addition, the specific names of each functional unit and module are only for the purpose of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not detailed or recorded in an embodiment, you can refer to the related descriptions of other embodiments.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the foregoing The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application. Within the scope of protection of this application.

Claims (20)

  1. 一种接口测试的方法,其特征在于,包括:An interface testing method, which is characterized by:
    获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;Obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
    分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;Importing each of the rated operating parameters into a pressure test parameter conversion model, calculating pressure test parameters of each interface to be tested, and generating a pressure test script of the test object based on the pressure test parameters;
    将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;Sending the stress test script to the test object, and controlling the test object to run the stress test script, and collecting test data output by each of the interfaces to be tested based on the stress test script;
    将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。Import the test data into the data analysis template associated with the test object to generate a stress test report on the test object.
  2. 根据权利要求1所述的方法,其特征在于,所述分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,包括:The method according to claim 1, wherein the separately importing each of the rated operating parameters into a pressure test parameter conversion model to calculate the pressure test parameters of each of the interfaces to be tested includes:
    获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数;Obtain the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters;
    将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参数;所述第一压力参数转换转换模型具体为:Import the average text volume into a first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100001
    Figure PCTCN2018123986-appb-100001
    其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量; DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text capacity;
    将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:Import the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100002
    Figure PCTCN2018123986-appb-100002
    其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数; Where ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads;
    将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:Import the first pressure parameter, the second pressure parameter, the memory capacity and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested; the third pressure parameter The conversion model is:
    Figure PCTCN2018123986-appb-100003
    Figure PCTCN2018123986-appb-100003
    其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量;Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity;
    基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试 参数。A pressure test parameter of the interface to be tested is generated based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  3. 根据权利要求1所述的方法,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The method according to claim 1, wherein the importing the test data into a data analysis template associated with the test object to generate a stress test report on the test object includes:
    根据所述测试数据生成关于待测试接口的压测轨迹曲线;Generating a pressure test trajectory curve about the interface to be tested according to the test data;
    在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值;Drawing a standard trajectory curve of the interface to be tested and the pressure measurement trajectory curve on a preset coordinate axis to obtain the distance value between each coordinate point on the standard trajectory curve and the pressure measurement trajectory curve;
    基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级;Calculating the average distance between the standard trajectory curve and the pressure test trajectory curve based on the distance values of the respective coordinate points, and using the average distance as the pressure test response level of the interface to be tested;
    根据各个待测试接口的压测响应等级生成所述压力测试报告。The pressure test report is generated according to the pressure test response level of each interface to be tested.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,在所述控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据之后,还包括:The method according to any one of claims 1 to 3, wherein the control object is controlled to run the stress test script to collect test data output by each of the interfaces to be tested based on the stress test script After that, it also includes:
    若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运行时间;If the test data sent by the interface to be tested is not received within a preset waiting time threshold, the pressure test running time of the interface to be tested is determined according to the current time and the start time corresponding to running the test script ;
    基于所述压测运行时间调整所述待测试接口的所述压力测试参数;Adjusting the pressure test parameters of the interface to be tested based on the pressure test running time;
    将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。Add the adjusted stress test parameters to the stress test script, return to execute the sending the stress test script to the test object, and control the test object to run the stress test script to collect all The test interface is based on test data output by the stress test script.
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The method according to any one of claims 1 to 3, wherein the importing the test data into a data analysis template associated with the test object to generate a stress test report on the test object includes:
    将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对;Comparing the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template;
    若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。If the test data exceeds the standard parameter range of any of the interfaces to be tested, the interface to be tested is identified as an abnormal interface, and interface abnormal information about the abnormal interface is output.
  6. 一种接口测试的设备,其特征在于,包括:An interface testing device, which is characterized by:
    接口信息获取单元,用于获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;An interface information obtaining unit, used to obtain interface information of a test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
    压力测试脚本生成单元,用于分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;A stress test script generation unit, which is used to import each of the rated operating parameters into a stress test parameter conversion model, calculate the stress test parameters of each of the interfaces to be tested, and generate a stress test of the test object based on the stress test parameters script;
    压力测试执行单元,用于将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;A stress test execution unit, configured to send the stress test script to the test object, and control the test object to run the stress test script to collect test data output by each of the interfaces to be tested based on the stress test script ;
    压力测试报告生成单元,用于将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。The stress test report generating unit is configured to import the test data into a data analysis template associated with the test object, and generate a stress test report on the test object.
  7. 根据权利要求6所述的接口测试的设备,其特征在于,所述压力测试脚本生成单元包括:The device for interface testing according to claim 6, wherein the stress test script generating unit includes:
    测试对象参数获取单元,用于获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数;A test object parameter acquisition unit, used to acquire the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters;
    第一压力参数计算单元,用于将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参数;所述第一压力参数转换转换模型具体为:The first pressure parameter calculation unit is used to import the average text volume into the first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100004
    Figure PCTCN2018123986-appb-100004
    其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量; DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text capacity;
    第二压力参数计算单元,用于将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:The second pressure parameter calculation unit is used to introduce the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100005
    Figure PCTCN2018123986-appb-100005
    其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数; Where ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads;
    第三压力参数计算单元,用于将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:The third pressure parameter calculation unit is configured to import the first pressure parameter, the second pressure parameter, the memory capacity, and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested Pressure parameter; the third pressure parameter conversion model is specifically:
    Figure PCTCN2018123986-appb-100006
    Figure PCTCN2018123986-appb-100006
    其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量;Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity;
    压力测试参数生成单元,用于基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试参数。The pressure test parameter generating unit is configured to generate a pressure test parameter of the interface to be tested based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  8. 根据权利要求6所述的接口测试的设备,其特征在于,所述压力测试报告生成单元包括:The interface testing device according to claim 6, wherein the stress test report generating unit includes:
    压测轨迹曲线生成单元,用于根据所述测试数据生成关于待测试接口的压测轨迹曲线;A pressure measurement trajectory curve generating unit, configured to generate a pressure measurement trajectory curve about the interface to be tested according to the test data;
    压测轨迹曲线比对单元,用于在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值;A pressure measurement trajectory curve comparison unit, used to draw a standard trajectory curve of the interface to be tested and the pressure trajectory curve on a preset coordinate axis, to obtain each coordinate point on the standard trajectory curve Distance value between trajectory curves;
    压测响应等级确定单元,用于基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级;The pressure measurement response level determination unit is used to calculate the average distance between the standard trajectory curve and the pressure measurement trajectory curve based on the distance value of each coordinate point, and use the average distance as the interface to be tested Pressure response level;
    压测响应等级汇总单元,用于根据各个待测试接口的压测响应等级生成所述压力测试报告。The pressure measurement response level summary unit is used to generate the pressure test report according to the pressure measurement response level of each interface to be tested.
  9. 根据权利要求6-8任一项所述的接口测试的设备,其特征在于,所述接口测试的设备还包括:The device for interface testing according to any one of claims 6-8, wherein the device for interface testing further comprises:
    压测运行时间确定单元,用于若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运 行时间;The pressure test running time determining unit is used to determine if the test data sent by the interface to be tested is not received within a preset waiting time threshold, based on the current time and the start time corresponding to running the test script Describe the running time of the pressure test interface to be tested;
    压力测试参数调整单元,用于基于所述压测运行时间调整所述待测试接口的所述压力测试参数;A pressure test parameter adjusting unit, configured to adjust the pressure test parameter of the interface to be tested based on the pressure test running time;
    压力测试脚本调整单元,用于将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。A stress test script adjusting unit, configured to add the adjusted stress test parameters to the stress test script, return to execute the sending of the stress test script to the test object, and control the test object to run The stress test script collects test data output by each of the interfaces to be tested based on the stress test script.
  10. 根据权利要求6-8任一项所述的接口测试的设备,其特征在于,所述压力测试报告生成单元包括:The interface testing device according to any one of claims 6-8, wherein the pressure test report generating unit includes:
    标准参数范围比对单元,用于将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对;A standard parameter range comparison unit, used to compare the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template;
    异常接口识别单元,用于若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。The abnormal interface identification unit is configured to identify the interface to be tested as an abnormal interface if the test data exceeds the standard parameter range of any of the interfaces to be tested, and output interface abnormal information about the abnormal interface.
  11. 一种终端设备,其特征在于,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A terminal device is characterized by comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, and the processor implements the computer-readable instructions as follows step:
    获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;Obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
    分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;Importing each of the rated operating parameters into a pressure test parameter conversion model, calculating pressure test parameters of each interface to be tested, and generating a pressure test script of the test object based on the pressure test parameters;
    将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;Sending the stress test script to the test object, and controlling the test object to run the stress test script, and collecting test data output by each of the interfaces to be tested based on the stress test script;
    将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。Import the test data into the data analysis template associated with the test object to generate a stress test report on the test object.
  12. 根据权利要求11所述的终端设备,其特征在于,所述分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,包括:The terminal device according to claim 11, wherein the importing each of the rated operating parameters into a pressure test parameter conversion model to calculate the pressure test parameters of each interface to be tested includes:
    获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数;Obtain the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters;
    将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参数;所述第一压力参数转换转换模型具体为:Import the average text volume into a first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100007
    Figure PCTCN2018123986-appb-100007
    其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量; DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text capacity;
    将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:Import the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100008
    Figure PCTCN2018123986-appb-100008
    其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数; Where ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads;
    将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:Import the first pressure parameter, the second pressure parameter, the memory capacity and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested; the third pressure parameter The conversion model is:
    Figure PCTCN2018123986-appb-100009
    Figure PCTCN2018123986-appb-100009
    其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量;Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity;
    基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试参数。A pressure test parameter of the interface to be tested is generated based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  13. 根据权利要求11所述的终端设备,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The terminal device according to claim 11, wherein the importing of the test data into a data analysis template associated with the test object to generate a stress test report on the test object includes:
    根据所述测试数据生成关于待测试接口的压测轨迹曲线;Generating a pressure test trajectory curve about the interface to be tested according to the test data;
    在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值;Drawing a standard trajectory curve of the interface to be tested and the pressure measurement trajectory curve on a preset coordinate axis to obtain the distance value between each coordinate point on the standard trajectory curve and the pressure measurement trajectory curve;
    基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级;Calculating the average distance between the standard trajectory curve and the pressure test trajectory curve based on the distance values of the respective coordinate points, and using the average distance as the pressure test response level of the interface to be tested;
    根据各个待测试接口的压测响应等级生成所述压力测试报告。The pressure test report is generated according to the pressure test response level of each interface to be tested.
  14. 根据权利要求11-13任一项所述的终端设备,其特征在于,在所述控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The terminal device according to any one of claims 11 to 13, wherein the control object is controlled to run the stress test script to collect tests output by each of the interfaces to be tested based on the stress test script After the data, the processor also implements the following steps when executing the computer-readable instructions:
    若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运行时间;If the test data sent by the interface to be tested is not received within a preset waiting time threshold, the pressure test running time of the interface to be tested is determined according to the current time and the start time corresponding to running the test script ;
    基于所述压测运行时间调整所述待测试接口的所述压力测试参数;Adjusting the pressure test parameters of the interface to be tested based on the pressure test running time;
    将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。Add the adjusted stress test parameters to the stress test script, return to execute the sending the stress test script to the test object, and control the test object to run the stress test script to collect all The test interface is based on test data output by the stress test script.
  15. 根据权利要求11-13任一项所述的终端设备,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The terminal device according to any one of claims 11 to 13, wherein the importing the test data into a data analysis template associated with the test object to generate a stress test report on the test object includes:
    将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对;Comparing the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template;
    若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。If the test data exceeds the standard parameter range of any of the interfaces to be tested, the interface to be tested is identified as an abnormal interface, and interface abnormal information about the abnormal interface is output.
  16. 一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现如下步骤:A computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores computer readable instructions, characterized in that, when the computer readable instructions are executed by a processor, the following steps are implemented:
    获取测试对象的接口信息;所述接口信息记录有所述测试对象内各个待测试接口的额定运行参数;Obtain the interface information of the test object; the interface information records the rated operating parameters of each interface to be tested in the test object;
    分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,并基于所述压力测试参数生成所述测试对象的压力测试脚本;Importing each of the rated operating parameters into a pressure test parameter conversion model, calculating pressure test parameters of each interface to be tested, and generating a pressure test script of the test object based on the pressure test parameters;
    将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据;Sending the stress test script to the test object, and controlling the test object to run the stress test script, and collecting test data output by each of the interfaces to be tested based on the stress test script;
    将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告。Import the test data into the data analysis template associated with the test object to generate a stress test report on the test object.
  17. 根据权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述分别将各个所述额定运行参数导入压力测试参数转换模型,计算各个所述待测试接口的压力测试参数,包括:The computer non-volatile readable storage medium according to claim 16, wherein each of the rated operating parameters is introduced into a pressure test parameter conversion model to calculate the pressure test parameters of each interface to be tested, include:
    获取所述测试对象的内存容量以及缓存容量,并从所述额定运行参数中提取平均文本容量以及额定线程个数;Obtain the memory capacity and cache capacity of the test object, and extract the average text capacity and the number of rated threads from the rated operating parameters;
    将所述平均文本容量导入第一压力参数转换模型,计算所述待测试接口的第一压力参数;所述第一压力参数转换转换模型具体为:Import the average text volume into a first pressure parameter conversion model to calculate the first pressure parameter of the interface to be tested; the first pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100010
    Figure PCTCN2018123986-appb-100010
    其中,DocVol为所述第一压力参数;Scale为压测比例;DocVol 0为所述平均文本容量; DocVol is the first pressure parameter; Scale is the pressure measurement ratio; DocVol 0 is the average text capacity;
    将所述额定线程个数导入第二压力参数转换模型,计算所述待测试接口的第二压力参数;所述第二压力参数转换转换模型具体为:Import the number of rated threads into a second pressure parameter conversion model to calculate the second pressure parameter of the interface to be tested; the second pressure parameter conversion conversion model is specifically:
    Figure PCTCN2018123986-appb-100011
    Figure PCTCN2018123986-appb-100011
    其中,ThreadNum为所述第二压力参数;ThreadNum 0为所述额定线程个数; Where ThreadNum is the second pressure parameter; ThreadNum 0 is the number of rated threads;
    将所述第一压力参数、所述第二压力参数、所述内存容量以及所述缓存容量导入第三压力参数转换模型,计算所述待测试接口的第三压力参数;所述第三压力参数转换模型具体为:Import the first pressure parameter, the second pressure parameter, the memory capacity and the buffer capacity into a third pressure parameter conversion model, and calculate the third pressure parameter of the interface to be tested; the third pressure parameter The conversion model is:
    Figure PCTCN2018123986-appb-100012
    Figure PCTCN2018123986-appb-100012
    其中,RunTime为所述第三压力参数;RAM为所述内存容量;Cache为所述缓存容量;Wherein, RunTime is the third pressure parameter; RAM is the memory capacity; Cache is the cache capacity;
    基于所述第一压力参数、第二压力参数以及所述第三压力参数生成所述待测试接口的压力测试参数。A pressure test parameter of the interface to be tested is generated based on the first pressure parameter, the second pressure parameter, and the third pressure parameter.
  18. 根据权利要求16所述的计算机非易失性可读存储介质,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The computer non-volatile readable storage medium according to claim 16, wherein the importing the test data into a data analysis template associated with the test object generates a stress test report on the test object, include:
    根据所述测试数据生成关于待测试接口的压测轨迹曲线;Generating a pressure test trajectory curve about the interface to be tested according to the test data;
    在预设的坐标轴上绘制所述待测试接口的标准轨迹曲线以及所述压测轨迹曲线,获取所述标准轨迹曲线上各个坐标点与所述压测轨迹曲线之间的距离值;Drawing a standard trajectory curve of the interface to be tested and the pressure measurement trajectory curve on a preset coordinate axis to obtain the distance value between each coordinate point on the standard trajectory curve and the pressure measurement trajectory curve;
    基于各个坐标点的距离值计算所述标准轨迹曲线与所述压测轨迹曲线之间的平均相距距离,并将所述平均相距距离作为所述待测试接口的压测响应等级;Calculating the average distance between the standard trajectory curve and the pressure test trajectory curve based on the distance values of the respective coordinate points, and using the average distance as the pressure test response level of the interface to be tested;
    根据各个待测试接口的压测响应等级生成所述压力测试报告。The pressure test report is generated according to the pressure test response level of each interface to be tested.
  19. 根据权利要求16-18任一项所述的计算机非易失性可读存储介质,其特征在于,在所述控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据之后,所述处理器执行所述计算机可读指令时还实现如下步骤:The computer non-volatile readable storage medium according to any one of claims 16 to 18, characterized in that, when the control object is controlled to run the stress test script, each of the interfaces to be tested is collected based on After the test data output by the stress test script, the processor also implements the following steps when executing the computer-readable instructions:
    若在预设的等待时间阈值内未接收到所述待测试接口发送的所述测试数据,则根据当前时刻以及运行所述测试脚本对应的启动时刻,确定所述待测试接口的压测运行时间;If the test data sent by the interface to be tested is not received within a preset waiting time threshold, the pressure test running time of the interface to be tested is determined according to the current time and the start time corresponding to running the test script ;
    基于所述压测运行时间调整所述待测试接口的所述压力测试参数;Adjusting the pressure test parameters of the interface to be tested based on the pressure test running time;
    将调整后的所述压力测试参数添加到所述压力测试脚本,返回执行所述将所述压力测试脚本发送给所述测试对象,并控制所述测试对象运行所述压力测试脚本,采集各个所述待测试接口基于所述压力测试脚本输出的测试数据。Add the adjusted stress test parameters to the stress test script, return to execute the sending the stress test script to the test object, and control the test object to run the stress test script to collect all The test interface is based on test data output by the stress test script.
  20. 如权利要求16-18任一项所述的计算机非易失性可读存储介质,其特征在于,所述将所述测试数据导入所述测试对象关联的数据解析模板,生成关于所述测试对象的压力测试报告,包括:The computer non-volatile storage medium according to any one of claims 16 to 18, wherein the importing the test data into a data analysis template associated with the test object generates information about the test object The stress test report includes:
    将所述测试数据分别与所述数据解析模板内各个所述待测试接口的标准参数范围进行比对;Comparing the test data with the standard parameter range of each of the interfaces to be tested in the data analysis template;
    若所述测试数据超出任一所述待测试接口的标准参数范围,则识别该待测试接口为异常接口,并输出关于该异常接口的接口异常信息。If the test data exceeds the standard parameter range of any of the interfaces to be tested, the interface to be tested is identified as an abnormal interface, and interface abnormal information about the abnormal interface is output.
PCT/CN2018/123986 2018-10-25 2018-12-26 Method and device for interface testing WO2020082585A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811252453.8A CN109491894B (en) 2018-10-25 2018-10-25 Interface test method and equipment
CN201811252453.8 2018-10-25

Publications (1)

Publication Number Publication Date
WO2020082585A1 true WO2020082585A1 (en) 2020-04-30

Family

ID=65691938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/123986 WO2020082585A1 (en) 2018-10-25 2018-12-26 Method and device for interface testing

Country Status (2)

Country Link
CN (1) CN109491894B (en)
WO (1) WO2020082585A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000579A (en) * 2020-08-26 2020-11-27 上海移远通信技术股份有限公司 Software interface testing method, system, equipment and medium
CN112084114A (en) * 2020-09-16 2020-12-15 京东数字科技控股股份有限公司 Method and apparatus for testing an interface
CN112579438A (en) * 2020-12-01 2021-03-30 河南芯盾网安科技发展有限公司 Multifunctional automatic test tool and test method
CN112711536A (en) * 2020-12-30 2021-04-27 广东粤云工业互联网创新科技有限公司 Automatic dial testing method and system, and computer readable storage medium
CN113094281A (en) * 2021-04-28 2021-07-09 杭州网易云音乐科技有限公司 Hybrid App testing method and device
CN113342679A (en) * 2021-06-29 2021-09-03 汇付天下有限公司 Interface test method and test device
CN114265729A (en) * 2021-11-09 2022-04-01 北京云宽志业网络技术有限公司 Pressure testing method and device, storage medium and electronic equipment
CN114968747A (en) * 2022-07-12 2022-08-30 杭州数列网络科技有限责任公司 Automatic extreme pressure test performance test method and device, electronic equipment and storage medium
CN115114127A (en) * 2021-03-22 2022-09-27 小沃科技有限公司 Pressure testing system
CN115277165A (en) * 2022-07-22 2022-11-01 江苏智能网联汽车创新中心有限公司 Vehicle network risk determination method, device, equipment and storage medium
CN116302884A (en) * 2023-02-28 2023-06-23 安芯网盾(北京)科技有限公司 Stability test method and system for process monitoring module in system drive
WO2024041018A1 (en) * 2022-08-23 2024-02-29 京东科技控股股份有限公司 Method and apparatus for adjusting response duration of stress test system, and device and medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111752820B (en) * 2019-03-29 2024-01-19 上海哔哩哔哩科技有限公司 gRPC interface pressure test method, computer equipment and storage medium
CN110262962A (en) * 2019-05-21 2019-09-20 钛马信息网络技术有限公司 Generate the method and device of test script
CN112749080A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Target program testing method and device, storage medium and electronic equipment
CN111796978B (en) * 2020-06-29 2021-06-29 苏州好玩友网络科技有限公司 Interface detection method, device, system, equipment and storage medium
CN112765004B (en) * 2021-01-19 2024-04-26 北京睿企信息科技有限公司 Automatic and self-adaptive interface performance test method
CN113037589B (en) * 2021-03-01 2022-04-22 广东睿住智能科技有限公司 Pressure testing method and device of gateway equipment, testing platform and storage medium
CN113360300B (en) * 2021-06-29 2023-10-24 北京思普艾斯科技有限公司 Interface call link generation method, device, equipment and readable storage medium
CN115250291B (en) * 2022-07-28 2024-03-22 中国银行股份有限公司 Parameter data verification method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030052917A1 (en) * 2001-09-14 2003-03-20 David Dubovsky Data structures for use with environment based data driven automated test engine for GUI applications
CN202256605U (en) * 2011-08-29 2012-05-30 深圳市研祥软件技术有限公司 Load capacity testing device of main board interface
CN106383786A (en) * 2016-09-27 2017-02-08 北京金山安全软件有限公司 Interface pressure performance testing method and device and electronic equipment
CN108196992A (en) * 2017-12-28 2018-06-22 广州品唯软件有限公司 A kind of automatic performance test method and device
CN109614336A (en) * 2018-12-14 2019-04-12 深圳壹账通智能科技有限公司 A kind of generation method and equipment of test script

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1307844C (en) * 2003-12-09 2007-03-28 中兴通讯股份有限公司 A method of capacity planning evaluation
US7877732B2 (en) * 2006-11-29 2011-01-25 International Business Machines Corporation Efficient stress testing of a service oriented architecture based application
CN100501695C (en) * 2006-12-25 2009-06-17 中国电信股份有限公司 Performance prediction method for application software in manufacturing environment
CN105758648B (en) * 2014-12-19 2018-08-28 北京宝沃汽车有限公司 The test method and device of vehicle performance
CN108415847A (en) * 2018-05-08 2018-08-17 平安普惠企业管理有限公司 Performance test methods, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030052917A1 (en) * 2001-09-14 2003-03-20 David Dubovsky Data structures for use with environment based data driven automated test engine for GUI applications
CN202256605U (en) * 2011-08-29 2012-05-30 深圳市研祥软件技术有限公司 Load capacity testing device of main board interface
CN106383786A (en) * 2016-09-27 2017-02-08 北京金山安全软件有限公司 Interface pressure performance testing method and device and electronic equipment
CN108196992A (en) * 2017-12-28 2018-06-22 广州品唯软件有限公司 A kind of automatic performance test method and device
CN109614336A (en) * 2018-12-14 2019-04-12 深圳壹账通智能科技有限公司 A kind of generation method and equipment of test script

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000579A (en) * 2020-08-26 2020-11-27 上海移远通信技术股份有限公司 Software interface testing method, system, equipment and medium
CN112000579B (en) * 2020-08-26 2024-03-19 上海移远通信技术股份有限公司 Software interface testing method, system, equipment and medium
CN112084114A (en) * 2020-09-16 2020-12-15 京东数字科技控股股份有限公司 Method and apparatus for testing an interface
CN112579438A (en) * 2020-12-01 2021-03-30 河南芯盾网安科技发展有限公司 Multifunctional automatic test tool and test method
CN112711536A (en) * 2020-12-30 2021-04-27 广东粤云工业互联网创新科技有限公司 Automatic dial testing method and system, and computer readable storage medium
CN115114127A (en) * 2021-03-22 2022-09-27 小沃科技有限公司 Pressure testing system
CN115114127B (en) * 2021-03-22 2024-04-30 小沃科技有限公司 Pressure testing system
CN113094281A (en) * 2021-04-28 2021-07-09 杭州网易云音乐科技有限公司 Hybrid App testing method and device
CN113094281B (en) * 2021-04-28 2024-05-03 杭州网易云音乐科技有限公司 Test method and device for hybrid App
CN113342679A (en) * 2021-06-29 2021-09-03 汇付天下有限公司 Interface test method and test device
CN114265729A (en) * 2021-11-09 2022-04-01 北京云宽志业网络技术有限公司 Pressure testing method and device, storage medium and electronic equipment
CN114968747A (en) * 2022-07-12 2022-08-30 杭州数列网络科技有限责任公司 Automatic extreme pressure test performance test method and device, electronic equipment and storage medium
CN114968747B (en) * 2022-07-12 2022-10-28 杭州数列网络科技有限责任公司 Automatic extreme pressure test performance test method and device, electronic equipment and storage medium
CN115277165A (en) * 2022-07-22 2022-11-01 江苏智能网联汽车创新中心有限公司 Vehicle network risk determination method, device, equipment and storage medium
CN115277165B (en) * 2022-07-22 2023-11-07 江苏智能网联汽车创新中心有限公司 Vehicle network risk determination method, device, equipment and storage medium
WO2024041018A1 (en) * 2022-08-23 2024-02-29 京东科技控股股份有限公司 Method and apparatus for adjusting response duration of stress test system, and device and medium
CN116302884A (en) * 2023-02-28 2023-06-23 安芯网盾(北京)科技有限公司 Stability test method and system for process monitoring module in system drive
CN116302884B (en) * 2023-02-28 2023-10-31 安芯网盾(北京)科技有限公司 Stability test method and system for process monitoring module in system drive

Also Published As

Publication number Publication date
CN109491894B (en) 2022-01-14
CN109491894A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
WO2020082585A1 (en) Method and device for interface testing
CN111083225B (en) Data processing method and device in Internet of things platform and Internet of things platform
US10572456B2 (en) Method, apparatus, and computer program product for data quality analysis
CN111338954A (en) Test report generation method and equipment
EP2278502A1 (en) Deleting data stream overload
CN102929613B (en) The tuning apparatus and method of operating system
CN111309539A (en) Abnormity monitoring method and device and electronic equipment
CN111176843A (en) Multi-dimension-based load balancing method and device and related equipment
JP2018148350A (en) Threshold determination device, threshold level determination method and program
CN116760772B (en) Control system and method for converging flow divider
CN113590403A (en) Pressure testing method, device, system, electronic equipment, storage medium and product
US20230066703A1 (en) Method for estimating structural vibration in real time
CN104391879A (en) Method and device for hierarchical clustering
US11153193B2 (en) Method of and system for testing a computer network
WO2022088809A1 (en) Method and system for determining interval time for testing servers, and device and medium
WO2021147251A1 (en) Internet of things device connection test method and apparatus, computer device and storage medium
CN109376064B (en) Method and equipment for generating interface test report
CN108255704B (en) Abnormal response method of script calling event and terminal thereof
CN109241511B (en) Electronic report generation method and equipment
CN110708286A (en) Supervision system for testing internet
CN112749003A (en) Method, apparatus and computer-readable storage medium for system optimization
CN113609026B (en) Method and device for pressure testing of server
WO2019169727A1 (en) Network traffic test method and apparatus, device, and computer-readable storage medium
CN115454443A (en) Multi-system data interaction method and device and electronic equipment
CN110851249A (en) Data exporting method and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18937562

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 31.08.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18937562

Country of ref document: EP

Kind code of ref document: A1