博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
RobotFramework-接口测试-SSL双向验证证书配置
阅读量:4168 次
发布时间:2019-05-26

本文共 765 字,大约阅读时间需要 2 分钟。

1、导入RequestsLibrary

2、使用Create Client Cert Session关键字

Arguments:

[ alias | url | headers={} | cookies={} | client_certs=None | timeout=None | proxies=None | verify=False | debug=0 | max_retries=3 | backoff_factor=0.1 | disable_warnings=0 | retry_status_list=[] | retry_method_list=['GET', 'HEAD', 'OPTIONS', 'DELETE', 'TRACE', 'PUT'] ]

client_certs ['client certificate', 'client key'] PEM files containing the client key and certificate    

client_certs参数要设置为list(使用关键字Create List)     client_certs=@{

client certs}

client certificate  是 D:\\key\\client.crt  

client key  是 D:\\key\\client.pem

verify Whether the SSL cert will be verified. A CA_BUNDLE path can also be provided. Defaults to False.

varify 参数 设置为 D:\\key\\root.crt

3、使用POST On Session关键字发送请求

    请求数据用 json=${data}

转载地址:http://jlgxi.baihongyu.com/

你可能感兴趣的文章
2018.5.54
查看>>
2018.5.55
查看>>
2018.5.58
查看>>
2018.12.5
查看>>
2018.12.6
查看>>
人智导(四):约束满足问题
查看>>
2018.12.7
查看>>
2018.12.8
查看>>
2018.12.9
查看>>
2018.12.29
查看>>
2018.12.31
查看>>
2019.1.2
查看>>
2019.1.4
查看>>
2019.1.9
查看>>
2019.1.12
查看>>
Java语言程序设计与数据结构》编程练习答案(第二十章)(二)
查看>>
2019.2.25
查看>>
2019.2.26
查看>>
2019.2.27
查看>>
2019.2.28
查看>>