WO2020155759A1 - 接口测试方法、装置、计算机设备和存储介质 - Google Patents

接口测试方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020155759A1
WO2020155759A1 PCT/CN2019/117666 CN2019117666W WO2020155759A1 WO 2020155759 A1 WO2020155759 A1 WO 2020155759A1 CN 2019117666 W CN2019117666 W CN 2019117666W WO 2020155759 A1 WO2020155759 A1 WO 2020155759A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
test
test case
factors
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/117666
Other languages
English (en)
French (fr)
Inventor
陈晓芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020155759A1 publication Critical patent/WO2020155759A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software

Definitions

  • This application relates to the field of computers, in particular to an interface testing method, device, computer equipment and storage medium.
  • interface testing has been paid more and more attention.
  • improving the coverage of interface testing uses the method of data traversal.
  • the combined data The test cases obtained by data traversal
  • the main purpose of this application is to provide an interface testing method, device, computer equipment, and storage medium, which aims to ensure the basis of interface testing quality, reduce the number of test cases, and reduce the waste of computing resources.
  • this application proposes an interface testing method, which includes the following steps:
  • the orthogonal experiment method is used to obtain test cases for the interface test, wherein the number of test cases is at least Where A k is the level number of the k-th input parameter, there are n input parameters in total;
  • an interface test is performed on the interface.
  • the step of obtaining the number of input parameters of the interface and recording it as the number of factors includes:
  • the method includes:
  • an interface test is performed on the interface.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes:
  • the step of invoking the open source orthogonal tool allparis and generating the txt format file with the test case according to the txt format file it includes:
  • the txt format file with the test case is converted to an excel format file for invoking during interface testing.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes:
  • the first test case and the second test case are summarized to obtain the test case of the interface test.
  • the method includes:
  • test result is the same as the preset correct test result, an interface test report is generated based on the conclusion that the test passes.
  • This application provides an interface testing device, including:
  • the factor number marking unit is used to obtain the number of input parameters of the interface and record it as the factor number
  • the level number marking unit is used to analyze the parameter conditions of the input parameters using a preset analysis rule to obtain the number of the parameter conditions, which is recorded as the level number;
  • a judging unit for judging whether the number of factors and the return value of MAX (all the level numbers) are both greater than or equal to 2;
  • the test case acquisition unit is used to obtain the test case of the interface test by using the orthogonal experiment method if the return value of the number of factors and MAX (all the number of levels) is greater than or equal to 2, wherein the value of the test case Quantity is at least Where A k is the level number of the k-th input parameter, there are n input parameters in total;
  • the interface testing unit is used to perform interface testing on the interface according to the test case.
  • the present application provides a computer device including a memory and a processor, the memory stores computer-readable instructions, and the processor implements the steps of any one of the foregoing methods when the computer-readable instructions are executed.
  • the present application provides a computer-readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps of any one of the above methods are implemented.
  • the number of input parameters of the interface is obtained and recorded as the number of factors
  • the number of parameter conditions for obtaining the input parameters is recorded as the number of levels
  • the number of factors is sum If MAX (the number of levels) is greater than or equal to 2, the orthogonal experiment method is used to obtain the test cases for the interface test, and the interface test is performed on the interface, thereby reducing the number of test cases while ensuring the quality of the interface test. Reduce the burden of testing.
  • FIG. 1 is a schematic flowchart of an interface testing method according to an embodiment of the application
  • FIG. 2 is a schematic block diagram of the structure of an interface testing device according to an embodiment of the application.
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • an embodiment of the present application provides an interface testing method, including the following steps:
  • the orthogonal experiment method is used to obtain test cases for the interface test, wherein the number of test cases is at least Where A k is the level number of the k-th input parameter, there are n input parameters in total;
  • the number of input parameters of the interface is obtained and recorded as the number of factors.
  • the input parameter refers to a field (or information segment) in which the interface receives a message sent by a data sender.
  • the input parameter includes a user name, a password, and the like. If the input parameters are only username and password, the number of input parameters is two; if the input parameters are username, password, and verification code, the number of input parameters is three.
  • the number of input parameters is not limited here, and any integer greater than 0 can be used as the number of input parameters.
  • the interface may be an interface of a local terminal, or an interface of other terminals or servers.
  • the parameter conditions of the input parameters are analyzed by using a preset analysis rule to obtain the number of the parameter conditions, which is recorded as the level number.
  • the parameter conditions of different input parameters are different.
  • the parameter conditions can be: letters and numbers, long letters and numbers, and not entered (ie, empty input content).
  • the number of parameter conditions is 3.
  • the number of parameter conditions is not limited here, and any integer greater than 0 can be used as the number of parameter conditions.
  • the preset analysis rule may be any rule, for example: sending a legal format specification of the input parameter to the terminal or server corresponding to the interface, and obtaining the input parameter of the interface according to the legal format specification In legal format, the number of parameter conditions is obtained and recorded as level number.
  • step S3 it is determined whether the return value of the number of factors and MAX (all the number of levels) is greater than or equal to 2.
  • the MAX function is used to obtain the maximum value, that is, the return value of the MAX (all the level numbers), which represents the maximum value among all the level numbers. If more than one of the number of factors and the return value of MAX (all the number of levels) is less than 2, since the number of combinations of parameter levels is limited, the test of the interface can be achieved directly by traversing the combination. .
  • the orthogonal experiment method is used to obtain the test case of the interface test, and the test case of the test case Quantity is at least Where A k is the level number of the k-th input parameter, and there are n input parameters in total. There may be a lot of input parameters and corresponding parameter levels for interface testing. If the combination of all parameter levels is traversed, the interface testing of the interface is expensive and time-consuming. Therefore, the orthogonal experiment method is used to obtain test cases for interface testing without reducing the test quality as much as possible. Among them, the orthogonal experiment method is a design method for studying multiple factors and multiple levels.
  • the method for obtaining the test cases of the interface test by using the orthogonal experiment method includes: generating an orthogonal table, the orthogonal table is composed of rows and columns, each row represents a test case, and each column represents one
  • the parameter level, the orthogonal table is generated according to the following principle: each number in each column (that is, the number of the parameter level in the corresponding input parameter) appears the same number of times; any two columns constitute Each ordinal pair (that is, two numbers in the same row as an ordinal pair) appear the same number of times.
  • the sum of the test cases represented in the orthogonal table is the test case of the interface test.
  • the number of test cases is at least Where Ak is the level number of the k-th input parameter, there are n input parameters in total, so as to minimize the number of test cases based on the principle of generating orthogonal tables.
  • the number of test cases is exactly It can minimize the number of test cases, but, if necessary, you can increase the number of test cases to increase the quality of the test. Accordingly, without reducing the quality of the test as much as possible, the test time and cost are reduced.
  • an interface test is performed on the interface according to the test case.
  • the interface test can be performed after the test case is obtained.
  • the login interface is tested.
  • the step S1 of obtaining the number of input parameters of the interface and recording it as the number of factors includes:
  • the number of input parameters that realizes the acquisition of the interface is recorded as the number of factors.
  • the interface is used to receive messages and can map the messages into data reports. Because the message and data report received by the interface match the interface, that is, the fields of the message and data report match the input parameters of the interface, it is analyzed that the existing data report has The number of fields is to know the number of input parameters to obtain the number of factors.
  • the method includes:
  • the interface test of the interface is realized.
  • the number of factors and the return value of MAX all the number of levels
  • MAX all the number of levels
  • the step S4 of obtaining the test case of the interface test by using the orthogonal experiment method includes:
  • the test case for automatically acquiring the interface test is realized.
  • the open source orthogonal tool allparis is used to generate an orthogonal table, which can use a txt format file that has recorded the input parameter and the parameter level corresponding to the input parameter to generate a txt format file with the test case . Therefore, by using the txt format file with the test case, the test case can be obtained, and then the interface test can be performed.
  • the method includes:
  • each line in the txt format file with the test case theoretically represents a test case, but in order to avoid the appearance of wrong files and wrong test cases, it is also judged that the test cases are Whether the number of lines in the txt format file is the same as the number of the test cases to ensure that the generated txt format file does not have errors and does contain the correct test cases. Then convert it to an excel format file, which can be used for interface testing (excel format file is generally used for interface testing).
  • the step S4 of obtaining the test case of the interface test by using the orthogonal experiment method includes:
  • test cases it is possible to add test cases to improve the quality of interface testing.
  • the tester is familiar with the interface and understands which input parameters of the interface and the corresponding parameter level are necessary for special testing
  • the second test case input by the tester can be added to the test case of the interface test, To improve the quality of interface testing.
  • the second test case input by the tester may be obtained only by the tester manually inputting a complete test case, or it may be obtained by artificially modifying a test case template stored locally.
  • step S5 of performing interface testing on the interface according to the test case the method includes:
  • test result is the same as the preset correct test result, an interface test report is generated based on the conclusion that the test has passed.
  • the interface test report is generated.
  • the interface test has the expected conclusion, that is, if the interface is correct, the correct test result obtained by the theoretical test. By comparing the actual test result with the preset correct test result, you can know whether the test passed. If the test result is the same as the preset correct test result, indicating that the test has passed, an interface test report will be generated based on the conclusion of the test passing. For example, for the login interface test, a test case is the user name guest (ie letters and numbers), the password is MES (ie letters and numbers), the verification code is empty (ie not entered), the test result is "Unable to log in", and The preset correct test result is also "Unable to log in", which indicates that the test case passed.
  • the specific test process may also include database call, data matching, etc. (involved in the login interface test), and all of them may use mature existing technologies, which will not be repeated here. Further, if the test result is different from the preset correct test result, an interface test report is generated based on the conclusion that the test failed, and the test case that failed the test is attached to the interface test report.
  • the number of input parameters of the interface is obtained and recorded as the number of factors, and the number of parameter conditions for obtaining the input parameters is recorded as the number of levels.
  • the number of factors and MAX are If both are greater than or equal to 2, the orthogonal experiment method is used to obtain the test cases for the interface test, and the interface test is performed on the interface, thereby reducing the number of test cases and the test burden while ensuring the quality of the interface test.
  • an interface testing device including:
  • the factor number marking unit 10 is used to obtain the number of input parameters of the interface and record it as the factor number;
  • the level number marking unit 20 is used to analyze the parameter conditions of the input parameters using a preset analysis rule to obtain the number of the parameter conditions, which is recorded as the level number;
  • the judging unit 30 is used to judge whether the number of factors and the return value of MAX (all the level numbers) are both greater than or equal to 2;
  • the test case acquisition unit 40 is configured to obtain the test case of the interface test by using the orthogonal experiment method if the return value of the factor number and MAX (all the level numbers) is greater than or equal to 2, wherein the test case Is at least Where A k is the level number of the k-th input parameter, there are n input parameters in total;
  • the interface testing unit 50 is configured to perform interface testing on the interface according to the test case.
  • the input parameter refers to a field (or information segment) in which the interface receives a message sent by a data sender.
  • the input parameter includes a user name, a password, and the like. If the input parameters are only username and password, the number of input parameters is two; if the input parameters are username, password, and verification code, the number of input parameters is three. Of course, the number of input parameters is not limited here, and any integer greater than 0 can be used as the number of input parameters.
  • the interface may be an interface of a local terminal, or an interface of other terminals or servers.
  • the parameter conditions of the input parameters are analyzed using a preset analysis rule, and the number of the parameter conditions is obtained, which is recorded as a level number.
  • the parameter conditions of different input parameters are different.
  • the parameter conditions can be: letters and numbers, long letters and numbers, and unentry (that is, empty input content).
  • the number of parameter conditions is 3.
  • the number of parameter conditions is not limited here, and any integer greater than 0 can be used as the number of parameter conditions.
  • the preset analysis rule may be any rule, for example, the legal format specification of the input parameter is sent to the terminal or server corresponding to the interface, and the input parameter of the interface is learned according to the legal format specification. In legal format, the number of parameter conditions is obtained and recorded as level number.
  • the MAX function is used to obtain the maximum value, that is, the return value of the MAX (all the level numbers), which represents the maximum value among all the level numbers. If more than one of the number of factors and the return value of MAX (all the number of levels) is less than 2, since the number of combinations of parameter levels is limited, the test of the interface can be achieved directly by traversing the combination. .
  • the orthogonal experiment method is used to obtain the test case of the interface test, and the test case of the test case Quantity is at least Where A k is the level number of the k-th input parameter, and there are n input parameters in total. There may be a lot of input parameters and corresponding parameter levels for interface testing. If the combination of all parameter levels is traversed, the interface testing of the interface is expensive and time-consuming. Therefore, the orthogonal experiment method is used to obtain test cases for interface testing without reducing the test quality as much as possible. Among them, the orthogonal experiment method is a design method for studying multiple factors and multiple levels.
  • the method for obtaining the test cases of the interface test by using the orthogonal experiment method includes: generating an orthogonal table, the orthogonal table is composed of rows and columns, each row represents a test case, and each column represents one
  • the parameter level, the orthogonal table is generated according to the following principle: each number in each column (that is, the number of the parameter level in the corresponding input parameter) appears the same number of times; any two columns constitute Each ordinal pair (that is, two numbers in the same row as an ordinal pair) appear the same number of times.
  • the sum of the test cases represented in the orthogonal table is the test case of the interface test.
  • the number of test cases is at least Where Ak is the level number of the k-th input parameter, there are n input parameters in total, so as to minimize the number of test cases based on the principle of generating orthogonal tables.
  • the number of test cases is exactly It can minimize the number of test cases, but, if necessary, you can increase the number of test cases to increase the quality of the test. Accordingly, without reducing the quality of the test as much as possible, the test time and cost are reduced.
  • an interface test is performed on the interface according to the test case.
  • the interface test can be performed after the test case is obtained.
  • the login interface is tested.
  • the factor number marking unit 10 includes:
  • the data report acquisition subunit is used to acquire a data report once generated by the interface, and the data report is generated according to a message once received by the interface;
  • the factor number marking subunit is used to analyze the number of fields in the data report, and use the number of fields as the number of input parameters and record it as the number of factors.
  • the number of input parameters that realizes the acquisition of the interface is recorded as the number of factors.
  • the interface is used to receive messages and can map the messages into data reports. Because the message and data report received by the interface match the interface, that is, the fields of the message and data report match the input parameters of the interface, it is analyzed that the existing data report has The number of fields is to know the number of input parameters to obtain the number of factors.
  • the device includes:
  • the traversal test case acquisition unit is used to determine that if the number of factors and the return value of MAX (all the number of levels) are not both greater than 2, all combinations of each parameter level and other parameter levels are used as the The traversal test case of the interface test;
  • the traversal interface test unit is used to perform interface testing on the interface according to the traversal test case.
  • the interface test of the interface is realized.
  • the number of factors and the return value of MAX all the number of levels
  • MAX all the number of levels
  • test case acquisition unit 40 includes:
  • the txt format file recording subunit is used to record the input parameter and the parameter level corresponding to the input parameter in the txt format file;
  • test case txt format file generation subunit is used to call the open source orthogonal tool allparis, and generate a txt format file with the test case according to the txt format file.
  • the test case for automatically acquiring the interface test is realized.
  • the open source orthogonal tool allparis is used to generate an orthogonal table, which can use a txt format file that has recorded the input parameters and the parameter levels corresponding to the input parameters to generate a txt format file with the test case . Therefore, by using the txt format file with the test case, the test case can be obtained, and then the interface test can be performed.
  • test case acquisition unit 40 includes:
  • the quantity judgment subunit is used to judge whether the number of lines in the txt format file with the test case is the same as the number of the test case;
  • the file conversion subunit is used to convert the txt format file with the test case into an excel format file if the number of lines in the txt format file with the test case is the same as the number of the test case Called during interface testing.
  • each line in the txt format file with the test case theoretically represents a test case, but in order to avoid the appearance of the wrong file and the wrong test case, it is also judged that the test case has the test case Whether the number of lines in the txt format file is the same as the number of the test cases to ensure that the generated txt format file does not have errors and does contain the correct test cases. Then convert it to an excel format file, which can be used for interface testing (excel format file is generally used for interface testing).
  • test case acquisition unit 40 includes:
  • the first test case acquisition subunit is used to obtain the first test case of the interface test by using an orthogonal experiment method
  • the second test case receiving subunit is used to receive the second test case input by the tester
  • the use case summary subunit is used to summarize the first test case and the second test case to obtain the test case of the interface test.
  • test cases it is possible to add test cases to improve the quality of interface testing.
  • the tester since the tester is familiar with the interface and understands which input parameters of the interface and the corresponding parameter level are necessary for special testing, the second test case input by the tester can be added to the test case of the interface test based on this, To improve the quality of interface testing.
  • the second test case input by the tester can be obtained only by the tester manually inputting a complete test case, or it can be obtained by artificially modifying a test case template stored locally.
  • the device includes:
  • the test result judgment unit is used to judge whether the test result is the same as the preset correct test result
  • the interface test report generating unit is configured to generate an interface test report based on the conclusion of passing the test if the test result is the same as the preset correct test result.
  • the interface test report is generated.
  • the interface test has the expected conclusion, that is, if the interface is correct, the correct test result obtained by the theoretical test. By comparing the actual test result with the preset correct test result, you can know whether the test passed. If the test result is the same as the preset correct test result, indicating that the test has passed, an interface test report will be generated based on the conclusion of the test passing. For example, for the login interface test, a test case is the user name guest (ie letters and numbers), the password is MES (ie letters and numbers), the verification code is empty (ie not entered), the test result is "Unable to log in", and The preset correct test result is also "Unable to log in", which indicates that the test case passed.
  • the specific test process may also include database call, data matching, etc. (involved in the login interface test), all of which can use mature existing technologies, which will not be repeated here. Further, if the test result is different from the preset correct test result, an interface test report is generated based on the conclusion that the test failed, and the test case that failed the test is attached to the interface test report.
  • the interface testing device of the present application obtains the number of input parameters of the interface and records it as the number of factors, and obtains the number of parameter conditions of the input parameters, which is recorded as the level number.
  • the factor number and MAX are If both are greater than or equal to 2, the orthogonal experiment method is used to obtain the test cases for the interface test, and the interface test is performed on the interface, thereby reducing the number of test cases and the test burden while ensuring the quality of the interface test.
  • the embodiment also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in the figure.
  • the computer equipment includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the memory provides an environment for the operation of the operating system and computer readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data used in the interface test method.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to implement an interface testing method.
  • the above-mentioned processor executes the above-mentioned interface testing method, including the following steps: acquiring the number of input parameters of the interface and recording it as the number of factors; using a preset analysis rule to analyze the parameter conditions of the input parameters to obtain the number of parameter conditions , Recorded as the number of levels; determine whether the number of factors and the return value of MAX (all the number of levels) are greater than or equal to 2; if the number of factors and the return value of MAX (all the number of levels) are greater than Equal to 2.
  • the orthogonal experiment method is used to obtain the test cases of the interface test, wherein the number of the test cases is at least Where Ak is the level number of the k-th input parameter, there are n input parameters in total; and the interface is tested according to the test case.
  • the step of obtaining the number of input parameters of the interface and recording it as a factor number includes: obtaining a data report once generated by the interface, and the data report is based on a data report once received by the interface. The number of fields in the data report is analyzed, and the number of fields is used as the number of input parameters and recorded as the number of factors.
  • the step of judging whether the number of factors and the return value of MAX (all the level numbers) are greater than or equal to 2 it includes: if judging the number of factors and MAX (all the number of levels) If the return value of the number of levels is not all greater than 2, then all combinations of each parameter level and other parameter levels are used as the traversal test case of the interface test; according to the traversal test case, the interface is interfaced test.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes: The input parameter and the parameter level corresponding to the input parameter are recorded in a txt format file; the open source orthogonal tool allparis is called, and a txt format file with the test case is generated according to the txt format file.
  • the step of invoking the open source orthogonal tool allparis and generating the txt format file with the test case according to the txt format file it includes: judging the txt with the test case Whether the number of lines in the format file is the same as the number of test cases; if the number of lines in the txt format file with the test case is the same as the number of test cases, the txt format file with the test case will be Converted to excel format file for use in interface testing.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes: Obtain the first test case of the interface test by the orthogonal experiment method; receive the second test case input by the tester; summarize the first test case and the second test case to obtain the test case of the interface test .
  • the method includes: determining whether the test result is the same as the preset correct test result; if the test result is the same as the preset If the correct test results are the same, the interface test report is generated based on the conclusion of the test passing.
  • the number of factors and MAX are both If it is greater than or equal to 2, the orthogonal experiment method is used to obtain the test cases of the interface test, and the interface test is performed on the interface, thereby reducing the number of test cases and the test burden while ensuring the quality of the interface test.
  • An embodiment of the present application also provides a computer-readable storage medium on which computer-readable instructions are stored.
  • an interface testing method is implemented, including the following steps: obtaining input parameters of the interface The number is recorded as the number of factors; the parameter conditions of the input parameters are analyzed by the preset analysis rules, and the number of the parameter conditions is obtained, which is recorded as the number of levels; the number of factors and MAX (all the number of levels) are judged Whether the return value of is greater than or equal to 2; if the number of factors and the return value of MAX (all the number of levels) are greater than or equal to 2, the orthogonal experiment method is used to obtain the test case of the interface test, wherein the test The number of use cases is at least Where Ak is the level number of the k-th input parameter, there are n input parameters in total; and the interface is tested according to the test case.
  • the computer-readable storage medium is, for example, a non-volatile computer-readable storage medium or a volatile computer-readable
  • the step of obtaining the number of input parameters of the interface and recording it as a factor number includes: obtaining a data report once generated by the interface, and the data report is based on a data report once received by the interface. The number of fields in the data report is analyzed, and the number of fields is used as the number of input parameters and recorded as the number of factors.
  • the step of judging whether the number of factors and the return value of MAX (all the level numbers) are greater than or equal to 2 it includes: if judging the number of factors and MAX (all the number of levels) If the return value of the number of levels is not all greater than 2, then all combinations of each parameter level and other parameter levels are used as the traversal test case of the interface test; according to the traversal test case, the interface is interfaced test.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes: The input parameter and the parameter level corresponding to the input parameter are recorded in a txt format file; the open source orthogonal tool allparis is called, and a txt format file with the test case is generated according to the txt format file.
  • the step of invoking the open source orthogonal tool allparis and generating the txt format file with the test case according to the txt format file it includes: judging the txt with the test case Whether the number of lines in the format file is the same as the number of test cases; if the number of lines in the txt format file with the test case is the same as the number of test cases, the txt format file with the test case will be Converted to excel format file for use in interface testing.
  • the step of obtaining the test case of the interface test by using an orthogonal experiment method includes: Obtain the first test case of the interface test by the orthogonal experiment method; receive the second test case input by the tester; summarize the first test case and the second test case to obtain the test case of the interface test .
  • the method includes: determining whether the test result is the same as the preset correct test result; if the test result is the same as the preset If the correct test results are the same, the interface test report is generated based on the conclusion of the test passing.
  • the computer-readable storage medium of the present application obtains the number of input parameters of the interface and records it as the number of factors, and the number of parameter conditions for obtaining the input parameters is recorded as the number of levels, the number of factors and MAX (the number of levels ) If both are greater than or equal to 2, the orthogonal experiment method is used to obtain test cases for the interface test, and the interface test is performed on the interface, thereby reducing the number of test cases and the test burden while ensuring the quality of the interface test.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • ROM read only memory
  • PROM programmable ROM
  • EPROM electrically programmable ROM
  • EEPROM electrically erasable programmable ROM
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

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

Abstract

一种接口测试方法、装置、计算机设备和存储介质,所述方法包括:获取所述接口的输入参数的数量,记为因素数;采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为aa,其中A k为第k个所述输入参数的水平数,共有n个输入参数;根据所述测试用例,对所述接口进行接口测试。从而保证接口测试质量的基础上减少计算资源的耗费。

Description

接口测试方法、装置、计算机设备和存储介质
本申请要求于2019年1月31日提交中国专利局、申请号为2019101004426,发明名称为“接口测试方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及到计算机领域,特别是涉及到一种接口测试方法、装置、计算机设备和存储介质。
背景技术
接口测试作为性价比较高的测试,已日趋受重视,但是目前提高接口测试的覆盖度都采用数据遍历的方式,而当接口输入参数增多、并且输入参数的可取值种类增多时,组合数据(数据遍历而获得的测试用例)就成几何倍数增加,很大程度上增加了测试负担。因此,现有技术在进行接口测试时,若要全面测试,则会耗费大量的计算资源,增加测试负担;若想要节省计算资源,却无法保证接口测试的质量。
技术问题
本申请的主要目的为提供一种接口测试方法、装置、计算机设备和存储介质,旨在保证接口测试质量的基础,减少测试用例数量从而减少计算资源的浪费。
技术解决方案
为了实现上述目的,本申请提出一种接口测试方法,包括以下步骤:
获取所述接口的输入参数的数量,记为因素数;
采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000001
其中A k为第k个所述输入参数的水平数,共有n个输入参数;
根据所述测试用例,对所述接口进行接口测试。
进一步地,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:
获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
进一步地,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:
若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
根据所述遍历测试用例,对所述接口进行接口测试。
进一步地,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:
在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;
调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
进一步地,所述调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件的步骤之后,包括:
判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;
若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
进一步地,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:
采用正交实验法获得所述接口测试的第一测试用例;
接收测试人员输入的第二测试用例;
将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
进一步地,所述根据所述测试用例,对所述接口进行接口测试的步骤之后,包括:
判断所述测试结果是否与预设的正确测试结果相同;
若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
本申请提供一种接口测试装置,包括:
因素数标记单元,用于获取所述接口的输入参数的数量,记为因素数;
水平数标记单元,用于采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
判断单元,用于判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
测试用例获取单元,用于若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000002
其中A k为第k个所述输入参数的水平数,共有n个输入参数;
接口测试单元,用于根据所述测试用例,对所述接口进行接口测试。
本申请提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述任一项所述方法的步骤。
本申请提供一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任一项所述的方法的步骤。
有益效果
本申请的接口测试方法、装置、计算机设备和存储介质,通过获取所述接口的输入参数的数量,记为因素数,获得输入参数的参数条件的数量,记为水平数,所述因素数和MAX(所述水平数)若均大于等于2,则采用正交实验法获得所述接口测试的测试用例,对所述接口进行接口测试,从而在保证接口测试质量的同时,减少测试用例数量,减少测试负担。
附图说明
图1为本申请一实施例的接口测试方法的流程示意图;
图2为本申请一实施例的接口测试装置的结构示意框图;
图3为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本申请的最佳实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请实施例提供一种接口测试方法,包括以下步骤:
S1、获取所述接口的输入参数的数量,记为因素数;
S2、采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
S3、判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
S4、若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000003
其中A k为第k个所述输入参数的水平数,共有n个输入参数;
S5、根据所述测试用例,对所述接口进行接口测试。
如上述步骤S1所述,获取所述接口的输入参数的数量,记为因素数。所述输入参数是指所述接口接收数据发送方发送的报文的字段(或称信息段),例如对于登陆接口而言,所述输入参数包括用户名、密码等。若所述输入参数仅为用户名、密码,则所述输入参数的数量为2个;若所述输入参数为用户名、密码、验证码,则所述输入参数的数量为3个。当然,在此不限所述输入参数的数量,任意大于0的整数均可作为所述输入参数的数量。其中,所述接口可以为本地终端的接口,也可以为其他终端或者服务器的接口。
如上述步骤S2所述,采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数。不同的输入参数的参数条件是不同的,例如输入参数为用户名时,参数条件可以为: 字母和数字、超长的字母和数字、以及未录入(即空的输入内容),此时所述参数条件的数量即为3个。当然,在此不限所述参数条件的数量,任意大于0的整数均可作为所述参数条件的数量。其中所述预设的分析规则可以为任意规则,例如:向所述接口对应的终端或者服务器发送所述输入参数的合法格式规定,根据所述合法格式规定获知所述接口的所述输入参数的合法格式,获得所述参数条件的数量,记为水平数。
如上述步骤S3所述,判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2。其中,MAX函数用于获取最大值,即所述MAX(所有的所述水平数)的返回值,表示所有的所述水平数中的最大值。若所述因素数和MAX(所有的所述水平数)的返回值中有一者以上小于2,由于参数水平的组合数量有限,因此直接用遍历组合的方式,即可实现对所述接口的测试。若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,则表示参数水平的组合数量很大,难以用遍历组合的方式对所有组合进行测试,因此有必要对所述组合进行筛选以得到测试用例。
如上述步骤S4所述,若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000004
其中A k为第k个所述输入参数的水平数,共有n个输入参数。接口测试的输入参数与相应的参数水平数量可能都很多,若以遍历所有参数水平的组合的方式,来实现对接口的接口测试,花费巨大、耗时无数。因此采用正交实验法以在尽量不减少测试质量的情况下,得到测试用例,以进行接口测试。其中,正交实验法是研究多因素多水平的一种设计方法,它是根据正交性从全面试验中挑选出部分有代表性的点进行试验,这些有代表性的点具备了“均匀分散,齐整可比”的特点。采用正交实验法获得所述接口测试的测试用例的方法包括:生成正交表,所述正交表由行和列构成,每个所述行代表一个测试用例,每个所述列代表一个参数水平,所述正交表依据下述原则生成:每一列中各数字(即所述参数水平在相应的所述输入参数中的排序数)出现的次数都一样多;任何两列所构成的各有序数对(即将同一行的两个数字看成有序数对)出现的次数都一样多。所述正交表中所表示的测试用例的总和(即正交表的所有行)即为所述接口测试的测试用例。其中,所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000005
其中A k为第k个所述输入参数的水平数,共有n个输入参数,从而在符合正交表生成原则的基础上,尽量减少测试用例的数量。其中,当测试用例的数量正好为
Figure PCTCN2019117666-appb-000006
时,能最大程度地减少测试用例的数量,但是,在必要的情况下,可以增加测试用例的数量以增加测试的质量。据此,在尽量不减少测试质量的情况下,减少测试时间与测试花费。
如上述步骤S5所述,根据所述测试用例,对所述接口进行接口测试。如前所述,得到了测试用例,即可进行接口测试。其中,例如对登陆接口进行测试,登陆接口具有3个输入参数(用户名、密码、验 证码)、每个输入参数均具有3个相同的参数水平(字母和数字、超长的字母和数字、以及未录入),那么生成的测试用例应至少有2+2+2+1=7个。据此,进行接口测试。
一个实施方式中,所述获取所述接口的输入参数的数量,记为因素数的步骤S1,包括:
S101、获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
S102、分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
如上所述,实现了获取所述接口的输入参数的数量,记为因素数。所述接口是用于接收报文,并能将所述报文映射为数据报表。由于所述接口接收的报文及数据报表是匹配所述接口的,即报文、数据报表的字段与所述接口的输入参数是相匹配的,所以分析出已有的所述数据报表具有的字段数量,即可知道所述输入参数的数量,从而获得因素数。
一个实施方式中,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤S3之后,包括:
S31、若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
S32、根据所述遍历测试用例,对所述接口进行接口测试。
如上所述,实现了对所述接口进行接口测试。当所述因素数和MAX(所有的所述水平数)的返回值不均大于等于2,表明以每个所述参数水平与其他参数水平的所有组合,就可以获得数量不大的所述接口测试的遍历测试用例。例如当因素数为1时,即只有一个输入参数,同时该输入参数的水平数为10时,即参数水平的数量为10个,那么所述所有组合的总数量即为10×1=10个,即遍历测试用例的数量为10个,因此可直接进行接口测试。
一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤S4,包括:
S401、在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;
S402、调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
如上所述,实现了自动获取所述接口测试的测试用例。其中开源的所述正交工具allparis用于生成正交表,能够利用已记录有所述输入参数与所述输入参数相对应的参数水平的txt格式文件,生成具有所述测试用例的txt格式文件。从而,利用所述具有所述测试用例的txt格式文件,可以得到测试用例,进而进行接口测试。
一个实施方式中,所述调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用 例的txt格式文件的步骤S402之后,包括:
S4021、判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;
S4021、若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
如上所述,实现了便于接口测试。其中,所述具有所述测试用例的txt格式文件中的每一行,理论上均代表了一个测试用例,但是为了避免错误文件、错误测试用例的出现,还进行了判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同,以保证生成的txt格式文件未出错,的确包含了正确的所述测试用例。再转换为excel格式文件,以供接口测试时调用(接口测试一般调用excel格式文件)。
一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤S4,包括:
S411、采用正交实验法获得所述接口测试的第一测试用例;
S412、接收测试人员输入的第二测试用例;
S413、将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
如上所述,实现了增加测试用例以提高接口测试的质量。其中,由于测试人员对接口熟悉,明白接口的哪些输入参数及对应的参数水平具有特别测试的必要,据此可将测试人员输入的第二测试用例,增加到所述接口测试的测试用例中,以提高接口测试的质量。进一步地,所述测试人员输入的第二测试用例可以仅通过测试人员手动输入完整的测试用例而获得,也可以通过对预先存储于本地的测试用例模板进行人为修改而获得。
一个实施方式中,所述根据所述测试用例,对所述接口进行接口测试的步骤S5之后,包括:
S6、判断所述测试结果是否与预设的正确测试结果相同;
S7、若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
如上所述,实现了生成接口测试报告。其中,接口测试具有预期结论,即若接口无误,理论测试得到的正确测试结果。将实际获得的测试结果与预设的正确测试结果相对比,即可知道测试是否通过。若与预设的正确测试结果相同,表明测试通过,则以测试通过的结论生成接口测试报告。例如,登陆接口的测试,一个测试用例为用户名guest(即字母和数字)、密码为MES(即字母和数字)、验证码为空(即未录入),测试结果为“无法登陆”,而预设的正确测试结果也是“无法登陆”,则表明该测试用例通过。当然,具体的测试过程还可能包括数据库的调用,数据的匹配等(登陆接口测试涉及),均可以采用已成熟的现有技术,在此不再赘述。进一步地,若所述测试结果与预设的正确测试结果不同,则以测试未通过的结论生成接口测试报告,并在所述接口测试报告中附上测试未通过的测试用例。
本申请的接口测试方法,通过获取所述接口的输入参数的数量,记为因素数,获得输入参数的参数 条件的数量,记为水平数,所述因素数和MAX(所述水平数)若均大于等于2,则采用正交实验法获得所述接口测试的测试用例,对所述接口进行接口测试,从而在保证接口测试质量的同时,减少测试用例数量,减少测试负担。
参照图2,本申请实施例提供一种接口测试装置,包括:
因素数标记单元10,用于获取所述接口的输入参数的数量,记为因素数;
水平数标记单元20,用于采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
判断单元30,用于判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
测试用例获取单元40,用于若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000007
其中A k为第k个所述输入参数的水平数,共有n个输入参数;
接口测试单元50,用于根据所述测试用例,对所述接口进行接口测试。
如上述单元10所述,获取所述接口的输入参数的数量,记为因素数。所述输入参数是指所述接口接收数据发送方发送的报文的字段(或称信息段),例如对于登陆接口而言,所述输入参数包括用户名、密码等。若所述输入参数仅为用户名、密码,则所述输入参数的数量为2个;若所述输入参数为用户名、密码、验证码,则所述输入参数的数量为3个。当然,在此不限所述输入参数的数量,任意大于0的整数均可作为所述输入参数的数量。其中,所述接口可以为本地终端的接口,也可以为其他终端或者服务器的接口。
如上述单元20所述,采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数。不同的输入参数的参数条件是不同的,例如输入参数为用户名时,参数条件可以为:字母和数字、超长的字母和数字、以及未录入(即空的输入内容),此时所述参数条件的数量即为3个。当然,在此不限所述参数条件的数量,任意大于0的整数均可作为所述参数条件的数量。其中所述预设的分析规则可以为任意规则,例如:向所述接口对应的终端或者服务器发送所述输入参数的合法格式规定,根据所述合法格式规定获知所述接口的所述输入参数的合法格式,获得所述参数条件的数量,记为水平数。
如上述单元30所述,判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2。其中,MAX函数用于获取最大值,即所述MAX(所有的所述水平数)的返回值,表示所有的所述水平数中的最大值。若所述因素数和MAX(所有的所述水平数)的返回值中有一者以上小于2,由于参数水平的组合数量有限,因此直接用遍历组合的方式,即可实现对所述接口的测试。若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,则表示参数水平的组合数量很大,难以用遍历组合的方 式对所有组合进行测试,因此有必要对所述组合进行筛选以得到测试用例。
如上述单元40所述,若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000008
其中A k为第k个所述输入参数的水平数,共有n个输入参数。接口测试的输入参数与相应的参数水平数量可能都很多,若以遍历所有参数水平的组合的方式,来实现对接口的接口测试,花费巨大、耗时无数。因此采用正交实验法以在尽量不减少测试质量的情况下,得到测试用例,以进行接口测试。其中,正交实验法是研究多因素多水平的一种设计方法,它是根据正交性从全面试验中挑选出部分有代表性的点进行试验,这些有代表性的点具备了“均匀分散,齐整可比”的特点。采用正交实验法获得所述接口测试的测试用例的方法包括:生成正交表,所述正交表由行和列构成,每个所述行代表一个测试用例,每个所述列代表一个参数水平,所述正交表依据下述原则生成:每一列中各数字(即所述参数水平在相应的所述输入参数中的排序数)出现的次数都一样多;任何两列所构成的各有序数对(即将同一行的两个数字看成有序数对)出现的次数都一样多。所述正交表中所表示的测试用例的总和(即正交表的所有行)即为所述接口测试的测试用例。其中,所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000009
其中A k为第k个所述输入参数的水平数,共有n个输入参数,从而在符合正交表生成原则的基础上,尽量减少测试用例的数量。其中,当测试用例的数量正好为
Figure PCTCN2019117666-appb-000010
时,能最大程度地减少测试用例的数量,但是,在必要的情况下,可以增加测试用例的数量以增加测试的质量。据此,在尽量不减少测试质量的情况下,减少测试时间与测试花费。
如上述单元50所述,根据所述测试用例,对所述接口进行接口测试。如前所述,得到了测试用例,即可进行接口测试。其中,例如对登陆接口进行测试,登陆接口具有3个输入参数(用户名、密码、验证码)、每个输入参数均具有3个相同的参数水平(字母和数字、超长的字母和数字、以及未录入),那么生成的测试用例应至少有2+2+2+1=7个。据此,进行接口测试。
一个实施方式中,所述因素数标记单元10,包括:
数据报表获取子单元,用于获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
因素数标记子单元,用于分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
如上所述,实现了获取所述接口的输入参数的数量,记为因素数。所述接口是用于接收报文,并能将所述报文映射为数据报表。由于所述接口接收的报文及数据报表是匹配所述接口的,即报文、数据报表的字段与所述接口的输入参数是相匹配的,所以分析出已有的所述数据报表具有的字段数量,即可知 道所述输入参数的数量,从而获得因素数。
一个实施方式中,所述装置,包括:
遍历测试用例获取单元,用于若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
遍历接口测试单元,用于根据所述遍历测试用例,对所述接口进行接口测试。
如上所述,实现了对所述接口进行接口测试。当所述因素数和MAX(所有的所述水平数)的返回值不均大于等于2,表明以每个所述参数水平与其他参数水平的所有组合,就可以获得数量不大的所述接口测试的遍历测试用例。例如当因素数为1时,即只有一个输入参数,同时该输入参数的水平数为10时,即参数水平的数量为10个,那么所述所有组合的总数量即为10×1=10个,即遍历测试用例的数量为10个,因此可直接进行接口测试。
一个实施方式中,所述测试用例获取单元40,包括:
txt格式文件记录子单元,用于在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;
测试用例txt格式文件生成子单元,用于调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
如上所述,实现了自动获取所述接口测试的测试用例。其中开源的所述正交工具allparis用于生成正交表,能够利用已记录有所述输入参数与所述输入参数相对应的参数水平的txt格式文件,生成具有所述测试用例的txt格式文件。从而,利用所述具有所述测试用例的txt格式文件,可以得到测试用例,进而进行接口测试。
一个实施方式中,所述测试用例获取单元40,包括:
数量判断子单元,用于判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;
文件转换子单元,用于若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
如上所述,实现了便于接口测试。其中,所述具有所述测试用例的txt格式文件中的每一行,理论上均代表了一个测试用例,但是为了避免错误文件、错误测试用例的出现,还进行了判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同,以保证生成的txt格式文件未出错,的确包含了正确的所述测试用例。再转换为excel格式文件,以供接口测试时调用(接口测试一般调用excel格式文件)。
一个实施方式中,所述测试用例获取单元40,包括:
第一测试用例获取子单元,用于采用正交实验法获得所述接口测试的第一测试用例;
第二测试用例接收子单元,用于接收测试人员输入的第二测试用例;
用例汇总子单元,用于将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
如上所述,实现了增加测试用例以提高接口测试的质量。其中,由于测试人员对接口熟悉,明白接口的哪些输入参数及对应的参数水平具有特别测试的必要,据此可将测试人员输入的第二测试用例,增加到所述接口测试的测试用例中,以提高接口测试的质量。进一步地,所述测试人员输入的第二测试用例可以仅通过测试人员手动输入完整的测试用例而获得,也可以通过对预先存储于本地的测试用例模板进行人为修改而获得。
一个实施方式中,所述装置,包括:
测试结果判断单元,用于判断所述测试结果是否与预设的正确测试结果相同;
接口测试报告生成单元,用于若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
如上所述,实现了生成接口测试报告。其中,接口测试具有预期结论,即若接口无误,理论测试得到的正确测试结果。将实际获得的测试结果与预设的正确测试结果相对比,即可知道测试是否通过。若与预设的正确测试结果相同,表明测试通过,则以测试通过的结论生成接口测试报告。例如,登陆接口的测试,一个测试用例为用户名guest(即字母和数字)、密码为MES(即字母和数字)、验证码为空(即未录入),测试结果为“无法登陆”,而预设的正确测试结果也是“无法登陆”,则表明该测试用例通过。当然,具体的测试过程还可能包括数据库的调用,数据的匹配等(登陆接口测试涉及),均可以采用已成熟的现有技术,在此不再赘述。进一步地,若所述测试结果与预设的正确测试结果不同,则以测试未通过的结论生成接口测试报告,并在所述接口测试报告中附上测试未通过的测试用例。
本申请的接口测试装置,通过获取所述接口的输入参数的数量,记为因素数,获得输入参数的参数条件的数量,记为水平数,所述因素数和MAX(所述水平数)若均大于等于2,则采用正交实验法获得所述接口测试的测试用例,对所述接口进行接口测试,从而在保证接口测试质量的同时,减少测试用例数量,减少测试负担。
参照图3,实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储接口测试方法所用数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种接口测试方法。
上述处理器执行上述接口测试方法,包括以下步骤:获取所述接口的输入参数的数量,记为因素数;采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000011
其中A k为第k个所述输入参数的水平数,共有n个输入参数;根据所述测试用例,对所述接口进行接口测试。
在一个实施方式中,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
在一个实施方式中,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;根据所述遍历测试用例,对所述接口进行接口测试。
在一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
在一个实施方式中,所述调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件的步骤之后,包括:判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
在一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:采用正交实验法获得所述接口测试的第一测试用例;接收测试人员输入的第二测试用例;将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
在一个实施方式中,所述根据所述测试用例,对所述接口进行接口测试的步骤之后,包括:判断所述测试结果是否与预设的正确测试结果相同;若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
本领域技术人员可以理解,图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请的计算机设备,通过获取所述接口的输入参数的数量,记为因素数,获得输入参数的参数条件的数量,记为水平数,所述因素数和MAX(所述水平数)若均大于等于2,则采用正交实验法获得所述接口测试的测试用例,对所述接口进行接口测试,从而在保证接口测试质量的同时,减少测试用例数量,减少测试负担。
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被处理器执行时实现接口测试方法,包括以下步骤:获取所述接口的输入参数的数量,记为因素数;采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
Figure PCTCN2019117666-appb-000012
其中A k为第k个所述输入参数的水平数,共有n个输入参数;根据所述测试用例,对所述接口进行接口测试。所述计算机可读存储介质,例如为非易失性的计算机可读存储介质,或者为易失性的计算机可读存储介质。
在一个实施方式中,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
在一个实施方式中,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;根据所述遍历测试用例,对所述接口进行接口测试。
在一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
在一个实施方式中,所述调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件的步骤之后,包括:判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
在一个实施方式中,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:采用正交实验法获得所述接口测试的第一测试用例;接收测试人员输入的第二测试用例;将所述第一测试用例与所述第二测试用例汇总,以获得所 述接口测试的测试用例。
在一个实施方式中,所述根据所述测试用例,对所述接口进行接口测试的步骤之后,包括:判断所述测试结果是否与预设的正确测试结果相同;若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
本申请的计算机可读存储介质,通过获取所述接口的输入参数的数量,记为因素数,获得输入参数的参数条件的数量,记为水平数,所述因素数和MAX(所述水平数)若均大于等于2,则采用正交实验法获得所述接口测试的测试用例,对所述接口进行接口测试,从而在保证接口测试质量的同时,减少测试用例数量,减少测试负担。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种接口测试方法,其特征在于,包括:
    获取所述接口的输入参数的数量,记为因素数;
    采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
    判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
    若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
    Figure PCTCN2019117666-appb-100001
    其中A k为第k个所述输入参数的水平数,共有n个输入参数;
    根据所述测试用例,对所述接口进行接口测试。
  2. 根据权利要求1所述的接口测试方法,其特征在于,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:
    获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
    分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
  3. 根据权利要求1所述的接口测试方法,其特征在于,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:
    若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
    根据所述遍历测试用例,对所述接口进行接口测试。
  4. 根据权利要求1所述的接口测试方法,其特征在于,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:
    在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;
    调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
  5. 根据权利要求4所述的接口测试方法,其特征在于,所述调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件的步骤之后,包括:
    判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;
    若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
  6. 根据权利要求1所述的接口测试方法,其特征在于,所述若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例的步骤,包括:
    采用正交实验法获得所述接口测试的第一测试用例;
    接收测试人员输入的第二测试用例;
    将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
  7. 根据权利要求1所述的接口测试方法,其特征在于,所述根据所述测试用例,对所述接口进行接口测试的步骤之后,包括:
    判断所述测试结果是否与预设的正确测试结果相同;
    若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
  8. 一种接口测试装置,其特征在于,包括:
    因素数标记单元,用于获取所述接口的输入参数的数量,记为因素数;
    水平数标记单元,用于采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
    判断单元,用于判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
    测试用例获取单元,用于若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
    Figure PCTCN2019117666-appb-100002
    其中A k为第k个所述输入参数的水平数,共有n个输入参数;
    接口测试单元,用于根据所述测试用例,对所述接口进行接口测试。
  9. 根据权利要求8所述的接口测试装置,其特征在于,所述因素数标记单元,包括:
    数据报表获取子单元,用于获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
    因素数标记子单元,用于分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
  10. 根据权利要求8所述的接口测试装置,其特征在于,所述装置,包括:
    遍历测试用例获取单元,用于若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
    遍历接口测试单元,用于根据所述遍历测试用例,对所述接口进行接口测试。
  11. 根据权利要求8所述的接口测试装置,其特征在于,所述测试用例获取单元,包括:
    txt格式文件记录子单元,用于在txt格式文件中记录所述输入参数,以及与所述输入参数相对应的参数水平;
    测试用例txt格式文件生成子单元,用于调取开源的正交工具allparis,根据所述txt格式文件,生成具有所述测试用例的txt格式文件。
  12. 根据权利要求11所述的接口测试装置,其特征在于,所述测试用例获取单元,包括:
    数量判断子单元,用于判断所述具有所述测试用例的txt格式文件的行数是否与所述测试用例的数量相同;
    文件转换子单元,用于若所述具有所述测试用例的txt格式文件的行数与所述测试用例的数量相同,则将具有所述测试用例的txt格式文件转换为excel格式文件,以供接口测试时调用。
  13. 根据权利要求8所述的接口测试装置,其特征在于,所述测试用例获取单元,包括:
    第一测试用例获取子单元,用于采用正交实验法获得所述接口测试的第一测试用例;
    第二测试用例接收子单元,用于接收测试人员输入的第二测试用例;
    用例汇总子单元,用于将所述第一测试用例与所述第二测试用例汇总,以获得所述接口测试的测试用例。
  14. 根据权利要求8所述的接口测试装置,其特征在于,所述装置,包括:
    测试结果判断单元,用于判断所述测试结果是否与预设的正确测试结果相同;
    接口测试报告生成单元,用于若所述测试结果与预设的正确测试结果相同,则以测试通过的结论生成接口测试报告。
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现接口测试方法,所述接口测试方法,包括:
    获取所述接口的输入参数的数量,记为因素数;
    采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
    判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
    若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
    Figure PCTCN2019117666-appb-100003
    其中A k为第k个所述输入参数的水平数,共有n个输入参数;
    根据所述测试用例,对所述接口进行接口测试。
  16. 根据权利要求15所述的计算机设备,其特征在于,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:
    获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
    分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
  17. 根据权利要求15所述的计算机设备,其特征在于,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:
    若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
    根据所述遍历测试用例,对所述接口进行接口测试。
  18. 一种计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现接口测试方法,所述接口测试方法,包括:
    获取所述接口的输入参数的数量,记为因素数;
    采用预设的分析规则分析所述输入参数的参数条件,获得所述参数条件的数量,记为水平数;
    判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2;
    若所述因素数和MAX(所有的所述水平数)的返回值均大于等于2,采用正交实验法获得所述接口测试的测试用例,其中所述测试用例的数量至少为
    Figure PCTCN2019117666-appb-100004
    其中A k为第k个所述输入参数的水平数,共有n个输入参数;
    根据所述测试用例,对所述接口进行接口测试。
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述获取所述接口的输入参数的数量,记为因素数的步骤,包括:
    获取所述接口曾经生成的一个数据报表,所述数据报表根据所述接口曾经接收的一个报文而生成;
    分析所述数据报表具有的字段数量,将所述字段数量作为所述输入参数的数量,并记为因素数。
  20. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述判断所述因素数和MAX(所有的所述水平数)的返回值是否均大于等于2的步骤之后,包括:
    若判断所述因素数和MAX(所有的所述水平数)的返回值不均大于2,则以每个所述参数水平与其他参数水平的所有组合,作为所述接口测试的遍历测试用例;
    根据所述遍历测试用例,对所述接口进行接口测试。
PCT/CN2019/117666 2019-01-31 2019-11-12 接口测试方法、装置、计算机设备和存储介质 Ceased WO2020155759A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910100442.6 2019-01-31
CN201910100442.6A CN109933524A (zh) 2019-01-31 2019-01-31 接口测试方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2020155759A1 true WO2020155759A1 (zh) 2020-08-06

Family

ID=66985390

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117666 Ceased WO2020155759A1 (zh) 2019-01-31 2019-11-12 接口测试方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN109933524A (zh)
WO (1) WO2020155759A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257456A (zh) * 2023-05-12 2023-06-13 西安晟昕科技股份有限公司 一种多接口测试方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933524A (zh) * 2019-01-31 2019-06-25 平安科技(深圳)有限公司 接口测试方法、装置、计算机设备和存储介质
CN111752846B (zh) * 2020-06-30 2024-10-15 深圳前海微众银行股份有限公司 一种接口测试方法及装置
CN112486846A (zh) * 2020-12-18 2021-03-12 上海中通吉网络技术有限公司 测试用例自动生成并执行的方法、装置、设备和存储介质
CN115017027B (zh) * 2021-03-04 2025-10-17 抖音视界有限公司 接口自动化持续集成测试方法、装置、设备及存储介质
CN115617646A (zh) * 2021-07-16 2023-01-17 北京字节跳动网络技术有限公司 测试用例的生成方法及设备
CN113884310A (zh) * 2021-09-18 2022-01-04 江铃汽车股份有限公司 基于正交理论的整车门联动解锁功能测试方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073483A (zh) * 2009-11-23 2011-05-25 中兴通讯股份有限公司 一种生成正交测试用例的方法及装置
CN102456267A (zh) * 2010-10-26 2012-05-16 上海晨兴希姆通电子科技有限公司 安防功能测试方法
CN107783895A (zh) * 2016-08-31 2018-03-09 上海华虹集成电路有限责任公司 基于正交表的多条件参数测试用例设计方法
US20180121319A1 (en) * 2016-10-28 2018-05-03 International Business Machines Corporation Code component debugging in an application program
CN109933524A (zh) * 2019-01-31 2019-06-25 平安科技(深圳)有限公司 接口测试方法、装置、计算机设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8995074B1 (en) * 2011-03-02 2015-03-31 Marvell International Ltd. Read channel optimization using evolutionary algorithms
CN107239392B (zh) * 2016-03-29 2021-02-12 腾讯科技(深圳)有限公司 一种测试方法、装置、终端及存储介质
CN108763071A (zh) * 2018-05-17 2018-11-06 平安科技(深圳)有限公司 一种网页测试方法及终端设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073483A (zh) * 2009-11-23 2011-05-25 中兴通讯股份有限公司 一种生成正交测试用例的方法及装置
CN102456267A (zh) * 2010-10-26 2012-05-16 上海晨兴希姆通电子科技有限公司 安防功能测试方法
CN107783895A (zh) * 2016-08-31 2018-03-09 上海华虹集成电路有限责任公司 基于正交表的多条件参数测试用例设计方法
US20180121319A1 (en) * 2016-10-28 2018-05-03 International Business Machines Corporation Code component debugging in an application program
CN109933524A (zh) * 2019-01-31 2019-06-25 平安科技(深圳)有限公司 接口测试方法、装置、计算机设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116257456A (zh) * 2023-05-12 2023-06-13 西安晟昕科技股份有限公司 一种多接口测试方法
CN116257456B (zh) * 2023-05-12 2023-07-18 西安晟昕科技股份有限公司 一种多接口测试方法

Also Published As

Publication number Publication date
CN109933524A (zh) 2019-06-25

Similar Documents

Publication Publication Date Title
WO2020155759A1 (zh) 接口测试方法、装置、计算机设备和存储介质
US20140281721A1 (en) Automatic generation of test scripts
WO2019100576A1 (zh) 自动化测试管理方法、装置、终端设备及存储介质
CN108509344B (zh) 日切跑批测试方法、设备及可读存储介质
CN106354634A (zh) 接口测试方法及装置
CN110221982A (zh) 业务系统的性能测试方法、装置、设备及可读存储介质
CN106528393A (zh) 一种WebService的Mock测试的方法及装置
CN109062788B (zh) 测试用例生成方法、装置、计算机设备和存储介质
CN110750443B (zh) 网页测试的方法、装置、计算机设备及存储介质
WO2019019640A1 (zh) 订单信息的模拟处理方法、装置、存储介质和计算机设备
CN105868171A (zh) 一种Excel文件的校验方法及装置
CN110888797A (zh) 测试数据生成方法、装置、计算机设备及存储介质
CN112291365B (zh) 访问均衡处理方法、装置、计算机设备及存储介质
CN110334499A (zh) 接口权限管控方法、装置、计算机设备和存储介质
CN109582583B (zh) 软件测试方法、装置、计算机设备和存储介质
CN114238148A (zh) 一种业务系统登录测试方法、装置、设备及介质
CN108073662A (zh) 一种客服系统的交互方法与设备
CN107392560A (zh) 一种基于互联网的Excel表格数据发布采集方法及系统
CN115440333B (zh) 数据采集过程中的数据处理方法、装置、终端设备及介质
CN107085553B (zh) 一种输入框测试方法及装置
CN110134594B (zh) 包括帐号名称的应用的功能测试方法、装置和计算机设备
CN114461724A (zh) 一种基于随机抽样的数据同步比对方法、装置及系统
WO2020015184A1 (zh) 流水数据的管理方法、装置、计算机设备和存储介质
CN111325629A (zh) 企业投资价值评估方法、装置、服务器及可读存储介质
CN108153660A (zh) 订单信息的模拟处理方法和装置

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: 19913221

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19913221

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19913221

Country of ref document: EP

Kind code of ref document: A1