소스 검색

Merge branch 'feature/v1.0.0' of https://jygit.jydev.jianyu360.cn/Test/jianyu_auto_api into feature/v1.0.0

liumiaomiao 1 년 전
부모
커밋
7c0d49447a

+ 1 - 1
cases/pc/登录功能/搜索功能/buyersearch.py

@@ -11,7 +11,7 @@ class c5:
     def teststeps(self):
         INFO('测试步骤')
         STEP(1,'第一步调用函数')    #会出现在测试报告中
-        r = apimgr.buyersousuo("万达信息股份有限公司")
+        r = apimgr.buyer_search("万达信息股份有限公司")
         response_data = json.loads(r.text)
         error_code = response_data["error_code"]
         STEP(2, '第二步设置检查点')

+ 2 - 1
cases/pc/登录功能/订阅/bigmember_push.py

@@ -10,6 +10,7 @@ class c1:
         r = apimgr.bigmember_push()
         res = r.json()
         actural  = res['error_code']
+        actural1 = res['data']
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查大会员推送记录列表是否正常',actural ==0)
+        CHECK_POINT('检查大会员推送记录列表是否正常',actural ==0 and actural1 !=0)

+ 2 - 1
cases/pc/登录功能/订阅/entniche_push.py

@@ -10,6 +10,7 @@ class c1:
         r = apimgr.entniche_push()
         res = r.json()
         actural  = res['error_code']
+        actural1 = res['data']
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查商机管理推送记录列表是否正常',actural ==0 )
+        CHECK_POINT('检查商机管理推送记录列表是否正常',actural ==0 and actural1 !=0)

+ 15 - 0
cases/登录功能/订阅搜索/bigmember_subscription_search.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='大会员订阅搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.bigmember_subscription_search()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查大会员订阅搜索是否正常',actural ==0)

+ 15 - 0
cases/登录功能/订阅搜索/entname_subscription_search.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理订阅搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.bigmember_subscription_search()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理订阅搜索是否正常',actural ==0)

+ 16 - 0
cases/登录功能/订阅搜索/free_subscription_search.py

@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='免费订阅搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.free_subscription_search()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查免费订阅搜索是否正常',actural ==0)

+ 16 - 0
cases/登录功能/订阅搜索/svip_subscription_search.py

@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='超级订阅订阅搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.svip_subscription_search()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查超级订阅订阅搜索是否正常',actural ==0 )

+ 150 - 0
lib/webapi.py

@@ -576,6 +576,156 @@ class APIMgr():
         params = {"match":"科技"}
         response =s.post(f"{cfg.target_host}/front/project/nzj/search",headers=headers, params=params)
         return response
+
+    """大会员推送记录列表"""
+    def bigmember_push(self):
+       headers = GSTORE['headers']
+       response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/mType/list", headers=headers, json=
+       {
+        "pageNum": 1,
+        "pageSize": 50,
+        "format": "table",
+        "area": "",
+        "selectTime": "all",
+        "city": "",
+        "buyerClass": "",
+        "subtype": "",
+        "industry": "",
+        "keyWords": "",
+        "fileExists": "",
+        "price": "",
+        "source": "",
+        "exportNum": "",
+        "district": "",
+        "isRead": "",
+        "vt": "m"
+        })
+       return response
+
+    """商机管理推送记录"""
+    def  entniche_push(self):
+       headers = GSTORE['headers']
+       response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/eType/list", headers=headers, json=
+       {
+        "pageNum": 1,
+        "pageSize": 50,
+        "format": "table",
+        "area": "",
+        "selectTime": "all",
+        "city": "",
+        "buyerClass": "",
+        "subtype": "",
+        "industry": "",
+        "keyWords": "",
+        "fileExists": "",
+        "price": "",
+        "source": "",
+        "exportNum": "",
+        "district": "",
+        "isRead": "",
+        "vt": "s"
+        })
+       return response
+
+    """订阅搜索"""
+    #免费用户订阅搜索
+    def free_subscription_search(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/fType/list", headers=headers, json=
+        {
+            "pageNum": 1,
+            "pageSize": 50,
+            "format": "table",
+            "area": "",
+            "selectTime": "1718534447_1721126447",
+            "city": "",
+            "buyerClass": "",
+            "subtype": "",
+            "industry": "",
+            "keyWords": "",
+            "fileExists": "",
+            "price": "",
+            "source": "",
+            "exportNum": "",
+            "district": "",
+            "isRead": "",
+            "vt": ""
+        })
+        return response
+
+    #超级订阅用户订阅搜索
+    def svip_subscription_search(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/list", headers=headers, json=
+        {
+            "pageNum": 1,
+            "pageSize": 50,
+            "format": "table",
+            "area": "安徽",
+            "selectTime": "1675094400_1719763199",
+            "city": "",
+            "buyerClass": "传媒,采矿业,电信行业,金融业,建筑业,能源化工,农林牧渔,批发零售,信息技术,运输物流,制造业,住宿餐饮",
+            "subtype": "招标公告,招标,邀标,询价,竞谈,单一,竞价,变更",
+            "industry": "",
+            "keyWords": "计算机",
+            "fileExists": "",
+            "price": "",
+            "source": "",
+            "exportNum": "",
+            "district": "",
+            "isRead": "",
+            "vt": "v"
+        })
+        return response
+
+    #大会员用户订阅搜索
+    def bigmember_subscription_search(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/mType/list", headers=headers, json=
+        {
+            "pageNum": 1,
+            "pageSize": 50,
+            "format": "table",
+            "area": "安徽,北京,甘肃",
+            "selectTime": "1672502400_1719763199",
+            "city": "",
+            "buyerClass": "人大,政协,党委办,组织,宣传,统战,纪委,政府办,发改,财政,教育,科技,工信,民政,民宗,人社,公安,检察院,法院,司法,应急管理,军队,自然资源,生态环境,住建,市政,城管,交通,水利,农业,气象,文旅,卫健委,医疗,学校,档案,体育,政务中心,机关事务,国资委,海关,税务,市场监管,商务,人行,银保监,证监,审计,出版广电,统计,公共资源交易,社会团体",
+            "subtype": "招标预告,预告,预审,预审结果,论证意见,需求公示,招标结果,中标,成交,废标,流标",
+            "industry": "",
+            "keyWords": "信息,科技,能源",
+            "fileExists": "",
+            "price": "",
+            "source": "",
+            "exportNum": "",
+            "isRead": "1",
+            "vt": "m"
+        })
+        return response
+
+    #商机管理订阅搜索
+    def entname_subscription_search(self):
+        headers = GSTORE['headers']
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/eType/list", headers=headers, json=
+        {
+            "pageNum": 1,
+            "pageSize": 50,
+            "format": "table",
+            "area": "安徽,重庆,河南,江苏",
+            "selectTime": "1672502400_1719763199",
+            "city": "",
+            "buyerClass": "",
+            "subtype": "招标公告,招标,邀标,询价,竞谈,单一,竞价,变更,招标结果,中标,成交,废标,流标",
+            "industry": "农林牧渔_生产物资,农林牧渔_生产设备,农林牧渔_相关服务",
+            "keyWords": "农业,园林,森林",
+            "fileExists": "",
+            "price": "",
+            "source": "1",
+            "exportNum": "",
+            "isRead": "",
+            "vt": "s"
+        })
+        return response
+
 apimgr = APIMgr()