Browse Source

卢汉新增用例

luhan 7 months ago
parent
commit
abd02a592f

+ 4 - 7
test_case/qccq/test_allAPI2.py → test_case/qccq/test_allAPI.py

@@ -21,24 +21,21 @@ def creat_case(yaml_path):
 
 
 @allure.epic("青春重庆")
-@allure.feature("青春重庆APP")
+@allure.feature("用户管理模块")
 class TestAPI:
     pass
 
-# data=[]
+
 # for yaml_path in path:
 #     yaml_name = yaml_path.name[:-5]
-#     print(yaml_path)
-#     data.append(yaml_path)
 #     setattr(TestAPI, yaml_name, creat_case(yaml_path))
 
 
 
-
-data=[]
+data = []
 for yaml_path in path:
     data.append(yaml_path)
 data.sort()
 for yaml_path in data:
-    yaml_name=yaml_path.name[:-5]
+    yaml_name = yaml_path.name[:-5]
     setattr(TestAPI, yaml_name, creat_case(yaml_path))

+ 0 - 0
test_case/jiangwei_demo/__init__.py → test_case/qccq/青年热点2/__init__.py


+ 14 - 0
test_case/qccq/青年热点2/test_109_青年热点-列表.yaml

@@ -0,0 +1,14 @@
+  -
+    name: 青年热点-列表
+    request:
+      method: post
+      url: /api/service-app-second/AppYouthHotController/pageYouthHot
+      json:
+        pageNo: 1
+        pageSize: 10
+        query:
+          keyWord: ''
+    extract:
+      rdid: $.data.result[0].contentManageId
+    validate:
+      - contains: true

+ 9 - 0
test_case/qccq/青年热点2/test_110_青年热点-详情.yaml

@@ -0,0 +1,9 @@
+  -
+    name: 青年热点-详情
+    request:
+      method: post
+      url: /api/service-app-second/AppYouthHotController/getYouthHotDetail?contentManageId=${read_yaml(rdid)}
+      headers:
+        Token: ${read_yaml(token)}
+    validate:
+      - contains: true

+ 10 - 0
test_case/qccq/青年热点2/test_111_青年热点-视频.yaml

@@ -0,0 +1,10 @@
+-
+    name: 青年热点-视频
+    request:
+      method: post
+      url: /api/service-obs/VideoController/playAddress
+      json:
+        fileId: "1abd061df94ff73e53b871480fb3bfa1"
+        serverType: 1
+    validate:
+      - contains: true

+ 11 - 1
test_case/test_allAPI.py

@@ -26,6 +26,16 @@ class TestAPI:
     pass
 
 
+# for yaml_path in path:
+#     yaml_name = yaml_path.name[:-5]
+#     setattr(TestAPI, yaml_name, creat_case(yaml_path))
+
+
+
+data = []
 for yaml_path in path:
+    data.append(yaml_path)
+data.sort()
+for yaml_path in data:
     yaml_name = yaml_path.name[:-5]
-    setattr(TestAPI, yaml_name, creat_case(yaml_path))
+    setattr(TestAPI, yaml_name, creat_case(yaml_path))