forked from p15670423/monkey
Added an option to skip performance during blackbox tests
This commit is contained in:
parent
c67ed63cc9
commit
9a169629bf
|
@ -21,6 +21,12 @@ def pytest_addoption(parser):
|
|||
help="If enabled performance tests won't reset island and won't send telemetries, "
|
||||
"instead will just test performance of already present island state.",
|
||||
)
|
||||
parser.addoption(
|
||||
"--no-performance-tests",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="If enabled all performance tests will be skipped.",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
@ -36,3 +42,10 @@ def no_gcp(request):
|
|||
@pytest.fixture(scope="session")
|
||||
def quick_performance_tests(request):
|
||||
return request.config.getoption("--quick-performance-tests")
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
if "no_performance_tests" in item.keywords and item.config.getoption("--no-performance-tests"):
|
||||
pytest.skip(
|
||||
"Skipping performance test because " "--no-performance-tests flag is specified."
|
||||
)
|
||||
|
|
|
@ -254,12 +254,15 @@ class TestMonkeyBlackbox:
|
|||
LOGGER.error("This test doesn't support 'quick_performance_tests' option.")
|
||||
assert False
|
||||
|
||||
@pytest.mark.no_performance_tests
|
||||
def test_report_generation_from_fake_telemetries(self, island_client, quick_performance_tests):
|
||||
ReportGenerationFromTelemetryTest(island_client, quick_performance_tests).run()
|
||||
|
||||
@pytest.mark.no_performance_tests
|
||||
def test_map_generation_from_fake_telemetries(self, island_client, quick_performance_tests):
|
||||
MapGenerationFromTelemetryTest(island_client, quick_performance_tests).run()
|
||||
|
||||
@pytest.mark.no_performance_tests
|
||||
def test_telem_performance(self, island_client, quick_performance_tests):
|
||||
TelemetryPerformanceTest(
|
||||
island_client, quick_performance_tests
|
||||
|
|
Loading…
Reference in New Issue