testcentricity_web 3.2.15 → 3.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26592250c0f2d078c0f3a246d7763b0d9a7adb59a370432b9c3379e4afa25a34
4
- data.tar.gz: 53580cd17adb0e117166a9a5c84e674d0849a4b93b4e8e1483053d64dc2d09bb
3
+ metadata.gz: 365b55689ded4886c7c52ca8ccb95e8bce18f6c33b6d08fc6872c26b88c2a7e7
4
+ data.tar.gz: 534bce4c71c825e0ba51548b180982428ca8d315f58d62752907203271907ce1
5
5
  SHA512:
6
- metadata.gz: d633b9a1ad1d9eb82e1b00e6b4f81e3d145de82ece572e84e3d7881fca3df768a0a71db5bf24642d19b654a47816a5e5fad19d14c771b045b5a4f64c802b5345
7
- data.tar.gz: 1accebc8d461dd2881e1e7d1c861a9234730704715def6b788929ea51a28581b6f95d23d95339b1eac4bf8ab28015fd4e535ae00acb2d5310bcef4d4c37a7739
6
+ metadata.gz: 5010441fe14bc169b4f8b51ace3fbed1ace9320cf7882d7529e274640ac327032b704b3cea1e9a64eb25e1966f4a5105070f48c2d8fbb94adb4c4752243e8442
7
+ data.tar.gz: 75d127eeddce7949fe2d09f265e25d811a9a6f5789632f9ecbe8dc7eef04d78bfe14216188742f208920887a9b64fa96ef29427dbc548a9fb11c3c6bbfc8d6dc
@@ -1,6 +1,12 @@
1
1
  # CHANGELOG
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [3.2.16] - 13-MAY-2020
5
+
6
+ ### Changed
7
+ * `WebDriverConnect.initialize_web_driver` method now sets local Chrome and Firefox browser Download directory to separate
8
+ folders for each parallel test thread when using `parallel_tests` gem to run tests in concurrent threads.
9
+
4
10
  ## [3.2.15] - 06-APR-2020
5
11
 
6
12
  ### Fixed
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testcentricity_web (3.2.15)
4
+ testcentricity_web (3.2.16)
5
5
  appium_lib
6
6
  browserstack-local
7
7
  capybara (>= 3.1, < 4)
@@ -25,7 +25,7 @@ GEM
25
25
  appium_lib_core (~> 3.3)
26
26
  nokogiri (~> 1.8, >= 1.8.1)
27
27
  tomlrb (~> 1.1)
28
- appium_lib_core (3.6.1)
28
+ appium_lib_core (3.7.0)
29
29
  faye-websocket (~> 0.10.0)
30
30
  selenium-webdriver (~> 3.14, >= 3.14.1)
31
31
  axiom-types (0.1.1)
@@ -65,8 +65,8 @@ GEM
65
65
  nokogiri (1.10.9)
66
66
  mini_portile2 (~> 2.4.0)
67
67
  os (1.1.0)
68
- power_assert (1.1.7)
69
- public_suffix (4.0.4)
68
+ power_assert (1.2.0)
69
+ public_suffix (4.0.5)
70
70
  rack (2.2.2)
71
71
  rack-test (1.1.0)
72
72
  rack (>= 1.0, < 3)
data/README.md CHANGED
@@ -776,6 +776,25 @@ a `/downloads` folder at the same level as the `/config` and `/features` folders
776
776
  └── README.md
777
777
 
778
778
 
779
+ When running tests in multiple concurrent threads using the `parallel_tests` gem, a new folder will be created within the `/downloads` folder for each
780
+ test thread. This is to ensure that files downloaded in each test thread are isolated from tests running in other parallel threads. An example of the
781
+ `/downloads` folder structure for 4 paralle threads is depicted below:
782
+
783
+ my_automation_project
784
+ ├── config
785
+ ├── downloads
786
+ │ ├── 1
787
+ │ ├── 2
788
+ │ ├── 3
789
+ │ └── 4
790
+ ├── features
791
+ │ ├── step_definitions
792
+ │ ├── support
793
+ │ └── test_data
794
+ ├── Gemfile
795
+ └── README.md
796
+
797
+
779
798
  When testing file downloads using a local instance of Firefox, you will need to specify the MIME types of the various file types that your tests will
780
799
  be downloading. This is accomplished by setting the `MIME_TYPES` Environment Variable to a comma-delimited string containing the list of MIME types to
781
800
  be accepted. This list is required as it will prevent Firefox from displaying the File Download modal dialog, which will halt your automated tests. An
@@ -42,6 +42,9 @@ module TestCentricity
42
42
  attr_accessor :grid
43
43
  attr_accessor :tunneling
44
44
 
45
+ attr_accessor :parallel
46
+ attr_accessor :process_num
47
+
45
48
  attr_accessor :signed_in
46
49
  attr_accessor :portal_status
47
50
  attr_accessor :portal_context
@@ -94,6 +97,22 @@ module TestCentricity
94
97
  @session_time_stamp
95
98
  end
96
99
 
100
+ def self.parallel=(state)
101
+ @parallel = state
102
+ end
103
+
104
+ def self.parallel
105
+ @parallel
106
+ end
107
+
108
+ def self.process_num=(num)
109
+ @process_num = num
110
+ end
111
+
112
+ def self.process_num
113
+ @process_num
114
+ end
115
+
97
116
  def self.test_environment
98
117
  if @test_environment.blank?
99
118
  nil
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '3.2.15'
2
+ VERSION = '3.2.16'
3
3
  end
@@ -2,6 +2,7 @@ require 'selenium-webdriver'
2
2
  require 'os'
3
3
  require 'browserstack/local'
4
4
  require 'webdrivers'
5
+ require 'fileutils'
5
6
 
6
7
 
7
8
  module TestCentricity
@@ -16,6 +17,14 @@ module TestCentricity
16
17
  browser = ENV['WEB_BROWSER']
17
18
  # set downloads folder path
18
19
  @downloads_path = "#{Dir.pwd}/downloads"
20
+ if ENV['PARALLEL']
21
+ Environ.parallel = true
22
+ Environ.process_num = ENV['TEST_ENV_NUMBER']
23
+ @downloads_path = "#{@downloads_path}/#{ENV['TEST_ENV_NUMBER']}"
24
+ Dir.mkdir(@downloads_path) unless Dir.exist?(@downloads_path)
25
+ else
26
+ Environ.parallel = false
27
+ end
19
28
  @downloads_path = @downloads_path.tr('/', "\\") if OS.windows?
20
29
 
21
30
  # assume that we're testing within a local desktop web browser
@@ -26,37 +35,37 @@ module TestCentricity
26
35
  Environ.device = :web
27
36
  Environ.device_name = 'browser'
28
37
 
29
- case browser.downcase.to_sym
30
- when :appium
31
- initialize_appium
32
- context = 'mobile device emulator'
33
- when :browserstack
34
- initialize_browserstack
35
- context = 'Browserstack cloud service'
36
- when :crossbrowser
37
- initialize_crossbrowser
38
- context = 'CrossBrowserTesting cloud service'
39
- when :gridlastic
40
- initialize_gridlastic
41
- context = 'Gridlastic cloud service'
42
- when :lambdatest
43
- initialize_lambdatest
44
- context = 'LambdaTest cloud service'
45
- when :saucelabs
46
- initialize_saucelabs
47
- context = 'Sauce Labs cloud service'
48
- when :testingbot
49
- initialize_testingbot
50
- context = 'TestingBot cloud service'
51
- else
52
- if ENV['SELENIUM'] == 'remote'
53
- initialize_remote
54
- context = 'Selenium Grid'
55
- else
56
- initialize_local_browser
57
- context = 'local browser instance'
58
- end
59
- end
38
+ context = case browser.downcase.to_sym
39
+ when :appium
40
+ initialize_appium
41
+ 'mobile device emulator'
42
+ when :browserstack
43
+ initialize_browserstack
44
+ 'Browserstack cloud service'
45
+ when :crossbrowser
46
+ initialize_crossbrowser
47
+ 'CrossBrowserTesting cloud service'
48
+ when :gridlastic
49
+ initialize_gridlastic
50
+ 'Gridlastic cloud service'
51
+ when :lambdatest
52
+ initialize_lambdatest
53
+ 'LambdaTest cloud service'
54
+ when :saucelabs
55
+ initialize_saucelabs
56
+ 'Sauce Labs cloud service'
57
+ when :testingbot
58
+ initialize_testingbot
59
+ 'TestingBot cloud service'
60
+ else
61
+ if ENV['SELENIUM'] == 'remote'
62
+ initialize_remote
63
+ 'Selenium Grid'
64
+ else
65
+ initialize_local_browser
66
+ 'local browser instance'
67
+ end
68
+ end
60
69
 
61
70
  # set browser window size only if testing with a desktop web browser
62
71
  unless Environ.is_device? || Capybara.current_driver == :appium
@@ -169,11 +178,11 @@ module TestCentricity
169
178
  end
170
179
 
171
180
  def self.initialize_local_browser
172
- if OS.osx?
173
- Environ.os = 'OS X'
174
- elsif OS.windows?
175
- Environ.os = 'Windows'
176
- end
181
+ Environ.os = if OS.osx?
182
+ 'OS X'
183
+ elsif OS.windows?
184
+ 'Windows'
185
+ end
177
186
 
178
187
  browser = ENV['WEB_BROWSER'].downcase.to_sym
179
188
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.15
4
+ version: 3.2.16
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: 2020-04-16 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler