加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java接口自动化测试小dome

发布时间:2020-12-15 05:28:15 所属栏目:Java 来源:网络整理
导读:? GitHub地址:https://github.com/leonInShanghai/InterfaceAutomation 这个dome 请求?https://www.v2ex.com/api/nodes/show.json?name=python 接口 ? 使用OK HTTP框架网络请求 使用fastjson框架解析数据 ? ? { ??? ?"avatar_large":?"//cdn.v2ex.com/navat

?

GitHub地址:https://github.com/leonInShanghai/InterfaceAutomation

这个dome 请求?https://www.v2ex.com/api/nodes/show.json?name=python 接口

?

  使用OK HTTP框架网络请求

  使用fastjson框架解析数据

?

?  {
???    ?"avatar_large":?"//cdn.v2ex.com/navatar/8613/985e/90_large.png?m=1564378564",
?    ???"name":?"python",
??    ??"avatar_normal":?"//cdn.v2ex.com/navatar/8613/985e/90_normal.png?m=1564378564",
??    ??"title":?"Python",
??    ??"url":?"https://www.v2ex.com/go/python",
??    ??"topics":?11896,
?    ???"footer":?"",
?    ???"header":?"这里讨论各种?Python?语言编程话题,也包括?Django,Tornado?等框架的讨论。这里是一个能够帮助你解决实际问题的地方。",
?    ???"title_alternative":?"Python",
??    ??"avatar_mini":?"//cdn.v2ex.com/navatar/8613/985e/90_mini.png?m=1564378564",
??    ??"stars":?8248,
?    ???"root":?false,
?    ???"id":?90,
?    ???"parent_node_name":?"programming"
  }?

?

  对请求回来的参数做断言?assertEquals(v2exNode.getName(),nodeName);

?

?

?最后生成html格式测试报告

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读