使用Robot Framework集成HttpLibrary的自动化测试(一)

使用robotframework加入HttpLibrary进行自动化测试,参考了文章
[url]http://cgmblog.sinaapp.com/html/240.html[/url]

HttpLibrary.HTTP的API如下:[url]http://peritus.github.io/robotframework-httplibrary/HttpLibrary.html#Follow Response[/url]

官方地址如下:
[url]https://github.com/peritus/robotframework-httplibrary/[/url]


本人测试的其中一个步骤如下

Step3
Comment Start Step3
Create Http Context host=xx.xx.xx.xxx:9000 scheme=http
Get /xx/xxx/xxxx
${RESPONSE_STATUS}= Get Response Status
Should Start With ${RESPONSE_STATUS} 200
Comment End Step3


向某IP和端口是9000发送一个请求,然后查看返回的状态,如果返回的状态有302,出现了重定向,请用Follow Response这个API继续,如果是200,那么就直接拿来使用。

你可能感兴趣的:(WEB端自动化测试)