Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复用例前置失败导致无法找到用例执行问题,修复远程执行slaves被重置为空问题 #118

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,8 @@ def pytest_runtest_makereport(item, call):
else:
allure.dynamic.tag(mark.name)
if report.outcome == "failed":
write_case_result(item, report)
if write_json(item.session):
write_case_result(item, report)
if report.when == "call":
logger.info(f"运行结果: {str(report.outcome).upper()}")
if write_json(item.session):
Expand Down
7 changes: 4 additions & 3 deletions src/rtk/local_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,13 @@ def __init__(
else None,
Args.pms_info_file.value: pms_info_file,
Args.autostart.value: autostart or GlobalConfig.AUTOSTART,
Args.slaves.value: slaves or GlobalConfig.SLAVES,
}
self.lastfailed = lastfailed
self.project_name = project_name
self.build_location = build_location
self.line = line
self.slaves = slaves
# self.slaves = slaves
self.collection_only = collection_only
self.export_csv_file = export_csv_file or GlobalConfig.EXPORT_CSV_FILE

Expand Down Expand Up @@ -271,8 +272,8 @@ def create_pytest_cmd(self, app_dir, default=None, proj_path=None):
cmd.extend(["--repeat", default.get(Args.repeat.value)])
if self.line:
cmd.extend(["--line", self.line])
if self.slaves:
cmd.extend(["--slaves", self.slaves])
if default.get(Args.slaves.value):
cmd.extend(["--slaves", default.get(Args.slaves.value)])

report_formats = default.get(Args.report_formats.value)
if report_formats:
Expand Down
Loading