Skip to content
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
9 changes: 9 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
jobs:
- template: ./ci-jobs/functional_test.yml

# Runs tests nightly to make sure they works against appium@beta
schedules:
- cron: "0 0 * * *"
displayName: Daily Nightly build (UTC)
branches:
include:
- master
always: true
3 changes: 2 additions & 1 deletion test/functional/android/find_by_accessibility_id_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

from appium.webdriver.common.mobileby import MobileBy

from .helper.test_helper import BaseTestCase, is_ci, wait_for_element
from ..test_helper import is_ci
from .helper.test_helper import BaseTestCase, wait_for_element


class FindByAccessibilityIDTests(BaseTestCase):
Expand Down
10 changes: 1 addition & 9 deletions test/functional/android/helper/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from selenium.webdriver.support.ui import WebDriverWait

from appium import webdriver
from test.functional.test_helper import is_ci

from . import desired_capabilities

Expand Down Expand Up @@ -48,15 +49,6 @@ def wait_for_element(driver, locator, value, timeout=SLEEPY_TIME):
)


def is_ci():
"""Returns if current execution is running on CI

Returns:
bool: `True` if current executions is on CI
"""
return os.getenv('CI', 'false') == 'true'


class BaseTestCase(unittest.TestCase):

def setUp(self):
Expand Down
3 changes: 2 additions & 1 deletion test/functional/android/network_connection_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

from appium.webdriver.connectiontype import ConnectionType

from .helper.test_helper import BaseTestCase, is_ci
from ..test_helper import is_ci
from .helper.test_helper import BaseTestCase


class NetworkConnectionTests(BaseTestCase):
Expand Down
3 changes: 2 additions & 1 deletion test/functional/android/webdriver_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

from appium.webdriver.common.mobileby import MobileBy

from .helper.test_helper import BaseTestCase, is_ci, wait_for_element
from ..test_helper import is_ci
from .helper.test_helper import BaseTestCase, wait_for_element


class WebdriverTests(BaseTestCase):
Expand Down
4 changes: 4 additions & 0 deletions test/functional/ios/webdriver_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from appium.webdriver.applicationstate import ApplicationState
from test.functional.test_helper import get_available_from_port_range

from ..test_helper import is_ci
from .helper import desired_capabilities


Expand All @@ -32,6 +33,9 @@ def tearDown(self):
self.driver.quit()

def test_all_sessions(self):
if is_ci():
# TODO Due to not created 2nd session somehow
self.skipTest('Need to fix flaky test during running on CI.')
port = get_available_from_port_range(8200, 8300)
desired_caps = desired_capabilities.get_desired_capabilities('UICatalog.app.zip')
desired_caps['deviceName'] = 'iPhone Xs Max'
Expand Down
10 changes: 10 additions & 0 deletions test/functional/test_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import socket


Expand All @@ -21,3 +22,12 @@ def get_available_from_port_range(from_port, to_port):

raise NoAvailablePortError('No available port between {} and {}'.format(
from_port, to_port))


def is_ci():
"""Returns if current execution is running on CI

Returns:
bool: `True` if current executions is on CI
"""
return os.getenv('CI', 'false') == 'true'