Эх сурвалжийг харах

APP新用户留资,定制化报告(超前项目,行为统计)

jialuyao 9 сар өмнө
parent
commit
b6944b7a59

+ 16 - 0
cases/app/登录/留资/new_uer_sales.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '获取新用户留资报表'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.new_uer_sales()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)

+ 16 - 0
cases/pc/登录功能/定制化分析报告/behavior_acquisition.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '行为采集'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.behavior_acquisition()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常',  actural == 0 )

+ 16 - 0
cases/pc/登录功能/定制化分析报告/reports_advanced_projects.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '定制化分析报告_超前项目'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.reports_advanced_projects()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)

+ 16 - 0
lib/webapi.py

@@ -882,6 +882,22 @@ class APIMgr():
         headers = GSTORE['headers']
         response = self.s.post(f"{cfg.target_host}/publicapply/customer/attention", headers=headers, json={"name":"石嘴山市交通工程建设管理中心","mold":1,"D":True})
         return response
+    #app登录后获取新用户留资报表
+    def new_uer_sales(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host_app}/salesLeads/appIsNewUerSales", headers=headers, json={})
+        return response
+    #定制化分析报告_超前项目
+    def reports_advanced_projects(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/leadGeneration/getDate", headers=headers, json={})
+        return response
+    #行为采集
+    def behavior_acquisition(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/leadGeneration/clickRecord", headers=headers, json={"type":"B"})
+        return response
+
 apimgr = APIMgr()