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格式测试报告

java接口自动化测试小dome

 

相关文章:

  • 2021-10-05
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-11-25
猜你喜欢
  • 2022-02-14
  • 2021-10-05
  • 2022-01-03
  • 2021-05-08
  • 2021-10-27
相关资源
相似解决方案