auto_test_dev/MAIN_YM.py

66 lines
1.8 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# !/usr/bin/python
# -*- coding: utf-8 -*-
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
import threading
import time
# # 要并发执行的任务函数
# def task(thread_name, delay):
# print(f"Thread {thread_name} starting")
# time.sleep(delay)
# print(f"Thread {thread_name} finished")
#
#
# # 主程序
# def main():
# # 创建线程列表
# threads = []
# # 创建线程并启动
# for i in range(3):
# t = threading.Thread(target=task, args=("Thread-{}".format(i), i))
# threads.append(t)
# t.start()
#
# # 等待所有线程完成
# for t in threads:
# t.join()
#
#
# if __name__ == "__main__":
# main()
''' 加购重量待核验商品
1、修改商品信息将重量全改为0制造成加购时重量待核验物品
https://api.test.yimaogo.com/admin/goods/8690
{
"id": 8690,
"barcode": "6925303796426",
"name": "统一茄皇蕃茄牛肉面",
"goodsBrand": "统一",
"measureProperty": 0,
"standardWeight": 0, # 165
"minWeight": 0, # 155
"maxWeight": 0, # 175
"weightSource": 1,
"pic": "https://ieemoo-storage.obs.cn-east-3.myhuaweicloud.com/lhpic/6925303796426.jpg"
}
'''
def print_hi(name):
from commons.EngineX import Engine, NotificationModule
# Use a breakpoint in the code line below to debug your script.
print(f'--- Hi, {name} ---\n') # Press Ctrl+F8 to toggle the breakpoint.
print(f"=== Start of Test Suite ===")
return_list = Engine().run_test_suite()
NotificationModule().send_msg(return_list)
print(f"=== End of Test Suite ===")
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
print_hi("YiMao Autotest")