读书人

施用Robot Framework集成HttpLibrary的

发布时间: 2013-08-26 12:17:40 作者: rapoo

使用Robot Framework集成HttpLibrary的自动化测试(一)
使用robotframework加入HttpLibrary进行自动化测试,参考了文章
http://cgmblog.sinaapp.com/html/240.html

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

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


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

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,那么就直接拿来使用。

读书人网 >.NET Framework

热点推荐