testcentricity 3.0.6 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +48 -46
- data/lib/testcentricity/app_core/appium_connect_helper.rb +5 -8
- data/lib/testcentricity/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2758825ab228a75d0bae37cbdc399b496ad7328864ec502004da2baddaf12fa8
|
4
|
+
data.tar.gz: 986612a77b2c174bd8617744745d08a402cdda609df528851a9d5c78a4e40c6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1e22099243c98338cb90a1d9d67e42bb7a1e2c71cf2783f8d7afbde6470aedcd78f4e4a06a37ed341725b13d34fde5c6183ff6a0e99977a8781e799bbe89f30
|
7
|
+
data.tar.gz: aa5f2334030c4911c8ed8ab6749c0d30d4aba8334688b2eac9298e932ed79f67182e931b9693ae998c10f38d0050251ff1ba705dbd7373a090a21dfff2259e39
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
4
|
|
5
|
+
## [3.1.0] - 02-AUGUST-2022
|
6
|
+
|
7
|
+
### Added
|
8
|
+
* The `DRIVER` Environment Variable is now used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
|
9
|
+
or `lambdatest` driver.
|
10
|
+
|
11
|
+
* ### Changed
|
12
|
+
* The `WEB_BROWSER` Environment Variable is no longer used to specify the `appium`, `browserstack`, `saucelabs`, `testingbot`,
|
13
|
+
or `lambdatest` driver.
|
14
|
+
* TestCentricity now supports and integrates with Selenium-Webdriver version 4.3.
|
15
|
+
|
16
|
+
|
5
17
|
## [3.0.6] - 21-JUNE-2022
|
6
18
|
|
7
19
|
### Fixed
|
data/README.md
CHANGED
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
The TestCentricity™ core framework for native mobile iOS and Android apps and desktop/mobile web testing implements a Screen
|
8
|
-
and Page Object Model DSL for use with Cucumber (version 7.x or greater), Appium, Capybara, and Selenium-Webdriver (version
|
9
|
-
the configuration of the appropriate Appium capabilities and driver required to establish a connection
|
10
|
-
cloud hosted (using BrowserStack, Sauce Labs, or TestingBot services) iOS and Android real devices or
|
11
|
-
information on desktop/mobile web testing with this gem, refer to docs for the [TestCentricity™ Web gem](https://www.rubydoc.info/gems/testcentricity_web)
|
8
|
+
and Page Object Model DSL for use with Cucumber (version 7.x or greater), Appium, Capybara, and Selenium-Webdriver (version
|
9
|
+
4.3). It also facilitates the configuration of the appropriate Appium capabilities and driver required to establish a connection
|
10
|
+
with locally hosted or cloud hosted (using BrowserStack, Sauce Labs, or TestingBot services) iOS and Android real devices or
|
11
|
+
simulators. For more information on desktop/mobile web testing with this gem, refer to docs for the [TestCentricity™ Web gem](https://www.rubydoc.info/gems/testcentricity_web)
|
12
12
|
|
13
13
|
The TestCentricity™ gem supports automated testing of native iOS and Android apps running on the following mobile test targets:
|
14
14
|
* locally hosted iOS device simulators or physical iOS devices (using Appium and XCode on macOS)
|
@@ -858,7 +858,9 @@ tests, place the code shown below into your `hooks.rb` file.
|
|
858
858
|
BeforeAll do
|
859
859
|
# start Appium Server if command line option was specified and target browser is mobile simulator or device
|
860
860
|
if ENV['APPIUM_SERVER'] == 'run' && Environ.driver == :appium
|
861
|
-
|
861
|
+
$server = TestCentricity::AppiumServer.new
|
862
|
+
$server.start
|
863
|
+
end
|
862
864
|
end
|
863
865
|
|
864
866
|
AfterAll do
|
@@ -885,24 +887,24 @@ The Appium server must be running prior to invoking Cucumber to run your feature
|
|
885
887
|
|
886
888
|
Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
|
887
889
|
|
888
|
-
| **Environment Variable**
|
889
|
-
|
890
|
-
| `
|
891
|
-
| `APP_PLATFORM_NAME`
|
892
|
-
| `AUTOMATION_ENGINE`
|
893
|
-
| `APP_VERSION`
|
894
|
-
| `APP_DEVICE`
|
895
|
-
| `DEVICE_TYPE`
|
896
|
-
| `APP_UDID`
|
897
|
-
| `TEAM_ID`
|
898
|
-
| `TEAM_NAME`
|
899
|
-
| `APP_NO_RESET`
|
900
|
-
| `APP_FULL_RESET`
|
901
|
-
| `WDA_LOCAL_PORT`
|
902
|
-
| `LOCALE`
|
903
|
-
| `LANGUAGE`
|
904
|
-
| `ORIENTATION`
|
905
|
-
| `NEW_COMMAND_TIMEOUT`
|
890
|
+
| **Environment Variable** | **Description** |
|
891
|
+
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
892
|
+
| `DRIVER` | Must be set to `appium` |
|
893
|
+
| `APP_PLATFORM_NAME` | Must be set to `iOS` |
|
894
|
+
| `AUTOMATION_ENGINE` | Must be set to `XCUITest` |
|
895
|
+
| `APP_VERSION` | Must be set to `15.4`, `14.5`, or which ever iOS version you wish to run within the XCode Simulator |
|
896
|
+
| `APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 13 Pro Max`, `iPad Pro (12.9-inch) (5th generation)`, etc.) or name of physically connected iOS device |
|
897
|
+
| `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
|
898
|
+
| `APP_UDID` | UDID of physically connected iOS device (not used for simulators) |
|
899
|
+
| `TEAM_ID` | unique 10-character Apple developer team identifier string (not used for simulators) |
|
900
|
+
| `TEAM_NAME` | String representing a signing certificate (not used for simulators) |
|
901
|
+
| `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
|
902
|
+
| `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
|
903
|
+
| `WDA_LOCAL_PORT` | [Optional] Used to forward traffic from Mac host to real iOS devices over USB. Default value is same as port number used by WDA on device. |
|
904
|
+
| `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
|
905
|
+
| `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
|
906
|
+
| `ORIENTATION` | [Optional] Set to `portrait` or `landscape` (only for iOS simulators) |
|
907
|
+
| `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
|
906
908
|
|
907
909
|
|
908
910
|
Refer to **section 9.5 (Using Configuration Specific Profiles in cucumber.yml)** below.
|
@@ -917,21 +919,21 @@ to run your features/scenarios.
|
|
917
919
|
|
918
920
|
Once your test environment is properly configured, the following **Environment Variables** must be set as described in the table below.
|
919
921
|
|
920
|
-
| **Environment Variable**
|
921
|
-
|
922
|
-
| `
|
923
|
-
| `APP_PLATFORM_NAME`
|
924
|
-
| `AUTOMATION_ENGINE`
|
925
|
-
| `APP_VERSION`
|
926
|
-
| `APP_DEVICE`
|
927
|
-
| `DEVICE_TYPE`
|
928
|
-
| `APP_UDID`
|
929
|
-
| `ORIENTATION`
|
930
|
-
| `APP_NO_RESET`
|
931
|
-
| `APP_FULL_RESET`
|
932
|
-
| `LOCALE`
|
933
|
-
| `LANGUAGE`
|
934
|
-
| `NEW_COMMAND_TIMEOUT`
|
922
|
+
| **Environment Variable** | **Description** |
|
923
|
+
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------|
|
924
|
+
| `DRIVER` | Must be set to `appium` |
|
925
|
+
| `APP_PLATFORM_NAME` | Must be set to `Android` |
|
926
|
+
| `AUTOMATION_ENGINE` | Must be set to `UiAutomator2` |
|
927
|
+
| `APP_VERSION` | Must be set to `12.0`, or which ever Android OS version you wish to run with the Android Virtual Device |
|
928
|
+
| `APP_DEVICE` | Set to Android Virtual Device ID (`Pixel_2_XL_API_26`, `Nexus_6_API_23`, etc.) found in Advanced Settings of AVD Configuration |
|
929
|
+
| `DEVICE_TYPE` | Must be set to `phone` or `tablet` |
|
930
|
+
| `APP_UDID` | UDID of physically connected Android device (not used for simulators) |
|
931
|
+
| `ORIENTATION` | [Optional] Set to `portrait` or `landscape` |
|
932
|
+
| `APP_NO_RESET` | [Optional] Don't reset app state after each test. Set to `true` or `false` |
|
933
|
+
| `APP_FULL_RESET` | [Optional] Perform a complete reset. Set to `true` or `false` |
|
934
|
+
| `LOCALE` | [Optional] Locale to set for the simulator. e.g. `fr_CA` |
|
935
|
+
| `LANGUAGE` | [Optional] Language to set for the simulator. e.g. `fr` |
|
936
|
+
| `NEW_COMMAND_TIMEOUT` | [Optional] Time (in Seconds) that Appium will wait for a new command from the client |
|
935
937
|
|
936
938
|
|
937
939
|
Refer to **section 9.5 (Using Configuration Specific Profiles in cucumber.yml)** below.
|
@@ -951,7 +953,7 @@ for information regarding the specific capabilities.
|
|
951
953
|
|
952
954
|
| **Environment Variable** | **Description** |
|
953
955
|
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
|
954
|
-
| `
|
956
|
+
| `DRIVER` | Must be set to `browserstack` |
|
955
957
|
| `BS_USERNAME` | Must be set to your BrowserStack account user name |
|
956
958
|
| `BS_AUTHKEY` | Must be set to your BrowserStack account access key |
|
957
959
|
| `BS_OS` | Must be set to `ios` or `android` |
|
@@ -975,7 +977,7 @@ to obtain information regarding the specific capabilities.
|
|
975
977
|
|
976
978
|
| **Environment Variable** | **Description** |
|
977
979
|
|--------------------------|-----------------------------------------------------------------------------------------------------------------|
|
978
|
-
| `
|
980
|
+
| `DRIVER` | Must be set to `saucelabs` |
|
979
981
|
| `SL_USERNAME` | Must be set to your Sauce Labs account user name or email address |
|
980
982
|
| `SL_AUTHKEY` | Must be set to your Sauce Labs account access key |
|
981
983
|
| `DATA_CENTER` | Must be set to your Sauce Labs account Data Center assignment (`us-west-1`, `eu-central-1`, `apac-southeast-1`) |
|
@@ -996,7 +998,7 @@ for information regarding the specific capabilities.
|
|
996
998
|
|
997
999
|
| **Environment Variable** | **Description** |
|
998
1000
|
|--------------------------|---------------------------------------------------|
|
999
|
-
| `
|
1001
|
+
| `DRIVER` | Must be set to `testingbot` |
|
1000
1002
|
| `TB_USERNAME` | Must be set to your TestingBot account user name |
|
1001
1003
|
| `TB_AUTHKEY` | Must be set to your TestingBot account access key |
|
1002
1004
|
| `TB_OS` | Must be set to `ios` or `android` |
|
@@ -1046,7 +1048,7 @@ code for the cloud service(s) that you intend to connect with.
|
|
1046
1048
|
# NOTE: Requires installation of XCode, iOS version specific target simulators, and Appium
|
1047
1049
|
#==============
|
1048
1050
|
|
1049
|
-
appium_ios:
|
1051
|
+
appium_ios: DRIVER=appium --profile ios AUTOMATION_ENGINE=XCUITest APP_PLATFORM_NAME="iOS" NEW_COMMAND_TIMEOUT="30" <%= mobile %>
|
1050
1052
|
app_ios_14: --profile appium_ios APP_VERSION="14.5"
|
1051
1053
|
app_ios_15: --profile appium_ios APP_VERSION="15.4"
|
1052
1054
|
|
@@ -1061,7 +1063,7 @@ code for the cloud service(s) that you intend to connect with.
|
|
1061
1063
|
# NOTE: Requires installation of Android Studio, Android version specific virtual device simulators, and Appium
|
1062
1064
|
#==============
|
1063
1065
|
|
1064
|
-
appium_android:
|
1066
|
+
appium_android: DRIVER=appium --profile android AUTOMATION_ENGINE=UiAutomator2 APP_PLATFORM_NAME="Android" <%= mobile %>
|
1065
1067
|
app_android_12: --profile appium_android APP_VERSION="12.0"
|
1066
1068
|
pixel_5_api31_sim: --profile app_android_12 DEVICE_TYPE=phone APP_DEVICE="Pixel_5_API_31"
|
1067
1069
|
|
@@ -1072,7 +1074,7 @@ code for the cloud service(s) that you intend to connect with.
|
|
1072
1074
|
# to your version control system
|
1073
1075
|
#==============
|
1074
1076
|
|
1075
|
-
browserstack:
|
1077
|
+
browserstack: DRIVER=browserstack BS_USERNAME="<INSERT USER NAME HERE>" BS_AUTHKEY="<INSERT PASSWORD HERE>" TEST_CONTEXT="TestCentricity"
|
1076
1078
|
|
1077
1079
|
# BrowserStack iOS real device native app profiles
|
1078
1080
|
bs_ios: --profile browserstack --profile ios BS_OS=ios <%= mobile %>
|
@@ -1091,7 +1093,7 @@ code for the cloud service(s) that you intend to connect with.
|
|
1091
1093
|
# to your version control system
|
1092
1094
|
#==============
|
1093
1095
|
|
1094
|
-
saucelabs:
|
1096
|
+
saucelabs: DRIVER=saucelabs SL_USERNAME="<INSERT USER NAME HERE>" SL_AUTHKEY="<INSERT PASSWORD HERE>" DATA_CENTER="us-west-1" AUTOMATE_PROJECT="TestCentricity - SauceLabs"
|
1095
1097
|
|
1096
1098
|
# SauceLabs iOS real device native app profiles
|
1097
1099
|
sl_ios: --profile saucelabs --profile ios SL_OS=ios <%= mobile %>
|
@@ -1109,7 +1111,7 @@ code for the cloud service(s) that you intend to connect with.
|
|
1109
1111
|
# to your version control system
|
1110
1112
|
#==============
|
1111
1113
|
|
1112
|
-
testingbot:
|
1114
|
+
testingbot: DRIVER=testingbot TB_USERNAME="<INSERT USER NAME HERE>" TB_AUTHKEY="<INSERT PASSWORD HERE>" AUTOMATE_PROJECT="TestCentricity - TestingBot"
|
1113
1115
|
|
1114
1116
|
# TestingBot iOS real device native app profiles
|
1115
1117
|
tb_ios: --profile testingbot --profile ios TB_OS=iOS <%= mobile %>
|
@@ -18,14 +18,12 @@ module TestCentricity
|
|
18
18
|
@capabilities = options[:desired_capabilities] if options.key?(:desired_capabilities)
|
19
19
|
end
|
20
20
|
Environ.platform = :mobile
|
21
|
-
Environ.driver = :appium
|
22
21
|
Environ.device_type = ENV['DEVICE_TYPE'] if ENV['DEVICE_TYPE']
|
23
22
|
|
24
23
|
Environ.device_orientation = ENV['ORIENTATION'] if ENV['ORIENTATION']
|
25
24
|
Environ.device_os_version = ENV['APP_VERSION']
|
26
|
-
|
27
|
-
Environ.
|
28
|
-
case browser.downcase.to_sym
|
25
|
+
Environ.driver = ENV['DRIVER'].downcase.to_sym
|
26
|
+
case Environ.driver
|
29
27
|
when :appium
|
30
28
|
Environ.device_name = ENV['APP_DEVICE']
|
31
29
|
Environ.device_os = ENV['APP_PLATFORM_NAME']
|
@@ -47,14 +45,13 @@ module TestCentricity
|
|
47
45
|
Environ.device_name = ENV['LT_DEVICE']
|
48
46
|
Environ.device_os = ENV['LT_OS']
|
49
47
|
else
|
50
|
-
raise "#{
|
48
|
+
raise "#{Environ.driver} is not a valid selector"
|
51
49
|
end
|
52
50
|
@running = false
|
53
51
|
end
|
54
52
|
|
55
53
|
def self.start_driver
|
56
|
-
|
57
|
-
capabilities = case browser.downcase.to_sym
|
54
|
+
capabilities = case Environ.driver
|
58
55
|
when :appium
|
59
56
|
appium_local_capabilities
|
60
57
|
when :browserstack
|
@@ -66,7 +63,7 @@ module TestCentricity
|
|
66
63
|
when :lambdatest
|
67
64
|
lambdatest_capabilities
|
68
65
|
else
|
69
|
-
raise "#{
|
66
|
+
raise "#{Environ.driver} is not a valid selector"
|
70
67
|
end
|
71
68
|
puts "Appium desired_capabilities = #{capabilities}" if ENV['DEBUG']
|
72
69
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: cucumber
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 8.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 8.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cuke_modeler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 3.11.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 3.11.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 4.
|
187
|
+
version: 4.3.0
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 4.
|
194
|
+
version: 4.3.0
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: test-unit
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|