Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

HTTP interface automatic test method and device, equipment and storage medium

An automated testing and interface technology, applied in the computer field, can solve the problem of high cost and achieve the effect of saving time cost and labor cost

Pending Publication Date: 2021-10-15
杭州遥望网络科技有限公司
View PDF0 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of this application is to provide an HTTP interface automatic testing method, device, equipment and readable storage medium to solve the problem that the current HTTP interface needs to manually determine the interface parameters, resulting in higher costs

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • HTTP interface automatic test method and device, equipment and storage medium
  • HTTP interface automatic test method and device, equipment and storage medium
  • HTTP interface automatic test method and device, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] The first embodiment of the HTTP interface automated testing method provided by the application is introduced below, see figure 1 , embodiment one includes:

[0044] S11, start the browser through the automated testing tool;

[0045] S12. In the browser, capture the request data and response data of the target interface through a proxy;

[0046] S13, converting the request data and response data of the target interface into json data; dynamically generating a virtual test class according to the json data, and dynamically assembling interface parameters to obtain a test case of the target interface;

[0047] S14. Execute the test case to implement the test on the target interface.

[0048] In practical applications, Selenium can be selected specifically as the automated testing tool of this embodiment. Selenium is directly run in the browser and is used for web application testing. In this embodiment, Selenium is mainly responsible for starting the browser.

[0049] ...

Embodiment 2

[0056] see figure 2 , embodiment two specifically includes:

[0057] S201. Download the slenium dependency package and the browsermob-proxy dependency package.

[0058] S202. Start the browsermob-proxy service.

[0059] Attached python code:

[0060] BMPserver=Server(r'D:\Apython\browsermob-proxy-2.1.4\bin\browsermob-proxy.bat') / / Set browsermob-proxy directory

[0061] BMPserver.start() / / start browsermob-proxy service

[0062] S203. Add the browsermob-proxy service to the webdriver startup configuration.

[0063] First, download the slenium dependency package and browsermob-proxy dependency package, start the browsermob-proxy service; add the browsermob-proxy service to the startup configuration of slenium's webdriver. It is important to mention here, because when browsermob-proxy is started and then accessed with a browser, there will be a need to load a certificate, so the configuration includes an ignore certificate error. In addition, before configuring Selenium's W...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an HTTP interface automatic test method. The method includes starting a browser through an automatic test tool; in the browser, capturing request data and response data of the target interface through the proxy; converting the request data and the response data of the target interface into json data; dynamically generating a virtual test class according to the json data, and dynamically assembling interface parameters to obtain a test case of the target interface; and finally executing the test case to test the target interface. Therefore, according to the method, the corresponding parameters of the interface can be automatically obtained, then the test case is automatically generated, the interface test is executed, full-process automation of the interface test is achieved, and a large amount of time cost and labor cost are saved. In addition, the invention further provides an HTTP interface automatic test device and equipment and a readable storage medium, and the technical effects of the HTTP interface automatic testing device and equipment and the readable storage medium correspond to the technical effects of the method.

Description

technical field [0001] The present application relates to the field of computer technology, in particular to an HTTP interface automatic testing method, device, equipment and readable storage medium. Background technique [0002] During project testing, testers often need to test HTTP interfaces. Due to the huge and scattered data of various interfaces, and some interface fields are cumbersome, different situations, and different types, they are extremely dependent on manual operations, making maintenance difficult and costly. During the testing process, testers need to determine the parameters such as input parameters of each interface. This process is time-consuming and labor-intensive, and has high professional requirements for testers. If the tester has insufficient basic knowledge or is careless, the operation will be more difficult and time-consuming cost. [0003] It can be seen that how to overcome the defects that the HTTP testing process relies on manual implement...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36H04L29/08
CPCG06F11/3688H04L67/02
Inventor 谢如栋方剑徐夫明邹益陈云
Owner 杭州遥望网络科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products