[test.py] Add uniqueness to the test name

In CI test always executed with option --repeat=3 that leads to generate 3 test results with the same name. Junit plugin in CI cannot distinguish correctly the difference between these results. In case when we have two passes and one fail, the link to test result will sometimes be redirected to the incorrect one because the test name is the same.
To fix this ReportPlugin added that will be responsible to modify the test case name during junit report generation adding to the test name mode and run id.

Fixes: https://github.com/scylladb/scylladb/issues/17851

Fixes: https://github.com/scylladb/scylladb/issues/15973
This commit is contained in:
Andrei Chekun
2024-06-11 14:58:03 +02:00
parent 93b9b85c12
commit 8d1d206aff
9 changed files with 73 additions and 6 deletions

View File

@@ -21,10 +21,6 @@ def pytest_addoption(parser):
parser.addoption('--manager-api', action='store', required=True,
help='Manager unix socket path')
parser.addoption('--mode', action='store', required=True,
help='Scylla build mode. Tests can use it to adjust their behavior.')
parser.addoption('--run_id', action='store', default=None,
help='Run id for the test run')
parser.addoption('--tmpdir', action='store', type=str, dest='tmpdir',
help='Temporary directory where logs are stored')
parser.addoption("--artifacts_dir_url", action='store', type=str, default=None, dest="artifacts_dir_url",