安装robotframework、robotframework-requests
pip install robotframework
pip install robotframework-requests
编写脚本httpbin.robot
*** Settings ***
Documentation Suite description
Library RequestsLibrary
*** Test Cases ***
Test title
&{headers}= create dictionary Content-Type=application/x-www-form-urlencoded
log ${headers}
create session httpbin https://httpbin.org headers=${headers}
&{data}= create dictionary a=1 b=2 c=3
${resp} post request httpbin /post data=${data}
log ${resp.status_code}
命令行运行
robot httpbin.robot