自动化接口测试第10篇:接口清单整理:

37 阅读1分钟

🚀🚀🚀本篇主要内容

接口清单整理:

一、 接口清单(学院)示例:
一、查询
    1.1学院-查询所有
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/
    1.2学院-查询指定
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/T02/
        (注:1为学院ID;)
    1.3学院-List-$dep_id_list查询
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/?$dep_id_list=T01,T02,T03 
        (注:$dep_id_list:为参数名称;T01,T02,T03为:学院ID;)
    1.4学院-List-$master_name_list查询
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/?$master_name_list=Java-Master,Test-Master
        (注:$master_name_list:为参数名称;a,b,c为:院长名称;)
    1.5学院-List-$slogan_list查询
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/?$slogan_list=Here is Slogan
        (注:$slogan_list:为参数名称;a,b,c为:学院口号;)
    1.6学院-List-$dep_name

#### 二、接口清单(班级)示例:
  
  


```python
一、查询
    1.1班级-查询所有
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/T01/classes/
        (注:T01:为班级ID)
    1.2班级-查询指定
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/T01/classes/2017T01C02/
        (注:TO1:为班级ID;2017T01C02为班级ID;)
    1.3班级-List-$cls_id_list查询
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/T01/classes/?$cls_id_list=2017T01C03,2017T01C04
        (注:T01:为班级ID;$cls_id_list:为参数名称;2017T01C03,2017T01C04为:班级ID;)
    1.4班级-List-$master_name_list查询
        请求方法:GET
        请求地址:http://127.0.0.1:8000/api/departments/T02/classes/?$master_name_list=Master15,Master16
        (注:T02:为班级ID;$master_name_list:为参数名称;Master15,Master16为:班主任名称;)
    1.5班级-List-$cls_name_list查询
        请求方法:GET