Arthur-Wu committed this file on 2024-11-27

This commit is contained in:
ieemoo 2024-11-27 13:09:37 +08:00
parent 142ecd85f0
commit 0d74d0787b
7 changed files with 90 additions and 84 deletions

View File

@ -38,19 +38,19 @@ SaleGoods:
# 8-促销白名单商品
PromotionalWhitelistGoods:
GoodsInputcode: 6954865921564
GoodsName:
GoodsName: 优颂一次性纸浆碗500mL
# 9-重量放通白名单商品
WeightToWhitelistGoods:
GoodsInputcode: 230148601000020005
GoodsName:
GoodsName: 香菇(折价)
# 10-散称计重商品
MisspellingWeightGoods:
GoodsInputcode: 2327912000002
GoodsName:
GoodsName: 手剥山核桃手抓包
# 11-计件商品
PieceRateGoods:
GoodsInputcode: 231172900650010005
GoodsName:
GoodsName: 当前伪散称商品条码售价与系统单价不一致,请检查条码价格是否正确!

View File

@ -21,7 +21,7 @@ class Test_CAnon017(unittest.TestCase):
allure.dynamic.description(f"描述:{data['MarketName']}-{DescName}\n")
ymc = YMClientApi(data["ShoppingCartMac"])
bulk_goods = data["MisspellingWeightGoods"]["GoodsInputcode"]
if bulk_goods is not None:
allure.step("步骤1session开始")
ymc.session_start()
allure.step("步骤2匿名登录")
@ -38,6 +38,8 @@ class Test_CAnon017(unittest.TestCase):
ymc.request_order_settlement(LoginData)
else:
pytest.fail(f"---商品 {data["MisspellingWeightGoods"]} 不存在")
else:
pytest.skip(f"---{data['MarketName']} 计重商品未提供,跳过该场景测试")
if __name__ == '__main__':

View File

@ -22,7 +22,7 @@ class Test_CAnon018(unittest.TestCase):
allure.dynamic.description(f"描述:{data['MarketName']}-{DescName}\n")
ymc = YMClientApi(data["ShoppingCartMac"])
bulk_goods = data["MisspellingWeightGoods"]["GoodsInputcode"]
if bulk_goods is not None:
allure.step("步骤1session开始")
ymc.session_start()
allure.step("步骤2匿名登录")
@ -44,8 +44,9 @@ class Test_CAnon018(unittest.TestCase):
allure.step("步骤7请求订单结算")
ymc.request_order_settlement(LoginData)
else:
LOGGER.info(f"---商品 {data["MisspellingWeightGoods"]} 不存在")
pytest.fail(f"---商品 {data["MisspellingWeightGoods"]} 不存在")
else:
pytest.skip(f"---{data['MarketName']} 计重商品未提供,跳过该场景测试")
if __name__ == '__main__':

View File

@ -32,7 +32,6 @@ class Test_CNoLogin001(unittest.TestCase):
for adId in adIdList:
ymc.query_ad_detail(str(adId))
else:
LOGGER.info(f"---该商超未配置广告---\n")
pytest.fail(f"---该商超未配置广告---\n")
if __name__ == '__main__':

View File

@ -23,7 +23,7 @@ class Test_CVip017(unittest.TestCase):
ymc = YMClientApi(data["ShoppingCartMac"])
vip_phone_num = data["VIPPhoneNumber"]
bulk_goods = data["MisspellingWeightGoods"]["GoodsInputcode"]
if bulk_goods is not None:
allure.step("步骤1session开始")
ymc.session_start()
allure.step("步骤2匿名登录")
@ -45,6 +45,8 @@ class Test_CVip017(unittest.TestCase):
ymc.request_order_settlement(LoginData)
else:
pytest.fail(f"---商品 {bulk_goods} 不存在")
else:
pytest.skip(f"---{data['MarketName']} 计重商品未提供,跳过该场景测试")
if __name__ == '__main__':

View File

@ -23,7 +23,7 @@ class Test_CVip018(unittest.TestCase):
ymc = YMClientApi(data["ShoppingCartMac"])
vip_phone_num = data["VIPPhoneNumber"]
bulk_goods = data["MisspellingWeightGoods"]["GoodsInputcode"]
if bulk_goods is not None:
allure.step("步骤1session开始")
ymc.session_start()
allure.step("步骤2匿名登录")
@ -50,6 +50,8 @@ class Test_CVip018(unittest.TestCase):
ymc.request_order_settlement(LoginData)
else:
pytest.fail(f"---商品 {bulk_goods} 不存在")
else:
pytest.skip(f"---{data['MarketName']} 计重商品未提供,跳过该场景测试")
if __name__ == '__main__':

View File

@ -12,4 +12,4 @@ ReportsURL: http://192.168.1.165
# 4-联测测试的商超列表: WuShang\ZhongBai\YongHui\JiajiaYue
MarketsArray:
- WuShang
- ZhongBai