-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
352 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: objective-c | ||
osx_image: xcode8.3 | ||
cache: | ||
- bundler | ||
- pip | ||
script: | ||
- travis_retry .travis/run.sh | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
cd appium | ||
bundle install | ||
make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Autogenerated by fastlane | ||
# | ||
# Ensure this file is checked in to source control! | ||
|
||
source "https://rubygems.org" | ||
|
||
gem 'fastlane' | ||
|
||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') | ||
eval_gemfile(plugins_path) if File.exist?(plugins_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (2.3.5) | ||
addressable (2.5.1) | ||
public_suffix (~> 2.0, >= 2.0.2) | ||
aws-sdk (2.10.17) | ||
aws-sdk-resources (= 2.10.17) | ||
aws-sdk-core (2.10.17) | ||
aws-sigv4 (~> 1.0) | ||
jmespath (~> 1.0) | ||
aws-sdk-resources (2.10.17) | ||
aws-sdk-core (= 2.10.17) | ||
aws-sigv4 (1.0.1) | ||
babosa (1.0.2) | ||
claide (1.0.2) | ||
colored (1.2) | ||
colored2 (3.1.2) | ||
commander-fastlane (4.4.5) | ||
highline (~> 1.7.2) | ||
declarative (0.0.9) | ||
declarative-option (0.1.0) | ||
domain_name (0.5.20170404) | ||
unf (>= 0.0.5, < 1.0.0) | ||
dotenv (2.2.1) | ||
excon (0.57.1) | ||
faraday (0.12.2) | ||
multipart-post (>= 1.2, < 3) | ||
faraday-cookie_jar (0.0.6) | ||
faraday (>= 0.7.4) | ||
http-cookie (~> 1.0.0) | ||
faraday_middleware (0.11.0.1) | ||
faraday (>= 0.7.4, < 1.0) | ||
fastimage (2.1.0) | ||
fastlane (2.49.0) | ||
CFPropertyList (>= 2.3, < 3.0.0) | ||
addressable (>= 2.3, < 3.0.0) | ||
babosa (>= 1.0.2, < 2.0.0) | ||
bundler (>= 1.12.0, < 2.0.0) | ||
colored | ||
commander-fastlane (>= 4.4.5, < 5.0.0) | ||
dotenv (>= 2.1.1, < 3.0.0) | ||
excon (>= 0.45.0, < 1.0.0) | ||
faraday (~> 0.9) | ||
faraday-cookie_jar (~> 0.0.6) | ||
faraday_middleware (~> 0.9) | ||
fastimage (>= 2.1.0, < 3.0.0) | ||
gh_inspector (>= 1.0.1, < 2.0.0) | ||
google-api-client (>= 0.12.0, < 0.13.0) | ||
highline (>= 1.7.2, < 2.0.0) | ||
json (< 3.0.0) | ||
mini_magick (~> 4.5.1) | ||
multi_json | ||
multi_xml (~> 0.5) | ||
multipart-post (~> 2.0.0) | ||
plist (>= 3.1.0, < 4.0.0) | ||
rubyzip (>= 1.1.0, < 2.0.0) | ||
security (= 0.1.3) | ||
slack-notifier (>= 1.3, < 2.0.0) | ||
terminal-notifier (>= 1.6.2, < 2.0.0) | ||
terminal-table (>= 1.4.5, < 2.0.0) | ||
tty-screen (~> 0.5.0) | ||
word_wrap (~> 1.0.0) | ||
xcodeproj (>= 1.4.4, < 2.0.0) | ||
xcpretty (>= 0.2.4, < 1.0.0) | ||
xcpretty-travis-formatter (>= 0.0.3) | ||
fastlane-plugin-aws_device_farm (0.3.0) | ||
aws-sdk | ||
gh_inspector (1.0.3) | ||
google-api-client (0.12.0) | ||
addressable (~> 2.5, >= 2.5.1) | ||
googleauth (~> 0.5) | ||
httpclient (>= 2.8.1, < 3.0) | ||
mime-types (~> 3.0) | ||
representable (~> 3.0) | ||
retriable (>= 2.0, < 4.0) | ||
googleauth (0.5.3) | ||
faraday (~> 0.12) | ||
jwt (~> 1.4) | ||
logging (~> 2.0) | ||
memoist (~> 0.12) | ||
multi_json (~> 1.11) | ||
os (~> 0.9) | ||
signet (~> 0.7) | ||
highline (1.7.8) | ||
http-cookie (1.0.3) | ||
domain_name (~> 0.5) | ||
httpclient (2.8.3) | ||
jmespath (1.3.1) | ||
json (2.1.0) | ||
jwt (1.5.6) | ||
little-plugger (1.1.4) | ||
logging (2.2.2) | ||
little-plugger (~> 1.1) | ||
multi_json (~> 1.10) | ||
memoist (0.16.0) | ||
mime-types (3.1) | ||
mime-types-data (~> 3.2015) | ||
mime-types-data (3.2016.0521) | ||
mini_magick (4.5.1) | ||
multi_json (1.12.1) | ||
multi_xml (0.6.0) | ||
multipart-post (2.0.0) | ||
nanaimo (0.2.3) | ||
os (0.9.6) | ||
plist (3.3.0) | ||
public_suffix (2.0.5) | ||
representable (3.0.4) | ||
declarative (< 0.1.0) | ||
declarative-option (< 0.2.0) | ||
uber (< 0.2.0) | ||
retriable (3.0.2) | ||
rouge (2.0.7) | ||
rubyzip (1.2.1) | ||
security (0.1.3) | ||
signet (0.7.3) | ||
addressable (~> 2.3) | ||
faraday (~> 0.9) | ||
jwt (~> 1.5) | ||
multi_json (~> 1.10) | ||
slack-notifier (1.5.1) | ||
terminal-notifier (1.8.0) | ||
terminal-table (1.8.0) | ||
unicode-display_width (~> 1.1, >= 1.1.1) | ||
tty-screen (0.5.0) | ||
uber (0.1.0) | ||
unf (0.1.4) | ||
unf_ext | ||
unf_ext (0.0.7.4) | ||
unicode-display_width (1.3.0) | ||
word_wrap (1.0.0) | ||
xcodeproj (1.5.1) | ||
CFPropertyList (~> 2.3.3) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.2.3) | ||
xcpretty (0.2.8) | ||
rouge (~> 2.0.7) | ||
xcpretty-travis-formatter (0.0.4) | ||
xcpretty (~> 0.2, >= 0.0.7) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
fastlane | ||
fastlane-plugin-aws_device_farm (>= 0.3.0) | ||
|
||
BUNDLED WITH | ||
1.15.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
create-test-bundle: | ||
rm test_bundle.zip | true | ||
zip -r test_bundle.zip tests/ wheelhouse/ requirements.txt conftest.py | ||
|
||
install: | ||
cd example; yarn install | ||
|
||
test: create-test-bundle install | ||
fastlane aws_device_run_ios | ||
fastlane aws_ios_upload_and_run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
import pytest | ||
|
||
from appium import webdriver | ||
|
||
|
||
@pytest.fixture(scope='function') | ||
def driver(request): | ||
app = os.path.abspath('/Users/haza/Library/Developer/Xcode/DerivedData/AwesomeProject-gviruxuketsiseechzzeiucbzkzk/Build/Products/Debug-iphonesimulator/AwesomeProject.app') | ||
|
||
screenshot_folder = os.getenv('SCREENSHOT_PATH', '') | ||
|
||
desired_caps = {} | ||
if screenshot_folder == '': | ||
desired_caps['platformName'] = 'iOS' | ||
desired_caps['platformVersion'] = '10.3' | ||
desired_caps['deviceName'] = 'iPhone Simulator' | ||
desired_caps['app'] = app | ||
|
||
_driver = webdriver.Remote( | ||
command_executor='http://127.0.0.1:4723/wd/hub', | ||
desired_capabilities=desired_caps) | ||
|
||
request.addfinalizer(_driver.quit) | ||
|
||
return _driver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../examples/react-native/AwesomeProject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
app_identifier "org.reactjs.native.example.AwesomeProject" # The bundle identifier of your app | ||
apple_id "" # Your Apple email address | ||
|
||
team_id "" # Developer Portal Team ID | ||
|
||
# you can even provide different app identifiers, Apple IDs and team names per lane: | ||
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
fastlane_version "2.48.0" | ||
|
||
default_platform :ios | ||
|
||
platform :ios do | ||
before_all do | ||
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." | ||
|
||
end | ||
|
||
desc "Runs all the tests" | ||
lane :test do | ||
scan | ||
end | ||
|
||
lane :aws_device_run_ios do | ||
#update_project_team(path: "example/ios/AwesomeProject.xcodeproj") | ||
|
||
xcodebuild( | ||
scheme: "AwesomeProject", | ||
project: "example/ios/AwesomeProject.xcodeproj", | ||
destination: "generic/platform=iOS", | ||
configuration: "Release", | ||
derivedDataPath: "aws", | ||
xcargs: "GCC_PREPROCESSOR_DEFINITIONS='AWS_UI_TEST' ENABLE_BITCODE=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO build-for-testing" | ||
) | ||
end | ||
|
||
lane :aws_ios_upload_and_run do | ||
# ENV['AWS_ACCESS_KEY_ID'] = '' | ||
# ENV['AWS_SECRET_ACCESS_KEY'] = '' | ||
ENV['AWS_REGION'] = 'us-west-2' | ||
|
||
# Transform .app into AWS compatible IPA | ||
aws_device_farm_package( | ||
derrived_data_path: "aws", | ||
configuration: "Release" | ||
) | ||
|
||
# RUN tests on AWS Device Farm | ||
aws_device_farm( | ||
name: "react-native", | ||
test_binary_path: "test_bundle.zip", | ||
test_package_type: "APPIUM_PYTHON_TEST_PACKAGE", | ||
test_type: 'APPIUM_PYTHON' | ||
) | ||
end | ||
|
||
# You can define as many lanes as you want | ||
|
||
after_all do |lane| | ||
# This block is called, only if the executed lane was successful | ||
|
||
# slack( | ||
# message: "Successfully deployed new App Update." | ||
# ) | ||
end | ||
|
||
error do |lane, exception| | ||
# slack( | ||
# message: exception.message, | ||
# success: false | ||
# ) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Autogenerated by fastlane | ||
# | ||
# Ensure this file is checked in to source control! | ||
|
||
gem 'fastlane-plugin-aws_device_farm', '>= 0.3.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Appium-Python-Client==0.24 | ||
pbr==3.1.1 | ||
py==1.4.34 | ||
pytest==3.1.3 | ||
selenium==3.4.3 | ||
six==1.10.0 | ||
stevedore==1.24.0 | ||
virtualenv==15.1.0 | ||
virtualenv-clone==0.2.6 | ||
virtualenvwrapper==4.7.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import os | ||
import json | ||
|
||
from time import sleep | ||
|
||
def test_send_message(driver): | ||
driver.find_element_by_accessibility_id('send message').click() | ||
|
||
sleep(1) | ||
|
||
value = driver.find_element_by_accessibility_id('textarea').get_attribute("value") | ||
event = json.loads(value) | ||
|
||
assert len(event['breadcrumbs']) > 0 | ||
assert len(event['contexts']) > 0 | ||
assert event['message'] == 'TEST message' | ||
assert event['extra']['react'] | ||
assert event['tags']['react'] == '1' | ||
assert len(event['user']) > 0 | ||
#assert value == 'button3' | ||
|
||
# def test_scroll(self): | ||
# els = self.driver.find_elements_by_class_name('XCUIElementTypeButton') | ||
# els[5].click() | ||
|
||
# sleep(1) | ||
# try: | ||
# el = self.driver.find_element_by_accessibility_id('Allow') | ||
# el.click() | ||
# sleep(1) | ||
# except: | ||
# pass | ||
|
||
# el = self.driver.find_element_by_xpath('//XCUIElementTypeMap[1]') | ||
|
||
# location = el.location | ||
# self.driver.swipe(start_x=location['x'], start_y=location['y'], end_x=0.5, end_y=location['y'], duration=800) |