测试接口文档流程

安装jmeter windows批处理jmeter启动(双击)

0ade6d8734b7c826099e7bbece40e9c

获取token

appKey = 6773dfd985c249a69916445137fb46c8

appSecret = 151a36625370491e9e6ee2721a2fc664

jmeter工具弃用,改为使用postman工具::::::

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

快速查看本机公网IP地址

真香IT

于 2022-04-27 11:15:28 发布

11257

收藏 5

分类专栏: 电脑实用技巧 文章标签: 公网IP

版权

电脑实用技巧

快速查看本机公网IP地址

1. 一键跳转

2. 公网IP用途

1. 一键跳转

点击查看公网IP地址

https://www.ip138.com/

2. 公网IP用途

例如, 在你使用云产品(云主机,云数据库等),为了保证连接的安全性,需要设置连接白名单,这个时候就需要填写你的公网IP,注意这个公网IP 不是用命令行的ipconfig查询出来的!

50d593c1ea7804dbb2dda7430a84058a_45873

查公网IP,直接百度IP,查看本机的公网IP

在nignx加上bss白名单:

bss_acl.conf配置文件加白

6773dfd985c249a69916445137fb46c8

151a36625370491e9e6ee2721a2fc664

1686723918138

6773dfd985c249a69916445137fb46c8151a36625370491e9e6ee2721a2fc6641686723918138

MD5:248de7878d765babf48238c86e230d44

A.测试认证接口

返回请求:回复以下内容:::

<Response>

<Datetime>2023-06-14T14:29:46.593+08:00</Datetime>

<Authorization>

<Token>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJmbG93LXBsYXRmb3JtIiwiYXVkIjoie1wiYXBwS2V5XCI6XCI2NzczZGZkOTg1YzI0OWE2OTkxNjQ0NTEzN2ZiNDZjOFwiLFwiZWFJZFwiOlwiMTZcIixcInVzZXJDaGFubmVsSWRcIjpcIjExMTExMTExMTExMTExMTExMTFcIixcInVzZXJJZFwiOlwiMTJcIixcInVzZXJWZXJpZnlMZXZlbFwiOjF9IiwiZXhwIjoxNjg2NzI1OTg2fQ.prekfg4g-YQtmz5o-b3FSlRkuBqOmlgbov0JIgVSixbjx1kk-V4OR91WBPq34QG_c3oT-zDWh-C8Z238umvsJw</Token>

<ExpiredTime>2023-06-14T14:59:46.593+08:00</ExpiredTime>

<CreatedTime>2023-06-14T14:29:46.593+08:00</CreatedTime>

</Authorization>

</Response>

B.测试套餐升档营销活动查询接口

4.7.8套餐升档营销活动查询接口

一下是body的内容(正文)

<?xml version="1.0" encoding="utf-8" ?>

<Request>

<Datetime>1686723918138</Datetime>

<Content>

<mobile>13776543087</mobile>

<boothId>2</boothId>

</Content>

</Request>

b、header将认证接口中的签名、token放入消息头header中

4GGOGO-Auth-Token 对应填token

HTTP-X-4GGOGO-Signature 对应填sign

Content-Type 填application/xml

返回内容:

<Response>

<Datetime>2023-06-14T14:50:45.823+08:00</Datetime>

<Content>

<retCode>0000</retCode>

<retMsg>请求成功</retMsg>

<mobile>13776543087</mobile>

<actionInfo>

<actionId>100000447410</actionId>

<internetId>30yuan20g</internetId>

<startTime>20210329</startTime>

<endTime>20230831</endTime>

<priority>4</priority>

</actionInfo>

</Content>

</Response>

  1. 预校验接口

<?xml version="1.0" encoding="utf-8" ?>

<Request>

<Datetime>1686723918138</Datetime>

<Content>

<mobile>13900101588</mobile>

<goodCode>4108</goodCode>

</Content>

</Request>

查看日志显示

[http-nio-8009-exec-78] 2023-06-14 15:40:07.378 [INFO ] com.cmcc.bss.api.controller.PackageUpPreCheckController.retrieveReq(PackageUpPreCheckController.java:322) - 收到套餐升订单档前置校验请求报文<?xml version="1.0" encoding="utf-8" ?>

<Request>

<Datetime>1686728055640</Datetime>

<Content>

<mobile>13900101588</mobile>

<goodCode>4108</goodCode>

</Content>

</Request>

[http-nio-8009-exec-78] 2023-06-14 15:40:07.378 [ERROR] com.cmcc.bss.api.controller.PackageUpPreCheckController.packageUpPreCheck(PackageUpPreCheckController.java:130) - 能力id不匹配-16

遇到的坑:

是phone

<Response>

<Datetime>2023-06-14T17:11:31.735+08:00</Datetime>

<Content>

<retCode>0</retCode>

<retMsg>商品订购校验成功</retMsg>

</Content>

</Response>

剩下的都是带条件的测试:

在能力运营管理-运营参数配置,找到套餐升档月底办理限制天数,点击修改就行

月底几天内不办理,不通过(预先设置最后19天内)

原始值:

已修改为19

然后进行条件测试

办理接口

https://bss.cmccheli.com:8443/bss/packageup/create.html

body

<?xml version="1.0" encoding="utf-8" ?>

<Request>

    <Datetime>1686797323575</Datetime>

    <Content>

        <mobile>13776543087</mobile>

        <commodityCode>4108</commodityCode>

        <region>南京</region>

        <bookingId>abc6543211234567890</bookingId>

        <authchktype></authchktype>

        </Content>

    </Request>

返回

<Response>

<Datetime>2023-06-15T10:51:33.648+08:00</Datetime>

<Content>

<retCode>-26</retCode>

<retMsg>月底限制办理套餐升档商品</retMsg>

</Content>

</Response>

posted @ 2023-06-19 08:59  往事已成昨天  阅读(50)  评论(0编辑  收藏  举报