Ifd_Automation 2.9.9 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 57ab0f48029f2bfe9a2910342715fcba642521533e5e7733dd6b7ae7a8484ef8
4
- data.tar.gz: 1da106099178075dc26a534e57b6f4c6dea84888ee45bb795236cfb1eeb32417
2
+ SHA1:
3
+ metadata.gz: 8affb157aa78d4f62352b5deb2279c16c165953f
4
+ data.tar.gz: 2019c4610eb99cc1f0efa020321ce6553b07d127
5
5
  SHA512:
6
- metadata.gz: c1b688d0f7144a4feff96cba624c0fcac01c4265ee1c0e9f38871627d55e3d4118ae5b041d569abcd7050211ef997340667c458e78d0a50bfa9d37d5cea14d3d
7
- data.tar.gz: 44ccb3e66973a25e6ff0aac750ccf6144be28df5aad9441dddf3de9db73a1d03b59ec2a5bd724d72c13119d6d0d3ee7daa2ecbfaec270b7908b0a129a79c9d4a
6
+ metadata.gz: 276c1345b92853704ae90d4522a73de4243661a91a86367fb9a57e46a3a5799af4972b4446a51e9b1fee09fdf7642c50312b35a0866fcc8dffb632c275f433c5
7
+ data.tar.gz: e93c4a46f54fec5315fe66882d8f3efdaa3e131b71d40afbc372249ef49e985ab339b8a39ed5416382441a8f425149f6186969f7287ab8b40de41750dadc1ab7
@@ -1,3 +1,3 @@
1
1
  module IfdAutomation
2
- VERSION = "2.9.9"
2
+ VERSION = "3.0.0"
3
3
  end
data/project/Rakefile CHANGED
@@ -6,10 +6,9 @@ begin
6
6
  testsuite_name = ENV['TESTSUITE']
7
7
  testcase_report_name = ENV['TESTCASE_REPORT_NAME']
8
8
  report_path = "Reports/#{testsuite_name}"
9
-
10
9
  local_opts = [ "--color", "--no-source","CONFIG_NAME=local"]
11
10
  server_opts = [ "--color", "--no-source","CONFIG_NAME=server"]
12
- junit_opts = ["--format junit", "--out #{report_path}"]
11
+ junit_opts = ["--format junit", "--out #{report_path}", "--format json --out #{report_path}/#{testcase_report_name}.json"]
13
12
  namespace :ITMS_DEBUG do
14
13
  Cucumber::Rake::Task.new(:local, "Debug on local environment") do |t|
15
14
  t.cucumber_opts = [*local_opts, "ITMS_DEBUG=true"]
@@ -20,10 +19,10 @@ begin
20
19
  end
21
20
  namespace :EXECUTE do
22
21
  Cucumber::Rake::Task.new(:local, "Execute on local environment") do |t|
23
- t.cucumber_opts = [*local_opts, *junit_opts, "EXECUTE=true", "--format json --out #{report_path}/#{testcase_report_name}.json"]
22
+ t.cucumber_opts = [*local_opts, *junit_opts, "EXECUTE=true"]
24
23
  end
25
24
  Cucumber::Rake::Task.new(:server, "Execute on cloud browser") do |t|
26
- t.cucumber_opts = [*server_opts, *junit_opts, "EXECUTE=true", "--format json --out #{report_path}/#{testcase_report_name}.json"]
25
+ t.cucumber_opts = [*server_opts, *junit_opts, "EXECUTE=true"]
27
26
  end
28
27
  end
29
28
  rescue LoadError
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite failures="1" errors="0" skipped="0" tests="1" time="0.037083" name="feature 2">
3
+ <testcase classname="feature 2" name="scenario 2" time="0.037083">
4
+ <failure message="failed scenario 2" type="failed">
5
+ <![CDATA[Scenario: scenario 2
6
+
7
+ Before hook at features/support/hooks.rb:1
8
+
9
+ Message:
10
+ ]]>
11
+ <![CDATA[
12
+ >>> Error: undefined method `capabilities' for ["browserName: firefox", "record_video: MAC OSX 10"]:Array (RuntimeError)
13
+ ./features/support/hooks.rb:7:in `rescue in block in <top (required)>'
14
+ ./features/support/hooks.rb:2:in `Before']]>
15
+ </failure>
16
+ <system-out>
17
+ <![CDATA[]]>
18
+ </system-out>
19
+ <system-err>
20
+ <![CDATA[]]>
21
+ </system-err>
22
+ </testcase>
23
+ </testsuite>
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <testsuite failures="1" errors="0" skipped="0" tests="1" time="0.002251" name="feature 1">
3
+ <testcase classname="feature 1" name="scenario 1" time="0.002251">
4
+ <failure message="failed scenario 1" type="failed">
5
+ <![CDATA[Scenario: scenario 1
6
+
7
+ Before hook at features/support/hooks.rb:1
8
+
9
+ Message:
10
+ ]]>
11
+ <![CDATA[
12
+ >>> Error: undefined method `capabilities' for ["browserName: firefox", "record_video: MAC OSX 10"]:Array (RuntimeError)
13
+ ./features/support/hooks.rb:7:in `rescue in block in <top (required)>'
14
+ ./features/support/hooks.rb:2:in `Before']]>
15
+ </failure>
16
+ <system-out>
17
+ <![CDATA[]]>
18
+ </system-out>
19
+ <system-err>
20
+ <![CDATA[]]>
21
+ </system-err>
22
+ </testcase>
23
+ </testsuite>
@@ -34,19 +34,23 @@
34
34
  </div>
35
35
  </header>
36
36
  <div id="g0f0s0" class="modal modal-fixed-footer">
37
- <div class="modal-content"><div class="chip"><i class="material-icons rotate-45">label</i>@tag_name</div><h5>scenario name (15.588s)</h5>
38
- features/TestSuite/WebGUI.feature:3
39
- <ul class="collection stepList"><li class="collection-item step passed">
40
- <b>Given </b> I open the page &quot;http://rubygems.org&quot; (12.432s)</li>
37
+ <div class="modal-content"><h5>scenario 1 (0.002s)</h5>
38
+ features/TestSuite/WebGUI_copy.feature:2<pre>
39
+ &gt;&gt;&gt; Error: undefined method `capabilities&#39; for [&quot;browserName: firefox&quot;, &quot;record_video: MAC OSX 10&quot;]:Array (RuntimeError)
40
+ ./features/support/hooks.rb:7:in `rescue in block in &lt;top (required)&gt;&#39;
41
+ ./features/support/hooks.rb:2:in `Before&#39;</pre><ul class="collection stepList"><li class="collection-item step skipped">
42
+ <b>Given </b> I open the page &quot;http://rubygems.org&quot; (0.000s)</li>
41
43
  </ul>
42
44
  </div><div class="modal-footer">
43
45
  <span class="modal-action modal-close waves-effect waves-green btn-flat"><i class="material-icons">close</i></span>
44
46
  </div>
45
47
  </div><div id="g0f1s0" class="modal modal-fixed-footer">
46
- <div class="modal-content"><div class="chip"><i class="material-icons rotate-45">label</i>@tag_name</div><h5>scenario name (10.807s)</h5>
47
- features/TestSuite/WebGUI_copy.feature:3
48
- <ul class="collection stepList"><li class="collection-item step passed">
49
- <b>Given </b> I open the page &quot;http://rubygems.org&quot; (10.623s)</li>
48
+ <div class="modal-content"><div class="chip"><i class="material-icons rotate-45">label</i>@test1</div><h5>scenario 2 (0.017s)</h5>
49
+ features/TestSuite/WebGUI.feature:3<pre>
50
+ &gt;&gt;&gt; Error: undefined method `capabilities&#39; for [&quot;browserName: firefox&quot;, &quot;record_video: MAC OSX 10&quot;]:Array (RuntimeError)
51
+ ./features/support/hooks.rb:7:in `rescue in block in &lt;top (required)&gt;&#39;
52
+ ./features/support/hooks.rb:2:in `Before&#39;</pre><ul class="collection stepList"><li class="collection-item step skipped">
53
+ <b>Given </b> I open the page &quot;http://infodation.vn&quot; (0.000s)</li>
50
54
  </ul>
51
55
  </div><div class="modal-footer">
52
56
  <span class="modal-action modal-close waves-effect waves-green btn-flat"><i class="material-icons">close</i></span>
@@ -71,42 +75,42 @@ $(document).ready(function () {$('#g0f0s0').modal();$('#g0f0s1').modal();$('#g0f
71
75
  </div><div class="col m4 s12">
72
76
  <table id="metaData" class="bordered">
73
77
  <tbody>
74
- <tr><th>Total Time</th><td>26.395s</td></tr><tr>
78
+ <tr><th>Total Time</th><td>0.019s</td></tr><tr>
75
79
  <th>Browser</th>
76
- <td>chrome</td>
80
+ <td></td>
77
81
  </tr><tr>
78
82
  <th>Platform</th>
79
- <td>linux</td>
83
+ <td></td>
80
84
  </tr><tr>
81
85
  <th>Browser Version</th>
82
- <td>73.0.3683.86</td>
86
+ <td></td>
83
87
  </tr><tr>
84
88
  <th>Report Generated</th>
85
- <td>2019-05-28 07:03:47 UTC</td>
89
+ <td>2019-08-07 08:22:04 UTC</td>
86
90
  </tr></tbody>
87
91
  </table>
88
92
  </div>
89
93
  </div></div><div id="features" class="col s12 blue lighten-5 white-text">
90
94
  <ul class="featureList collapsible popout" data-collapsible="expandable">
91
- <li class="feature working">
95
+ <li class="feature broken">
92
96
  <div class="collapsible-header blue lighten-1 waves-effect waves-light">
93
97
  <i class="material-icons">featured_play_list</i>
94
- <b>Feature</b>&nbsp;feature name&nbsp;(15.588s)
98
+ <b>Feature</b>&nbsp;feature 1&nbsp;(0.002s)
95
99
  </div><div class="collapsible-body blue lighten-4">
96
- <ul class="collection scenarioList"><li class="collection-item scenario passed">
100
+ <ul class="collection scenarioList"><li class="collection-item scenario failed">
97
101
  <a class="waves-effect waves-light modal-trigger white-text" href="#g0f0s0">
98
- <b>Scenario</b> scenario name&nbsp;(15.588s)
102
+ <b>Scenario</b> scenario 1&nbsp;(0.002s)
99
103
  </a>
100
104
  </li></ul>
101
105
  </div>
102
- </li><li class="feature working">
106
+ </li><li class="feature broken">
103
107
  <div class="collapsible-header blue lighten-1 waves-effect waves-light">
104
108
  <i class="material-icons">featured_play_list</i>
105
- <b>Feature</b>&nbsp;feature name&nbsp;(10.807s)
109
+ <b>Feature</b>&nbsp;feature 2&nbsp;(0.017s)
106
110
  </div><div class="collapsible-body blue lighten-4">
107
- <ul class="collection scenarioList"><li class="collection-item scenario passed">
111
+ <ul class="collection scenarioList"><li class="collection-item scenario failed">
108
112
  <a class="waves-effect waves-light modal-trigger white-text" href="#g0f1s0">
109
- <b>Scenario</b> scenario name&nbsp;(10.807s)
113
+ <b>Scenario</b> scenario 2&nbsp;(0.017s)
110
114
  </a>
111
115
  </li></ul>
112
116
  </div>
@@ -122,29 +126,40 @@ $(document).ready(function () {$('#g0f0s0').modal();$('#g0f0s1').modal();$('#g0f
122
126
  <th class="hide-on-small-only">Error</th>
123
127
  </tr>
124
128
  </thead>
125
- <tbody><tr class="passed">
129
+ <tbody><tr class="failed">
126
130
  <td class="hide-on-small-only">
127
- feature name
131
+ feature 1
128
132
  </td><td class="hoverable">
129
- <a class="modal-trigger white-text" href="#g0f0s0">scenario name</a>
130
- </td><td class="hide">
131
- @tag_name.
132
- </td><td class="uppercase">
133
- passed
133
+ <a class="modal-trigger white-text" href="#g0f0s0">scenario 1</a>
134
+ </td><td class="hide"></td><td class="uppercase">
135
+ failed
134
136
  </td><td class="hide-on-small-only"></td></tr>
135
- <tr class="passed">
137
+ <tr class="failed">
136
138
  <td class="hide-on-small-only">
137
- feature name
139
+ feature 2
138
140
  </td><td class="hoverable">
139
- <a class="modal-trigger white-text" href="#g0f1s0">scenario name</a>
141
+ <a class="modal-trigger white-text" href="#g0f1s0">scenario 2</a>
140
142
  </td><td class="hide">
141
- @tag_name.
143
+ @test1.
142
144
  </td><td class="uppercase">
143
- passed
145
+ failed
144
146
  </td><td class="hide-on-small-only"></td></tr>
145
147
  </tbody>
146
148
  </table></div><div id="errors" class="col s12 blue lighten-5">
147
- <ul class="errorList collapsible popout" data-collapsible="expandable"></ul></div>
149
+ <ul class="errorList collapsible popout" data-collapsible="expandable"><li class="error">
150
+ <div class="collapsible-header red lighten-2 white-text waves-effect waves-light">
151
+ <i class="material-icons">bug_report</i>
152
+ </div><div class="collapsible-body blue lighten-4">
153
+ <ul class="collection failedScenarioList">
154
+ <li class="collection-item failedScenario blue lighten-5 red-text">
155
+ <i class="material-icons">highlight_off</i>&nbsp;<a class="modal-trigger red-text" href="#g0f0s0">scenario 1</a>
156
+ </li><li class="collection-item failedScenario blue lighten-5 red-text">
157
+ <i class="material-icons">highlight_off</i>&nbsp;<a class="modal-trigger red-text" href="#g0f1s0">scenario 2</a>
158
+ </li>
159
+ </ul>
160
+ </div>
161
+ </li>
162
+ </ul></div>
148
163
  </div>
149
164
  </main><footer class="page-footer blue lighten-4">
150
165
  <div class="footer-copyright blue lighten-1">
@@ -1,25 +1,19 @@
1
1
  [
2
2
  {
3
- "uri": "features/TestSuite/WebGUI.feature",
4
- "id": "feature-name",
3
+ "uri": "features/TestSuite/WebGUI_copy.feature",
4
+ "id": "feature-1",
5
5
  "keyword": "Feature",
6
- "name": "feature name",
6
+ "name": "feature 1",
7
7
  "description": "",
8
8
  "line": 1,
9
9
  "elements": [
10
10
  {
11
- "id": "feature-name;scenario-name",
11
+ "id": "feature-1;scenario-1",
12
12
  "keyword": "Scenario",
13
- "name": "scenario name",
13
+ "name": "scenario 1",
14
14
  "description": "",
15
- "line": 3,
15
+ "line": 2,
16
16
  "type": "scenario",
17
- "tags": [
18
- {
19
- "name": "@tag_name",
20
- "line": 2
21
- }
22
- ],
23
17
  "before": [
24
18
  {
25
19
  "match": {
@@ -27,10 +21,10 @@
27
21
  },
28
22
  "result": {
29
23
  "status": "passed",
30
- "duration": 21000
24
+ "duration": 12000
31
25
  },
32
26
  "status": "passed",
33
- "duration": 21000
27
+ "duration": 12000
34
28
  },
35
29
  {
36
30
  "match": {
@@ -38,37 +32,38 @@
38
32
  },
39
33
  "result": {
40
34
  "status": "passed",
41
- "duration": 18000
35
+ "duration": 8000
42
36
  },
43
37
  "status": "passed",
44
- "duration": 18000
38
+ "duration": 8000
45
39
  },
46
40
  {
47
41
  "match": {
48
42
  "location": "features/support/hooks.rb:1"
49
43
  },
50
44
  "result": {
51
- "status": "passed",
52
- "duration": 2989245000
45
+ "status": "failed",
46
+ "error_message": "\n>>> Error: undefined method `capabilities' for [\"browserName: firefox\", \"record_video: MAC OSX 10\"]:Array (RuntimeError)\n./features/support/hooks.rb:7:in `rescue in block in <top (required)>'\n./features/support/hooks.rb:2:in `Before'",
47
+ "duration": 1633000
53
48
  },
54
- "status": "passed",
55
- "duration": 2989245000
49
+ "status": "failed",
50
+ "duration": 1633000
56
51
  }
57
52
  ],
58
53
  "steps": [
59
54
  {
60
55
  "keyword": "Given ",
61
56
  "name": "I open the page &quot;http://rubygems.org&quot;",
62
- "line": 4,
57
+ "line": 3,
63
58
  "match": {
64
59
  "location": "features/step_definitions/lib_steps/steps_definition.rb:1"
65
60
  },
66
61
  "result": {
67
- "status": "passed",
68
- "duration": 12431607000
62
+ "status": "skipped",
63
+ "duration": 0
69
64
  },
70
- "status": "passed",
71
- "duration": 12431607000
65
+ "status": "skipped",
66
+ "duration": 0
72
67
  }
73
68
  ],
74
69
  "after": [
@@ -78,10 +73,10 @@
78
73
  },
79
74
  "result": {
80
75
  "status": "passed",
81
- "duration": 32000
76
+ "duration": 9000
82
77
  },
83
78
  "status": "passed",
84
- "duration": 32000
79
+ "duration": 9000
85
80
  },
86
81
  {
87
82
  "match": {
@@ -89,38 +84,44 @@
89
84
  },
90
85
  "result": {
91
86
  "status": "passed",
92
- "duration": 167338000
87
+ "duration": 8000
93
88
  },
94
89
  "status": "passed",
95
- "duration": 167338000
90
+ "duration": 8000
96
91
  }
97
92
  ],
98
- "status": "passed",
99
- "duration": 15588261000
93
+ "status": "failed",
94
+ "duration": 1670000
100
95
  }
101
96
  ],
102
- "status": "working",
103
- "duration": 15588261000
97
+ "status": "broken",
98
+ "duration": 1670000
104
99
  },
105
100
  {
106
- "uri": "features/TestSuite/WebGUI_copy.feature",
107
- "id": "feature-name",
101
+ "uri": "features/TestSuite/WebGUI.feature",
102
+ "id": "feature-2",
108
103
  "keyword": "Feature",
109
- "name": "feature name",
104
+ "name": "feature 2",
110
105
  "description": "",
111
- "line": 1,
106
+ "line": 2,
107
+ "tags": [
108
+ {
109
+ "name": "@test1",
110
+ "line": 1
111
+ }
112
+ ],
112
113
  "elements": [
113
114
  {
114
- "id": "feature-name;scenario-name",
115
+ "id": "feature-2;scenario-2",
115
116
  "keyword": "Scenario",
116
- "name": "scenario name",
117
+ "name": "scenario 2",
117
118
  "description": "",
118
119
  "line": 3,
119
120
  "type": "scenario",
120
121
  "tags": [
121
122
  {
122
- "name": "@tag_name",
123
- "line": 2
123
+ "name": "@test1",
124
+ "line": 1
124
125
  }
125
126
  ],
126
127
  "before": [
@@ -130,10 +131,10 @@
130
131
  },
131
132
  "result": {
132
133
  "status": "passed",
133
- "duration": 18000
134
+ "duration": 27000
134
135
  },
135
136
  "status": "passed",
136
- "duration": 18000
137
+ "duration": 27000
137
138
  },
138
139
  {
139
140
  "match": {
@@ -141,37 +142,38 @@
141
142
  },
142
143
  "result": {
143
144
  "status": "passed",
144
- "duration": 15000
145
+ "duration": 26000
145
146
  },
146
147
  "status": "passed",
147
- "duration": 15000
148
+ "duration": 26000
148
149
  },
149
150
  {
150
151
  "match": {
151
152
  "location": "features/support/hooks.rb:1"
152
153
  },
153
154
  "result": {
154
- "status": "passed",
155
- "duration": 25900000
155
+ "status": "failed",
156
+ "error_message": "\n>>> Error: undefined method `capabilities' for [\"browserName: firefox\", \"record_video: MAC OSX 10\"]:Array (RuntimeError)\n./features/support/hooks.rb:7:in `rescue in block in <top (required)>'\n./features/support/hooks.rb:2:in `Before'",
157
+ "duration": 16768000
156
158
  },
157
- "status": "passed",
158
- "duration": 25900000
159
+ "status": "failed",
160
+ "duration": 16768000
159
161
  }
160
162
  ],
161
163
  "steps": [
162
164
  {
163
165
  "keyword": "Given ",
164
- "name": "I open the page &quot;http://rubygems.org&quot;",
166
+ "name": "I open the page &quot;http://infodation.vn&quot;",
165
167
  "line": 4,
166
168
  "match": {
167
169
  "location": "features/step_definitions/lib_steps/steps_definition.rb:1"
168
170
  },
169
171
  "result": {
170
- "status": "passed",
171
- "duration": 10623418000
172
+ "status": "skipped",
173
+ "duration": 0
172
174
  },
173
- "status": "passed",
174
- "duration": 10623418000
175
+ "status": "skipped",
176
+ "duration": 0
175
177
  }
176
178
  ],
177
179
  "after": [
@@ -181,10 +183,10 @@
181
183
  },
182
184
  "result": {
183
185
  "status": "passed",
184
- "duration": 23000
186
+ "duration": 17000
185
187
  },
186
188
  "status": "passed",
187
- "duration": 23000
189
+ "duration": 17000
188
190
  },
189
191
  {
190
192
  "match": {
@@ -192,17 +194,17 @@
192
194
  },
193
195
  "result": {
194
196
  "status": "passed",
195
- "duration": 157374000
197
+ "duration": 14000
196
198
  },
197
199
  "status": "passed",
198
- "duration": 157374000
200
+ "duration": 14000
199
201
  }
200
202
  ],
201
- "status": "passed",
202
- "duration": 10806748000
203
+ "status": "failed",
204
+ "duration": 16852000
203
205
  }
204
206
  ],
205
- "status": "working",
206
- "duration": 10806748000
207
+ "status": "broken",
208
+ "duration": 16852000
207
209
  }
208
210
  ]
@@ -0,0 +1,17 @@
1
+ ---
2
+ server_url: http://localhost:4444/wd/hub
3
+ browser_caps:
4
+ chrome:
5
+ - browserName: chrome
6
+ - platform: Windows 10
7
+ - javascriptEnabled: 'false'
8
+ - screenResolution: 1024×768
9
+ - record_video: 'false'
10
+ - timezone: GMT+06:00
11
+ firefox:
12
+ - browserName: firefox
13
+ - platform: Windows 10
14
+ - javascriptEnabled: 'false'
15
+ - screenResolution: 1024×768
16
+ - record_video: 'false'
17
+ - timezone: GMT+06:00
@@ -1,7 +1,7 @@
1
1
  server_url: "https://<user>:<token>@hub.lambdatest.com/wd/hub"
2
2
 
3
3
  browser_caps:
4
- -
4
+ chrome:
5
5
  "browserName": "chrome"
6
6
  "version": "73.0"
7
7
  "platform": "Windows 10"
@@ -1,4 +1,4 @@
1
- Feature: feature name
2
- @tag_name
3
- Scenario: scenario name
4
- Given I open the page "http://rubygems.org"
1
+ @test1
2
+ Feature: feature 2
3
+ Scenario: scenario 2
4
+ Given I open the page "http://infodation.vn"
@@ -1,4 +1,3 @@
1
- Feature: feature name
2
- @tag_name
3
- Scenario: scenario name
1
+ Feature: feature 1
2
+ Scenario: scenario 1
4
3
  Given I open the page "http://rubygems.org"
@@ -1,4 +1,4 @@
1
1
  And /I open the page "(.*)"/ do |page|
2
2
  execute_openbrowser(page)
3
- sleep 10
3
+ sleep "10".to_i
4
4
  end
@@ -6,7 +6,17 @@ $screenshot = $base_dir + '/features/Screenshot/'
6
6
  $PARAMS = YAML.load_file("#{$test_data_dir}/globalData.yml")
7
7
  $OBJECT = YAML.load_file("#{$base_dir}/features/step_definitions/repositories/project_object.yml")
8
8
  CONFIG_NAME = ENV['CONFIG_NAME']
9
- CONFIG = YAML.load(File.read(File.join(File.dirname(__FILE__), "../../config/#{CONFIG_NAME}.config.yml")))
9
+ if %w(server local).include? ENV['CONFIG_NAME']
10
+ server_env = ENV['CONFIG_NAME']
11
+ else
12
+ raise "ERROR: CONFIG_NAME should be: server || local"
13
+ end
14
+ if %w(chrome firefox safari internet_explorer opera edge).include? ENV['BROWSER']
15
+ @browser_name = ENV['BROWSER']
16
+ else
17
+ raise "ERROR: BROWSER should be: chrome || firefox || safari || internet_explorer || opera || edge"
18
+ end
19
+ BROWSER_CONFIG = YAML.load(File.read(File.join(File.dirname(__FILE__), "../../config/#{CONFIG_NAME}_browser_config.yml")))
10
20
  STDOUT.sync = true
11
21
  require 'rubygems'
12
22
  require 'capybara'
@@ -18,12 +28,7 @@ require 'Ifd_Automation'
18
28
  require 'report_builder'
19
29
  require "#{$current_dir}/itms_action.rb"
20
30
  itms_action = ITMS.new
21
- if
22
- %w(server local).include? ENV['CONFIG_NAME']
23
- server_env = ENV['CONFIG_NAME']
24
- else
25
- raise "ERROR: CONFIG_NAME should be: server || local"
26
- end
31
+
27
32
  if ENV['EXECUTE']
28
33
  if ENV['TESTSUITE'] && ENV['TESTCASE_REPORT_NAME']
29
34
  @report_path = "Reports/#{ENV['TESTSUITE']}"
@@ -36,18 +41,16 @@ end
36
41
  $_CFWEB['Wait Time'] = ENV["WAIT_TIME"] || 30
37
42
  $_CFWEB['Print Log'] = ENV["PRINT_LOG"] || false
38
43
  $_CFWEB['Maximize Browser'] = ENV["MAXIMIZE_BROWSER"] || true
39
- SELENIUM_SERVER_URL = ENV['SERVER_URL'] || CONFIG['server_url']
40
- TASK_ID = (ENV['TASK_ID'] || 0).to_i
44
+ SELENIUM_SERVER_URL = BROWSER_CONFIG['server_url'] || ENV['SERVER_URL']
45
+ BROWSER_CAPS = BROWSER_CONFIG['browser_caps'][ENV['BROWSER']]
41
46
  if CONFIG_NAME == "local"
42
47
  itms_action.getServerStatus(SELENIUM_SERVER_URL)
43
48
  end
44
-
45
49
  Capybara.register_driver :selenium do |app|
46
- @caps = CONFIG['browser_caps'][TASK_ID].merge(build: "INFOdation Test Management System")
47
50
  Capybara::Selenium::Driver.new(app,
48
51
  :browser => :remote,
49
52
  :url => SELENIUM_SERVER_URL,
50
- :desired_capabilities => @caps
53
+ :desired_capabilities => Hash[*BROWSER_CAPS.flatten]
51
54
  )
52
55
  end
53
56
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.9
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -131,6 +131,9 @@ dependencies:
131
131
  requirement: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '3.8'
136
+ - - ">="
134
137
  - !ruby/object:Gem::Version
135
138
  version: 3.8.0
136
139
  type: :runtime
@@ -138,6 +141,9 @@ dependencies:
138
141
  version_requirements: !ruby/object:Gem::Requirement
139
142
  requirements:
140
143
  - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.8'
146
+ - - ">="
141
147
  - !ruby/object:Gem::Version
142
148
  version: 3.8.0
143
149
  - !ruby/object:Gem::Dependency
@@ -236,12 +242,12 @@ files:
236
242
  - project/Gemfile.lock
237
243
  - project/README.md
238
244
  - project/Rakefile
239
- - project/Reports/testsuite_AP/TEST-features-TestSuite-WebGUI.xml
240
- - project/Reports/testsuite_AP/TEST-features-TestSuite-WebGUI_copy.xml
241
- - project/Reports/testsuite_AP/anhpham.html
242
- - project/Reports/testsuite_AP/anhpham.json
243
- - project/config/local.config.yml
244
- - project/config/server.config.yml
245
+ - project/Reports/anhpham/TEST-features-TestSuite-WebGUI.xml
246
+ - project/Reports/anhpham/TEST-features-TestSuite-WebGUI_copy.xml
247
+ - project/Reports/anhpham/abc_report.html
248
+ - project/Reports/anhpham/abc_report.json
249
+ - project/config/local_browser_config.yml
250
+ - project/config/server_browser_config.yml
245
251
  - project/cucumber.yml
246
252
  - project/features/TestData/globalData.yml
247
253
  - project/features/TestSuite/WebGUI.feature
@@ -271,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
271
277
  version: '0'
272
278
  requirements: []
273
279
  rubyforge_project:
274
- rubygems_version: 2.7.6
280
+ rubygems_version: 2.5.2.3
275
281
  signing_key:
276
282
  specification_version: 4
277
283
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuite failures="0" errors="0" skipped="0" tests="1" time="15.602640" name="feature name">
3
- <testcase classname="feature name" name="scenario name" time="15.602640">
4
- <system-out>
5
- <![CDATA[]]>
6
- </system-out>
7
- <system-err>
8
- <![CDATA[]]>
9
- </system-err>
10
- </testcase>
11
- </testsuite>
@@ -1,11 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuite failures="0" errors="0" skipped="0" tests="1" time="10.808264" name="feature name">
3
- <testcase classname="feature name" name="scenario name" time="10.808264">
4
- <system-out>
5
- <![CDATA[]]>
6
- </system-out>
7
- <system-err>
8
- <![CDATA[]]>
9
- </system-err>
10
- </testcase>
11
- </testsuite>
@@ -1,15 +0,0 @@
1
- server_url: http://localhost:4444/wd/hub
2
-
3
- browser_caps:
4
- -
5
- "browserName": "chrome"
6
- "video": false
7
- "network": true
8
- "console": true
9
- "visual": true
10
- -
11
- "browserName": "firefox"
12
- "video": true
13
- "network": true
14
- "console": true
15
- "visual": true