update run
This commit is contained in:
parent
25d36d9fa8
commit
a26768f5f4
6
run.py
6
run.py
|
@ -8,10 +8,8 @@ import click
|
|||
@click.command()
|
||||
@click.option('--mark', '-m', default='', help='传入被标记的case套件, 例: -m login')
|
||||
def run(mark):
|
||||
result_path = f'test_cases/{mark}/allure-results' if mark else 'results'
|
||||
report_path = f'test_cases/{mark}/allure-report' if mark else 'report'
|
||||
pytest.main(['test_cases', f'-m={mark}', '--clean-alluredir', f'--alluredir={result_path}'])
|
||||
os.system(f"allure generate -c -o {report_path}")
|
||||
pytest.main(['test_cases', f'-m={mark}', '--clean-alluredir', '--alluredir=allure-results'])
|
||||
os.system("allure generate -c -o allure-report")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in New Issue