Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to write Interface Test document with python

Shulou Source: shulou.com Published: 2022-05-31 10:44:32 09月23日 Update

This article introduces the relevant knowledge of "how to write interface test documents with python". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Conversion of postman interface use cases to python test cases

Open postman, click the icon on the right, the script will be displayed on the right side of the page, and the exported language will be modified at the top. Here I use Python-Reqyests.

Copy the script and open it in PyCharm. If there is no reuqests library before import, there may be an error. We need to install the reuqests library.

Cmd command window input: pip install requests

The exported script format is as follows:

Import requestsurl = "

Tags: Interfaces tests parameters addresses types methods results scripts routing encapsulation documents content more knowledge differences practicality consistency learning and then functions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Technology Apple OPPO Reno Shulou Information