CN111143192A - Interface automation test method and device and related product - Google Patents

Interface automation test method and device and related product Download PDF

Info

Publication number
CN111143192A
CN111143192A CN201911193547.7A CN201911193547A CN111143192A CN 111143192 A CN111143192 A CN 111143192A CN 201911193547 A CN201911193547 A CN 201911193547A CN 111143192 A CN111143192 A CN 111143192A
Authority
CN
China
Prior art keywords
interface
test
reading
test case
interface parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911193547.7A
Other languages
Chinese (zh)
Inventor
王晓杰
李桢
杨琪翔
史静慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dingdang Fast Medicine Technology Group Co Ltd
Original Assignee
Dingdang Fast Medicine Technology Group 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 Dingdang Fast Medicine Technology Group Co Ltd filed Critical Dingdang Fast Medicine Technology Group Co Ltd
Priority to CN201911193547.7A priority Critical patent/CN111143192A/en
Publication of CN111143192A publication Critical patent/CN111143192A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

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

Abstract

The invention relates to an automatic interface testing method, which comprises the following steps: (a) reading a test case and interface parameters associated with a first interface of the more than one interface, wherein the interface parameters and the test case are stored independently of each other; (b) calling a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface to obtain a response message; (c) asserting the response message to obtain an assertion result; and (d) generating a test report. The invention also provides an automatic interface testing device and a related product. According to the automatic interface testing method and device disclosed by the invention, the testing efficiency can be greatly improved, the requirements on the coding level of testers are greatly reduced, and the workload of the testers is reduced.

Description

Interface automation test method and device and related product
Technical Field
The invention belongs to the field of software testing, and particularly relates to an automatic interface testing method and device and related products.
Background
The interface test is a test for testing interfaces among system components, the interface test is different from the unit test of the traditional development, and the interface test is a comprehensive, efficient and continuous detection test for the system interfaces from the perspective of users. The interface test is mainly used for detecting the interaction point contact between an external system and a system and between each internal subsystem, and the test is mainly used for checking the exchange of data, transmitting and controlling the management process, the mutual logic dependency relationship between systems and the like. The principle of the interface test is that a simulation client sends request data to a server to obtain response data, and the effectiveness of an interface is judged through assertion. With the continuous increase of the complexity of the system, the test cost of the traditional test method is increased sharply, the test efficiency is reduced, and the interface test can provide a solution with low cost and high efficiency under the condition of the increase of the complexity of the system.
At present, interface testing tools are more, including postman, meter, fixdler and the like, postman is interface testing software developed by Google, can send any type of HTTP/HTTPs requests, can manage and run cases in batches, and has the defect that automatic assertion is not powerful enough. The jmeter is a free open source tool written by 100% pure Java and is mainly used for performance testing. Fiddler is simpler than other network debuggers, is convenient to operate, has clear format display, can perform interface test, but cannot write assertion, only can construct an HTTP request by using composer, and needs to manually confirm the correctness of a returned result.
Although there are many interface testing tools and simple interface testing requirements can be met, none of the tools can be completely matched and suitable for one project, different projects have different data processing and business logic processing modes, and the tools need to be familiar with the operation flow to complete various necessary configurations and are not flexible enough. Thus, there is a need for a more flexible interface test framework to accommodate different project environments.
Disclosure of Invention
Therefore, an interface automatic testing method and device are provided, and through the realization of an interface automatic testing framework, the interaction between people and data is reduced to a great extent, so that the pressure of functional testers is reduced.
According to a first aspect of the present invention, there is provided a method for interface testing, comprising:
(a) reading a test case and interface parameters associated with a first interface of the more than one interface, wherein the interface parameters and the test case are stored independently of each other;
(b) calling a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface to obtain a response message;
(c) asserting the response message to obtain an assertion result; and
(d) and generating a test report.
According to a second aspect of the present invention, there is provided an apparatus for interface testing, comprising:
the device comprises a reading unit, a judging unit and a processing unit, wherein the reading unit is used for reading a test case and interface parameters related to a first interface in more than one interfaces, and the interface parameters and the test case are stored independently;
the calling execution unit is used for calling a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface so as to obtain a response message;
the assertion unit is used for asserting the response message to obtain an assertion result; and
and the generating unit is used for generating a test report.
In a third aspect, an electronic device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of the first aspect when executing the computer program.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method provided in the first aspect.
In a fifth aspect, there is provided a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform the method provided by the first aspect.
The method and the device follow the basic principle of a test framework, the service logic is separated from the test script, the test script is separated from the test data, generally speaking, different items have different service logics, and different test scripts are usually required for the specific service logics. However, in the solution of the present invention, the test framework is independent from the service logic, and this test framework can be applied to other service logics, but the part related to a specific service logic needs to be correspondingly fine-tuned, and the test data is not fixed in the script, but is listed. Therefore, the method can be changed at any time according to requirements, a mode of data driving test is realized, and the requirements on the coding level of a tester can be greatly reduced. The method and the device of the invention reduce the interaction between people and data to a great extent by realizing an interface automatic test framework, thereby reducing the pressure of functional test personnel.
Drawings
For further clarity of explanation of the features and technical content of the present invention, reference should be made to the following detailed description of the present invention and accompanying drawings, which are provided for reference and description purposes only and are not intended to limit the present invention.
In the following drawings:
fig. 1 is a flowchart of an interface automation test method according to an embodiment of the invention.
Fig. 2 is a diagram illustrating an example of obtaining check information in interface parameters according to an embodiment of the present invention.
FIG. 3 is an exemplary diagram of a resulting test report, according to an embodiment of the invention.
Fig. 4 is a schematic diagram of an interface automated testing apparatus according to an embodiment of the invention.
Fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiments of the present invention disclosed are described below with reference to specific embodiments, and those skilled in the art can understand the advantages and effects of the present invention from the disclosure of the present specification. The invention is capable of other and different embodiments and its several details are capable of modification and various other changes, which can be made in various details within the specification and without departing from the spirit and scope of the invention. The drawings of the present invention are for illustrative purposes only and are not drawn to scale. The following embodiments will further explain the related art of the present invention in detail, but the disclosure is not intended to limit the scope of the present invention.
According to one aspect of the invention, an interface automation test method is provided. In the scheme of the invention, the test framework is independent from the business logic, and the test framework can be applied to other business logics, but the part related to the specific business logic needs to be correspondingly finely adjusted, and the test data is not fixed in the script and is listed. Therefore, the method can be changed according to requirements at any time, the mode of data drive testing is realized, the testing efficiency can be greatly improved, the requirement on the coding level of testers is greatly reduced, and the workload of the testers is reduced.
Fig. 1 is a flowchart of an interface automation test method according to an embodiment of the invention. As shown in fig. 1, the method comprises the steps of:
step S101, reading a test case and an interface parameter related to a first interface of more than one interfaces, wherein the interface parameter and the test case are stored independently.
Firstly, a test case and interface parameters in the test case need to be generated and stored for each of all interfaces to be tested.
The test case is a function point of the test, the interface parameters are all parameters related to the interface, and after the interface is determined, the required interface parameters can be determined. For example, if the interface is a login interface, then the test case includes: the interface name, the request method of the interface (including GET, POST, etc.), the domain name and/or port number of the interface, the path, the interface parameters, etc., and the interface parameters include the parameters of the user name (username), the password (password), etc. In one embodiment, the test case may be written by a tester at the business layer.
The test case comprises interface parameters, numerical values of the interface parameters are listed from the test case for storage, the test case is associated with the interface parameters by adding a keyword in the test case, and files for storing the interface parameters and the numerical values of the stored interface parameters can be found through the keyword in the process of reading the test case. And storing the test case by adopting a first file format, and storing the interface parameters by adopting a second file format. In a specific embodiment, for a python unit test framework, the test case may be stored in an excel file format, and the interface parameter may be stored in a json file format. According to different types of test frameworks, the test cases and the interface parameters can also be stored in other file formats, which all belong to the scope disclosed by the application.
The test case and the interface parameters are respectively stored, so that the test case and the interface parameters can be conveniently read, the test case and the interface parameters can be conveniently modified, the modification amount is reduced, and the interface parameters are listed from the test case, so that the test performance is conveniently improved.
Specifically, the test case and the interface parameter are respectively stored, and different interface parameters can be called according to different interfaces in the process of testing the interface by adopting the test case. Therefore, only the parameters are required to be acquired from the file for storing the interface parameters without traversing the test cases, and when the numerical values of the interface parameters are required to be changed, only the contents of the file for storing the interface parameters are required to be modified without modifying the whole test script, so that a data driving test mode is realized, the test efficiency is greatly improved, and the workload of testers is greatly reduced.
In addition, when the parameter input of one interface needs the output from the previous interface, the output of the previous interface is directly used for modifying or updating the content of the file for storing the interface parameters, thereby realizing the linkage among a plurality of interfaces.
Then, the test cases and the interface parameters are respectively read. The reading of the interface parameter may include the following steps: (1) reading keywords related to the interface parameters from a file storing the test case; (2) and reading the interface parameters from a file for storing the interface parameters through the keywords. After the information related to the test case and the interface parameters is read, the information may be stored in a key-value pair format.
For example, one embodiment of reading information is as follows:
"loginA":{"password":"dc483e80a7a0bd9ef71d8cf973673924","userName":"14888889998","sign":"278B510CC7B839FCC9FB1CDEA4B5B1F9","t":"2019-03-25 09:26:10","method":"ddsy.user.reg.login","v":"1.0"}
in an optional embodiment, during the process of reading the interface parameter, the verification information in the interface parameter needs to be acquired in real time. The check information may include a token value sign as described above, and may further include a cookie, a header, and the like according to different types and requirements of the interface.
Fig. 2 is a diagram illustrating an example of obtaining check information in interface parameters according to an embodiment of the present invention. As shown in fig. 2, the token sign in the above interface parameters is processed by writing the util toolset. In another alternative embodiment, some interface parameters need to be formatted during the process of reading the interface parameters. For example, the chinese parameters in the interface parameters may be encrypted to obtain characters composed of numeric symbols and the like.
Step S102, according to the request method of the first interface, calling a corresponding interface function to execute the test case and the interface parameter so as to obtain a response message.
After the test case and the interface parameters of one interface are obtained, the interface can be called to execute the test case and the interface parameters. Specifically, according to the request method of the interface, the corresponding interface function is called to execute the test case and the interface parameter, so as to obtain a response message.
In accordance with a particular embodiment of the present invention,
headers={'Content-Type':"application/x-www-form-urlencoded"}
response=requests.request("POST",url,data=payload,headers=headers,verify=False)
the request method is "POST", "data ═ payload" corresponds to the information read in step S101, and requests ("POST", url, data ═ payload, headers, and version ═ False) represent the request function.
Step S103, the response message is asserted to obtain an asserted result.
The assertion belongs to a judgment method, and judges whether the response message is in accordance with expectation. After the determination is made by the assertion, a determination result is obtained. A specific implementation of setting the break analysis response message is as follows:
try:
self.assertIn('"code":0',res)==None
result='Pass'
writeData.writeData(row,resultCol,res,result)
except Exception as e:
writeData.writeData(row,resultCol,res,'Fail')
self.assertIn('"code":0',res)==None
res represents a response message, "code":0 represents an expected value, self.
Step S104, generating a test report.
The test report describes the test procedure and test results for each interface, including a return value for each interface, i.e., whether the test for each interface passed or failed. In one embodiment, the test report may include assertion results, interface operation start time, request elapsed time, interface response time, response messages, and the like.
In an alternative embodiment, the test report may be stored in two formats, one in Excel format and one in html format. The data, the use case name, the test result and other information adopted in the whole interface test process are displayed in the test report in the Excel format, while the test report in the html format can display the test result and analyze the test result, for example, if the test result is failed, the reason of the failure is listed.
FIG. 3 is an exemplary diagram of a resulting test report, according to an embodiment of the invention. As shown in fig. 3, the test report includes an interface number (id), a module described by the interface, a use case name, whether to execute, a request method, an interface method, and the like.
After the test report is formed, the test report can be sent to a tester through a mail, so that the tester can conveniently know the test result and analyze the test report; test reports may also be stored in a database for continued integration extension.
For each interface, a corresponding test case and interface function are prepared. The above steps S101 to S103 are a test procedure for one interface. Whether all interfaces are traversed or not needs to be judged, and for the interfaces which are not traversed, the steps S101 to S103 are repeated for the test cases and the interface functions until all the interfaces are traversed.
For the process test of a plurality of interfaces, preparing a corresponding test case and an interface function for each interface, and writing a test script for each interface according to the steps to form a test suite. Therefore, in the actual test process, the test result of each interface can be obtained only by operating the test suite.
By the automatic interface testing method, a data driving testing mode can be realized, the testing efficiency is greatly improved, the requirement on the coding level of testers is greatly reduced, and the workload of the testers is reduced.
According to another aspect of the invention, an interface automation test device is provided. Fig. 4 is a schematic diagram of an interface automated testing apparatus according to an embodiment of the invention. As shown in fig. 4, the apparatus includes the following units:
a reading unit 401, configured to read a test case and an interface parameter related to a first interface of the more than one interfaces, where the interface parameter and the test case are stored independently from each other.
Firstly, a test case and interface parameters in the test case need to be generated and stored for each of all interfaces to be tested.
The test case is a function point of the test, the interface parameters are all parameters related to the interface, and after the interface is determined, the required interface parameters can be determined. For example, if the interface is a login interface, then the test case includes: the interface name, the request method of the interface (including GET, POST, etc.), the domain name and/or port number of the interface, the path, the interface parameters, etc., and the interface parameters include the parameters of the user name (username), the password (password), etc. In one embodiment, the test case may be written by a tester at the business layer.
The test case comprises interface parameters, numerical values of the interface parameters are listed from the test case for storage, the test case is associated with the interface parameters by adding a keyword in the test case, and files for storing the interface parameters and the numerical values of the stored interface parameters can be found through the keyword in the process of reading the test case. And storing the test case by adopting a first file format, and storing the interface parameters by adopting a second file format. In a specific embodiment, for a python unit test framework, the test case may be stored in an excel file format, and the interface parameter may be stored in a json file format. According to different types of test frameworks, the test cases and the interface parameters can also be stored in other file formats, which all belong to the scope disclosed by the application.
The test case and the interface parameters are respectively stored, so that the test case and the interface parameters can be conveniently read, the test case and the interface parameters can be conveniently modified, the modification amount is reduced, and the interface parameters are listed from the test case, so that the test performance is conveniently improved.
Specifically, the test case and the interface parameter are respectively stored, and different interface parameters can be called according to different interfaces in the process of testing the interface by adopting the test case. Therefore, only the parameters are required to be acquired from the file for storing the interface parameters without traversing the test cases, and when the numerical values of the interface parameters are required to be changed, only the contents of the file for storing the interface parameters are required to be modified without modifying the whole test script, so that a data driving test mode is realized, the test efficiency is greatly improved, and the workload of testers is greatly reduced.
In addition, when the parameter input of one interface needs the output from the previous interface, the output of the previous interface is directly used for modifying or updating the content of the file for storing the interface parameters, thereby realizing the linkage among a plurality of interfaces.
Then, the test cases and the interface parameters are respectively read. The reading unit 401 may include the following sub-units: the first reading subunit is used for reading keywords related to the interface parameters from a file for storing the test case; and the second reading subunit is used for reading the interface parameters from the file for storing the interface parameters through the keywords. After the information related to the test case and the interface parameters is read, the information may be stored in a key-value pair format.
For example, one embodiment of reading information is as follows: "logINA" { "password": dc483e80a7a0bd9ef71d8cf 973673924), "userName": 14888889998"," sign ": 278B510CC7B839FCC9FB1CDEA4B5B1F9", "t": 2019-03-2509: 26:10"," method ": ddsy
In an optional embodiment, the interface automated testing device may include an obtaining unit, configured to obtain, in real time, verification information in the interface parameter during the process of reading the interface parameter. The check information may include a token value sign as described above, and may further include a cookie, a header, and the like according to different types and requirements of the interface.
Fig. 2 is a diagram illustrating an example of obtaining check information in interface parameters according to an embodiment of the present invention. As shown in fig. 2, the token sign in the above interface parameters is processed by writing the util toolset. In another alternative embodiment, the interface automatic test device may include a formatting unit for formatting some interface parameters in the process of reading the interface parameters. For example, the chinese parameters in the interface parameters may be encrypted to obtain characters composed of numeric symbols and the like.
The calling execution unit 402 is configured to call a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface, so as to obtain a response packet.
After the test case and the interface parameters of one interface are obtained, the interface can be called to execute the test case and the interface parameters. Specifically, according to the request method of the interface, the corresponding interface function is called to execute the test case and the interface parameter, so as to obtain a response message.
In accordance with a particular embodiment of the present invention,
headers={'Content-Type':"application/x-www-form-urlencoded"}
response=requests.request("POST",url,data=payload,headers=headers,verify=False)
the request method is "POST", "data ═ payload" corresponds to the information read in step S101, and requests ("POST", url, data ═ payload, headers, and version ═ False) represent the request function.
The assertion unit 403 is configured to assert the response packet to obtain an assertion result.
The assertion belongs to a judgment method, and judges whether the response message is in accordance with expectation. After the determination is made by the assertion, a determination result is obtained. A specific implementation of setting the break analysis response message is as follows:
try:
self.assertIn('"code":0',res)==None
result='Pass'
writeData.writeData(row,resultCol,res,result)
except Exception as e:
writeData.writeData(row,resultCol,res,'Fail')
self.assertIn('"code":0',res)==None
res represents a response message, "code":0 represents an expected value, self.
A generating unit 404, configured to generate a test report.
The test report describes the test procedure and test results for each interface, including a return value for each interface, i.e., whether the test for each interface passed or failed. In one embodiment, the test report may include assertion results, interface operation start time, request elapsed time, interface response time, response messages, and the like.
In an alternative embodiment, the test report may be stored in two formats, one in Excel format and one in html format. The data, the use case name, the test result and other information adopted in the whole interface test process are displayed in the test report in the Excel format, while the test report in the html format can display the test result and analyze the test result, for example, if the test result is failed, the reason of the failure is listed.
FIG. 3 is an exemplary diagram of a resulting test report, according to an embodiment of the invention. As shown in fig. 3, the test report includes an interface number (id), a module described by the interface, a use case name, whether to execute, a request method, an interface method, and the like.
After the test report is formed, the test report can be sent to a tester through a mail, so that the tester can conveniently know the test result and analyze the test report; test reports may also be stored in a database for continued integration extension.
For each interface, a corresponding test case and interface function are prepared. The steps performed by the units 401 to 403 described above are test procedures for one interface. A judgment unit is needed for judging whether all interfaces are traversed. For the interface which is not traversed, the steps executed by the units 401 to 403 are repeated for the test case and the interface function thereof until all the interfaces are traversed.
For the process test of a plurality of interfaces, preparing a corresponding test case and an interface function for each interface, and writing a test script for each interface according to the steps to form a test suite. Therefore, in the actual test process, the test result of each interface can be obtained only by operating the test suite.
Through the automatic testing arrangement of above-mentioned interface, can realize the mode of data drive test, greatly provide efficiency of software testing and reduce the requirement to tester's code level greatly, reduce tester's work load.
Referring to fig. 5, fig. 5 provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method and refinement scheme as shown in fig. 1 when executing the computer program.
It should be understood that the above-described apparatus embodiments are merely exemplary, and that the apparatus of the present disclosure may be implemented in other ways. For example, the division of the units/modules in the above embodiments is only one logical function division, and there may be another division manner in actual implementation. For example, multiple units, modules, or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented.
In addition, unless otherwise specified, each functional unit/module in the embodiments of the present disclosure may be integrated into one unit/module, each unit/module may exist alone physically, or two or more units/modules may be integrated together. The integrated units/modules may be implemented in the form of hardware or software program modules.
If the integrated unit/module is implemented in hardware, the hardware may be digital circuits, analog circuits, etc. Physical implementations of hardware structures include, but are not limited to, transistors, memristors, and the like. The processor or chip may be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, ASIC, etc., unless otherwise specified. The on-chip cache, the off-chip Memory, and the Memory may be any suitable magnetic storage medium or magneto-optical storage medium, such as resistive Random Access Memory (rram), Dynamic Random Access Memory (dram), Static Random Access Memory (SRAM), enhanced Dynamic Random Access Memory (edram), High-Bandwidth Memory (HBM), hybrid Memory cubic (hmc) (hybrid Memory cube), and the like, unless otherwise specified.
The integrated units/modules, if implemented in the form of software program modules and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method and refinement scheme shown in fig. 1.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform the method and refinement scheme as shown in fig. 1.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for interface testing, comprising:
(a) reading a test case and interface parameters associated with a first interface of the more than one interface, wherein the interface parameters and the test case are stored independently of each other;
(b) calling a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface to obtain a response message;
(c) asserting the response message to obtain an assertion result; and
(d) and generating a test report.
2. The method of claim 1, further comprising:
performing steps (a) - (c) across all of the one or more interfaces.
3. The method of claim 1 or 2, further comprising:
in the process of reading the test case and the interface parameters, acquiring verification information in the interface parameters; and/or
And formatting the interface parameters in the process of reading the test cases and the interface parameters.
4. The method of claim 1 or 2, wherein said reading test cases and interface parameters associated with a first interface of the more than one interfaces comprises:
reading keywords related to the interface parameters from a file storing the test case; and
and reading the interface parameters from a file for storing the interface parameters through the keywords.
5. The method of claim 1, wherein the test case is stored as a first file format and the interface parameters are stored as a second file format.
6. An apparatus for interface testing, comprising:
the device comprises a reading unit, a judging unit and a processing unit, wherein the reading unit is used for reading a test case and interface parameters related to a first interface in more than one interfaces, and the interface parameters and the test case are stored independently;
the calling execution unit is used for calling a corresponding interface function to execute the test case and the interface parameter according to the request method of the first interface so as to obtain a response message;
the assertion unit is used for asserting the response message to obtain an assertion result; and
and the generating unit is used for generating a test report.
7. The apparatus of claim 6, further comprising:
and the traversing unit is used for traversing all the interfaces in the more than one interfaces to execute the functions of the reading unit, the calling execution unit and the assertion unit.
8. The apparatus of claim 6 or 7, further comprising:
the obtaining unit is used for obtaining the verification information in the interface parameters in the process of reading the test cases and the interface parameters; and/or
And the formatting unit is used for formatting the interface parameters in the process of reading the test cases and the interface parameters.
9. The apparatus of claim 6 or 7, wherein the reading unit comprises:
the first reading unit is used for reading keywords related to the interface parameters from a file for storing the test case; and
and the second reading unit is used for reading the interface parameters from the file for storing the interface parameters through the keywords.
10. The apparatus of claim 6, wherein the test case is stored as a first file format and the interface parameters are stored as a second file format.
CN201911193547.7A 2019-11-28 2019-11-28 Interface automation test method and device and related product Pending CN111143192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911193547.7A CN111143192A (en) 2019-11-28 2019-11-28 Interface automation test method and device and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911193547.7A CN111143192A (en) 2019-11-28 2019-11-28 Interface automation test method and device and related product

Publications (1)

Publication Number Publication Date
CN111143192A true CN111143192A (en) 2020-05-12

Family

ID=70517318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911193547.7A Pending CN111143192A (en) 2019-11-28 2019-11-28 Interface automation test method and device and related product

Country Status (1)

Country Link
CN (1) CN111143192A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881021A (en) * 2020-07-07 2020-11-03 上海中通吉网络技术有限公司 Interface test method, device and system
CN111950252A (en) * 2020-07-31 2020-11-17 上海中通吉网络技术有限公司 HTTP response message format verification method, device and equipment
CN111949537A (en) * 2020-08-14 2020-11-17 北京锐安科技有限公司 Interface test method, device, equipment and medium
CN112328486A (en) * 2020-11-06 2021-02-05 深圳壹账通智能科技有限公司 Interface automation test method and device, computer equipment and storage medium
CN112631914A (en) * 2020-12-24 2021-04-09 上海幻电信息科技有限公司 Data testing method and device
CN113342678A (en) * 2021-06-29 2021-09-03 北京锐安科技有限公司 Interface automatic testing method and device, electronic equipment and storage medium
CN113362173A (en) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN115629999A (en) * 2022-12-22 2023-01-20 云账户技术(天津)有限公司 Assertion detection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
CN109189684A (en) * 2018-08-28 2019-01-11 四川长虹电器股份有限公司 Automatic interface testing method based on Python
US20190188119A1 (en) * 2017-12-14 2019-06-20 Cognizant Technology Solutions India Pvt. Ltd. System and a method for providing automated performance detection of application programming interfaces
CN110245083A (en) * 2019-06-11 2019-09-17 四川长虹电器股份有限公司 A kind of automatic interface testing method based on python

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729243A (en) * 2017-10-12 2018-02-23 上海携程金融信息服务有限公司 API automated testing method, system, equipment and storage medium
US20190188119A1 (en) * 2017-12-14 2019-06-20 Cognizant Technology Solutions India Pvt. Ltd. System and a method for providing automated performance detection of application programming interfaces
CN109189684A (en) * 2018-08-28 2019-01-11 四川长虹电器股份有限公司 Automatic interface testing method based on Python
CN110245083A (en) * 2019-06-11 2019-09-17 四川长虹电器股份有限公司 A kind of automatic interface testing method based on python

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881021A (en) * 2020-07-07 2020-11-03 上海中通吉网络技术有限公司 Interface test method, device and system
CN111950252A (en) * 2020-07-31 2020-11-17 上海中通吉网络技术有限公司 HTTP response message format verification method, device and equipment
CN111949537A (en) * 2020-08-14 2020-11-17 北京锐安科技有限公司 Interface test method, device, equipment and medium
CN112328486A (en) * 2020-11-06 2021-02-05 深圳壹账通智能科技有限公司 Interface automation test method and device, computer equipment and storage medium
WO2022095518A1 (en) * 2020-11-06 2022-05-12 深圳壹账通智能科技有限公司 Automatic interface test method and apparatus, and computer device and storage medium
CN112631914A (en) * 2020-12-24 2021-04-09 上海幻电信息科技有限公司 Data testing method and device
CN113362173A (en) * 2021-06-03 2021-09-07 中国工商银行股份有限公司 Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN113342678A (en) * 2021-06-29 2021-09-03 北京锐安科技有限公司 Interface automatic testing method and device, electronic equipment and storage medium
CN115629999A (en) * 2022-12-22 2023-01-20 云账户技术(天津)有限公司 Assertion detection method and device

Similar Documents

Publication Publication Date Title
CN111143192A (en) Interface automation test method and device and related product
CN107122296B (en) Method and apparatus for data assertion for test interface
US10146663B2 (en) Modeling and testing interactions between components of a software system
US9465718B2 (en) Filter generation for load testing managed environments
US8205120B2 (en) Intelligent test framework
TWI575397B (en) Point-wise protection of application using runtime agent and dynamic security analysis
TWI574173B (en) Determine secure activity of application under test
US9122803B1 (en) Collaborative software defect detection
US11169910B2 (en) Probabilistic software testing via dynamic graphs
CN112650676A (en) Software testing method, device, equipment and storage medium
CN113127108A (en) Service request processing method and device, storage medium and electronic equipment
CN112769609B (en) Method, system, medium, and article of manufacture for controlling fault simulation and simulating faults
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN112433933A (en) Method and equipment for automatically testing interface
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN113127345B (en) Application testing method and device, electronic equipment and storage medium
CN111026631A (en) Automatic interface detection method and device and server
CN117493162B (en) Data verification method, system, equipment and storage medium for interface test
CN112948269B (en) Information processing method, information processing apparatus, electronic device, and readable storage medium
WO2022199387A1 (en) File processing method and system, and computer device and medium
TWI817128B (en) Enterprise resource planning device and smart debugging method thereof
CN118035095A (en) Method and device for testing business processing object, computer equipment and storage medium
CN116304413A (en) Front-end page testing method and device, storage medium and processor
CN115964274A (en) Test data acquisition method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512

RJ01 Rejection of invention patent application after publication