|
@@ -1,32 +1,24 @@
|
|
from hytest import *
|
|
from hytest import *
|
|
from lib.linkapi import apilink
|
|
from lib.linkapi import apilink
|
|
|
|
+import csv
|
|
class c1:
|
|
class c1:
|
|
- #测试用例名称
|
|
|
|
- tags=['pc超级订阅购买页面能否正常打开']
|
|
|
|
#测试步骤
|
|
#测试步骤
|
|
- url1 = 'https://www.jianyu360.cn/swordfish/page_big_pc/free/svip/buy'
|
|
|
|
- url2 = 'https://wx.jianyu360.cn/jy_mobile/swordfish/newhistorypush'
|
|
|
|
-
|
|
|
|
- # ddt_cases = []
|
|
|
|
- # for i in range(10):
|
|
|
|
- # ddt_cases.append({
|
|
|
|
- # 'name': f'登录 UI_000{i+1}',
|
|
|
|
- # 'para': [None, f'{i+1}'*8,'请输入用户名']
|
|
|
|
- # })
|
|
|
|
-
|
|
|
|
- ddt_cases = [
|
|
|
|
- {
|
|
|
|
- 'name': 'pc超级订阅购买页面能否正常打开',
|
|
|
|
- 'para': url1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'name': '微信端推送历史记录页面能否正常打开',
|
|
|
|
- 'para': url2
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ tags=['pc超级订阅购买页面能否正常打开']
|
|
|
|
+ file_path = './urls.csv'
|
|
|
|
+ ddt_cases = []
|
|
|
|
+ with open(file_path,'r') as f:
|
|
|
|
+ reads=csv.reader(f)
|
|
|
|
+ for d in reads:
|
|
|
|
+ ddt_cases.append(
|
|
|
|
+ {
|
|
|
|
+ 'name': d[0],
|
|
|
|
+ 'para': d[1]
|
|
|
|
+ }
|
|
|
|
+ )
|
|
def teststeps(self):
|
|
def teststeps(self):
|
|
|
|
+ name=self.name
|
|
url=self.para
|
|
url=self.para
|
|
result = apilink.open_url_status(url)
|
|
result = apilink.open_url_status(url)
|
|
|
|
|
|
# 设置检查点
|
|
# 设置检查点
|
|
- CHECK_POINT('pc超级订阅购买页面能否正常打开', result)
|
|
|
|
|
|
+ CHECK_POINT(name, result)
|