Python-based interface automation test method

An automated testing and interface technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as inability to generate test reports, inflexibility, etc., to solve low test efficiency, reduce execution time, and improve efficiency. Effect

Active Publication Date: 2019-01-11
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF4 Cites 32 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Tools such as JMeter, which focus on performance testing, are a bit overqualified for interface testing and cannot generate test reports; Postman is controlled by JavaScript scripts, which requires a certain understanding and mastery of the details of the front-end page; Robot Framework is an open source tool, and the bottom layer is developed with python , has powerful library functions to support various test scenarios. Compared with other interface testing tools, Robot Framework is more flexible and more scalable, but at the same time, it is not suitable for programming languages, especially python language, and code capabilities. There are also certain requirements
[0005] Although the interface testing tools are rich in choices and can basically meet the requirements of simple interface testing, none of the tools can be completely suitable for every project, because different projects have different methods of data processing and business logic processing, and the use of The tool needs to be familiar with the operation process and complete various necessary configurations, which is not flexible enough

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
  • Python-based interface automation test method
  • Python-based interface automation test method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0039] Such as figure 1 Shown is the test flow chart of the interface test performed by Robot Framework, which is currently the mainstream automated testing tool. The architecture is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD), with easy-to-use tables to organize test procedures and test data.

[0040] Its automated testing process is as follows: First, save the test case, interface address, and expected return value in constant form, because these three types of data must remain unchanged throughout the testing process. Then use its feature of supporting development system keywords to customize an interface keyword, which is a method or function, including building interface parameters, calling the interface, obtaining the interface return value, and converting the interface return value into JSON characters String four steps.

[0041] When building parameters, since the test case is also a part of the parameter, ...

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 a Python-based interface automation test method, comprising the steps of defining an interface template and a test case template, reading the test case, calling the interface to send a request, analyzing the interface return message and outputting a test report. The Python-based interface automation test method of the invention follows the basic principle of the test framework, separates the business logic from the test script, separates the test script from the test data, can be changed at any time according to requirements, and can greatly reduce the requirement on the coding level of the tester.

Description

technical field [0001] The invention relates to the technical field of automated testing, in particular to a Python-based interface automated testing method. Background technique [0002] Interface testing is a test for testing the interfaces between system components, and is mainly used to detect the interaction points between external systems and internal subsystems. The focus of the test is to check the exchange of data, the process of delivery and control management, and the mutual logical dependencies between the systems. Most of the current interfaces use the http protocol. The basic principle of the test is to simulate the client sending data to the server and get the corresponding response data, so as to judge whether the interface can perform data exchange normally. [0003] Manual test interface is also a way of testing. Manual test interface is for each test case, and the interface parameters need to be modified each time. After calling the interface, it is neces...

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/36
CPCG06F11/3684G06F11/3688
Inventor 王雪涵
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products