chore: introduce flaky mark

A “flaky” test is a test that usually pass but sometimes it fails.
If a flaky test pass it will be reported normally as test succeed. If the test fails, instead of being reported as failure it will be reported as a xfail.
This commit is contained in:
Anastasiya Semenkevich 2023-12-14 09:13:22 +03:00 committed by Anastasiya
parent f5f7734769
commit 467f65ac1a
4 changed files with 8 additions and 1 deletions

View File

@ -155,6 +155,7 @@ pipeline {
]) {
sh """
python3 -m pytest ${flags.join(" ")} \
--ignore-flaky \
--disable-warnings \
--alluredir=./allure-results
"""

View File

@ -9,3 +9,4 @@ allure-pytest==2.13.2
testrail-api==1.12.0
pyperclip==1.8.2
pytest-rerunfailures==11.1.2
pytest-ignore-flaky==2.1.0

View File

@ -16,6 +16,8 @@ pytestmark = marks
@pytest.mark.parametrize('user_data_one, user_data_two', [
(configs.testpath.TEST_USER_DATA / 'user_account_one', configs.testpath.TEST_USER_DATA / 'user_account_two')
])
@pytest.mark.flaky
# reason='https://github.com/status-im/desktop-qa-automation/issues/346'
def test_messaging_settings_accepting_request(multiple_instance, user_data_one, user_data_two):
user_one: UserAccount = constants.user_account_one
user_two: UserAccount = constants.user_account_two

View File

@ -6,8 +6,12 @@ from gui.main_window import MainWindow
from . import marks
pytestmark = marks
@allure.testcase('https://ethstatus.testrail.net/index.php?/cases/view/703010', 'Settings - Sign out & Quit')
@pytest.mark.case(703010)
@pytest.mark.flaky
# reason='https://github.com/status-im/status-desktop/issues/13013'
def test_sign_out_and_quit(aut, main_screen: MainWindow):
with step('Open settings'):
settings = main_screen.left_panel.open_settings()
@ -18,4 +22,3 @@ def test_sign_out_and_quit(aut, main_screen: MainWindow):
with step('Check that app was closed'):
psutil.Process(aut.pid).wait(timeout=10)