支持多个story参数(用逗号分隔)
This commit is contained in:
@@ -145,6 +145,12 @@ def run_tests(target, test_type='all', **kwargs):
|
||||
if not test_files:
|
||||
print("错误: 未找到测试文件")
|
||||
return 1
|
||||
if ',' in target:
|
||||
stories = [s.strip() for s in target.split(',')]
|
||||
print(f"多个story标签: {stories}")
|
||||
story_args = [f'--allure-stories={s}' for s in stories]
|
||||
args = test_files + story_args + base_args
|
||||
else:
|
||||
args = test_files + [f'--allure-stories={target}'] + base_args
|
||||
elif test_type == 'marker':
|
||||
print(f"按pytest标记运行: {target}")
|
||||
|
||||
Reference in New Issue
Block a user