机器人框架httpd模拟器
robotframework-httpd的Python项目详细描述
用于httpd模拟器的robot框架关键字库。
此模块允许轻松创建http服务器并测试接收到http服务器的请求
安装
pip install robotframework-httpd
用法
HTTPDLibrary keyword documentation
*** Settings ***LibraryHTTPDLibraryport=5060LibraryRequestsLibraryLibraryCollections*** Test Cases ***Test HttpdLibrary GETGet Request/test?param1=p1Run HttpdCreate SessionHttpdhttp://localhost:5060 ${resp}= GetHttpd/test?param1=p1wait to get requestTest HttpdLibrary PostPost Requestthis is bodyRun HttpdCreate SessionHttpdhttp://localhost:5060 ${resp}= PostHttpd/data=this is bodywait to get request*** Keywords ***Get Request [Arguments] ${path} ${request}= create dictionarymethodGETpath ${path} set wished request ${request} Post Request [Arguments] ${post_body} ${request}= create dictionarymethodPOSTpost_body ${post_body} set wished request ${request}
贡献
如果你喜欢这个模块,请贡献!我欢迎修补程序, 文档、问题、想法等。