Skip to content

Commit

Permalink
chatbot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antdanchenko authored and Serhy committed Jun 26, 2019
1 parent 7a7bafd commit 3c7728a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion test/appium/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ def pytest_addoption(parser):
action='store',
default=600,
help='Running time in seconds')
parser.addoption('--chat_name',
action='store',
default='test_chat',
help='Public chat name')
parser.addoption('--device_number',
action='store',
default=2,
help='Public chat name')

# running tests using appium docker instance

Expand Down Expand Up @@ -251,7 +259,10 @@ def get_testrail_case_id(item):


def pytest_runtest_setup(item):
testrail_id = [mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]
try:
testrail_id = [mark.args[0] for mark in item.iter_markers(name='testrail_id')][0]
except IndexError:
pass
run_testrail_ids = item.config.getoption("run_testrail_ids")
if run_testrail_ids:
if str(testrail_id) not in run_testrail_ids:
Expand Down
2 changes: 1 addition & 1 deletion test/appium/tests/test_chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_one_to_one_chatbot(self, key):
chat.chat_message_input.send_keys(message % (counter, key))
chat.send_message_button.click()

@pytest.mark.parametrize('number', list(range(24)))
@pytest.mark.parametrize('number', list(range(int(pytest.config.getoption('device_number')))))
def test_chatbot_public_chat(self, number):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
Expand Down

0 comments on commit 3c7728a

Please sign in to comment.