Ifd_Automation 2.9.8 → 2.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Ifd_Automation/version.rb +1 -1
- data/project/Gemfile +2 -1
- data/project/Gemfile.lock +121 -0
- data/project/Rakefile +34 -0
- data/project/Reports/testsuite_AP/TEST-features-TestSuite-WebGUI.xml +11 -0
- data/project/Reports/testsuite_AP/TEST-features-TestSuite-WebGUI_copy.xml +11 -0
- data/project/Reports/testsuite_AP/anhpham.html +157 -0
- data/project/Reports/testsuite_AP/anhpham.json +208 -0
- data/project/config/local.config.yml +15 -0
- data/project/config/server.config.yml +11 -0
- data/project/cucumber.yml +4 -6
- data/project/features/TestSuite/WebGUI.feature +4 -4
- data/project/features/TestSuite/WebGUI_copy.feature +4 -0
- data/project/features/step_definitions/lib_steps/steps_definition.rb +2 -3
- data/project/features/support/env.rb +37 -39
- data/project/features/support/hooks.rb +32 -5
- data/project/features/support/itms_action.rb +19 -0
- metadata +32 -3
- data/project/features/support/project_config.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57ab0f48029f2bfe9a2910342715fcba642521533e5e7733dd6b7ae7a8484ef8
|
4
|
+
data.tar.gz: 1da106099178075dc26a534e57b6f4c6dea84888ee45bb795236cfb1eeb32417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b688d0f7144a4feff96cba624c0fcac01c4265ee1c0e9f38871627d55e3d4118ae5b041d569abcd7050211ef997340667c458e78d0a50bfa9d37d5cea14d3d
|
7
|
+
data.tar.gz: 44ccb3e66973a25e6ff0aac750ccf6144be28df5aad9441dddf3de9db73a1d03b59ec2a5bd724d72c13119d6d0d3ee7daa2ecbfaec270b7908b0a129a79c9d4a
|
data/project/Gemfile
CHANGED
@@ -0,0 +1,121 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
Ifd_Automation (2.9.9)
|
5
|
+
capybara (~> 2.7, >= 2.7.1)
|
6
|
+
cucumber (~> 3.1)
|
7
|
+
cucumber_priority (~> 0.3.2)
|
8
|
+
httparty (~> 0.15.6)
|
9
|
+
jsonpath (~> 0.5.8)
|
10
|
+
net-ssh (~> 3.2)
|
11
|
+
parallel_tests (~> 2.7, >= 2.7.1)
|
12
|
+
report_builder (~> 1.8, >= 1.8)
|
13
|
+
rspec (~> 3.8.0)
|
14
|
+
savon (~> 2.11, >= 2.11.1)
|
15
|
+
selenium-webdriver (~> 3.6, >= 3.6.0)
|
16
|
+
addressable (2.6.0)
|
17
|
+
public_suffix (>= 2.0.2, < 4.0)
|
18
|
+
akami (1.3.1)
|
19
|
+
gyoku (>= 0.4.0)
|
20
|
+
nokogiri
|
21
|
+
backports (3.13.0)
|
22
|
+
builder (3.2.3)
|
23
|
+
capybara (2.18.0)
|
24
|
+
addressable
|
25
|
+
mini_mime (>= 0.1.3)
|
26
|
+
nokogiri (>= 1.3.3)
|
27
|
+
rack (>= 1.0.0)
|
28
|
+
rack-test (>= 0.5.4)
|
29
|
+
xpath (>= 2.0, < 4.0)
|
30
|
+
childprocess (0.9.0)
|
31
|
+
ffi (~> 1.0, >= 1.0.11)
|
32
|
+
cucumber (3.1.2)
|
33
|
+
builder (>= 2.1.2)
|
34
|
+
cucumber-core (~> 3.2.0)
|
35
|
+
cucumber-expressions (~> 6.0.1)
|
36
|
+
cucumber-wire (~> 0.0.1)
|
37
|
+
diff-lcs (~> 1.3)
|
38
|
+
gherkin (~> 5.1.0)
|
39
|
+
multi_json (>= 1.7.5, < 2.0)
|
40
|
+
multi_test (>= 0.1.2)
|
41
|
+
cucumber-core (3.2.1)
|
42
|
+
backports (>= 3.8.0)
|
43
|
+
cucumber-tag_expressions (~> 1.1.0)
|
44
|
+
gherkin (~> 5.0)
|
45
|
+
cucumber-expressions (6.0.1)
|
46
|
+
cucumber-tag_expressions (1.1.1)
|
47
|
+
cucumber-wire (0.0.1)
|
48
|
+
cucumber_priority (0.3.2)
|
49
|
+
cucumber
|
50
|
+
diff-lcs (1.3)
|
51
|
+
ffi (1.10.0)
|
52
|
+
gherkin (5.1.0)
|
53
|
+
gyoku (1.3.1)
|
54
|
+
builder (>= 2.1.2)
|
55
|
+
httparty (0.15.7)
|
56
|
+
multi_xml (>= 0.5.2)
|
57
|
+
httpi (2.4.4)
|
58
|
+
rack
|
59
|
+
socksify
|
60
|
+
json (2.2.0)
|
61
|
+
jsonpath (0.5.8)
|
62
|
+
multi_json
|
63
|
+
mini_mime (1.0.1)
|
64
|
+
mini_portile2 (2.4.0)
|
65
|
+
multi_json (1.13.1)
|
66
|
+
multi_test (0.1.2)
|
67
|
+
multi_xml (0.6.0)
|
68
|
+
net-ssh (3.2.0)
|
69
|
+
nokogiri (1.10.3)
|
70
|
+
mini_portile2 (~> 2.4.0)
|
71
|
+
nori (2.6.0)
|
72
|
+
parallel (1.17.0)
|
73
|
+
parallel_tests (2.29.0)
|
74
|
+
parallel
|
75
|
+
public_suffix (3.0.3)
|
76
|
+
rack (2.0.7)
|
77
|
+
rack-test (1.1.0)
|
78
|
+
rack (>= 1.0, < 3)
|
79
|
+
report_builder (1.8)
|
80
|
+
json (>= 1.8.1)
|
81
|
+
rspec (3.8.0)
|
82
|
+
rspec-core (~> 3.8.0)
|
83
|
+
rspec-expectations (~> 3.8.0)
|
84
|
+
rspec-mocks (~> 3.8.0)
|
85
|
+
rspec-core (3.8.0)
|
86
|
+
rspec-support (~> 3.8.0)
|
87
|
+
rspec-expectations (3.8.2)
|
88
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
89
|
+
rspec-support (~> 3.8.0)
|
90
|
+
rspec-mocks (3.8.0)
|
91
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
92
|
+
rspec-support (~> 3.8.0)
|
93
|
+
rspec-support (3.8.0)
|
94
|
+
rubyzip (1.2.2)
|
95
|
+
savon (2.12.0)
|
96
|
+
akami (~> 1.2)
|
97
|
+
builder (>= 2.1.2)
|
98
|
+
gyoku (~> 1.2)
|
99
|
+
httpi (~> 2.3)
|
100
|
+
nokogiri (>= 1.8.1)
|
101
|
+
nori (~> 2.4)
|
102
|
+
wasabi (~> 3.4)
|
103
|
+
selenium-webdriver (3.141.0)
|
104
|
+
childprocess (~> 0.5)
|
105
|
+
rubyzip (~> 1.2, >= 1.2.2)
|
106
|
+
socksify (1.7.1)
|
107
|
+
wasabi (3.5.0)
|
108
|
+
httpi (~> 2.0)
|
109
|
+
nokogiri (>= 1.4.2)
|
110
|
+
xpath (3.2.0)
|
111
|
+
nokogiri (~> 1.8)
|
112
|
+
|
113
|
+
PLATFORMS
|
114
|
+
ruby
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
Ifd_Automation
|
118
|
+
report_builder
|
119
|
+
|
120
|
+
BUNDLED WITH
|
121
|
+
2.0.1
|
data/project/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'cucumber'
|
5
|
+
require 'cucumber/rake/task'
|
6
|
+
testsuite_name = ENV['TESTSUITE']
|
7
|
+
testcase_report_name = ENV['TESTCASE_REPORT_NAME']
|
8
|
+
report_path = "Reports/#{testsuite_name}"
|
9
|
+
|
10
|
+
local_opts = [ "--color", "--no-source","CONFIG_NAME=local"]
|
11
|
+
server_opts = [ "--color", "--no-source","CONFIG_NAME=server"]
|
12
|
+
junit_opts = ["--format junit", "--out #{report_path}"]
|
13
|
+
namespace :ITMS_DEBUG do
|
14
|
+
Cucumber::Rake::Task.new(:local, "Debug on local environment") do |t|
|
15
|
+
t.cucumber_opts = [*local_opts, "ITMS_DEBUG=true"]
|
16
|
+
end
|
17
|
+
Cucumber::Rake::Task.new(:server, "Debug on cloud browser") do |t|
|
18
|
+
t.cucumber_opts = [*server_opts, "ITMS_DEBUG=true"]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
namespace :EXECUTE do
|
22
|
+
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"]
|
24
|
+
end
|
25
|
+
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"]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
rescue LoadError
|
30
|
+
desc 'Cucumber rake task not available'
|
31
|
+
task :features do
|
32
|
+
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,11 @@
|
|
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>
|
@@ -0,0 +1,11 @@
|
|
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>
|
@@ -0,0 +1,157 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>INFOdation Test Management System</title><link rel="icon" href="https://reportbuilder.rajatthareja.com/rb.ico">
|
6
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
7
|
+
<link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet">
|
8
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" media="screen,projection"/>
|
9
|
+
<link href="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.8/css/report.builder.min.css" rel="stylesheet">
|
10
|
+
</head><body>
|
11
|
+
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
12
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
|
13
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script>
|
14
|
+
<script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script><header class="blue lighten-5">
|
15
|
+
<div class="row blue lighten-1">
|
16
|
+
<div class="col m6 hide-on-small-only">
|
17
|
+
<h5 class="truncate white-text tooltipped" data-tooltip="INFOdation Test Management System">INFOdation Test Management System</h5>
|
18
|
+
</div><div class="col m6 s12 blue lighten-1">
|
19
|
+
<ul class="tabs blue lighten-1 row" style="overflow-x: hidden">
|
20
|
+
<li class="tab col s3">
|
21
|
+
<a class="blue lighten-3 active blue-text waves-effect waves-light tooltipped" data-tooltip="Results Overview" href="#overview"><i class="material-icons">assessment</i> Overview</a>
|
22
|
+
</li>
|
23
|
+
<li class="tab col s3">
|
24
|
+
<a class="blue lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Scenarios by Features" href="#features"><i class="material-icons">view_headline</i> Features</a>
|
25
|
+
</li>
|
26
|
+
<li class="tab col s3">
|
27
|
+
<a class="blue lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Scenarios Summary Table" href="#summary"><i class="material-icons">view_comfy</i> Summary</a>
|
28
|
+
</li>
|
29
|
+
<li class="tab col s3">
|
30
|
+
<a class="blue lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Failed Scenarios" href="#errors"><i class="material-icons">bug_report</i> Errors</a>
|
31
|
+
</li>
|
32
|
+
</ul>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
</header>
|
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 "http://rubygems.org" (12.432s)</li>
|
41
|
+
</ul>
|
42
|
+
</div><div class="modal-footer">
|
43
|
+
<span class="modal-action modal-close waves-effect waves-green btn-flat"><i class="material-icons">close</i></span>
|
44
|
+
</div>
|
45
|
+
</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 "http://rubygems.org" (10.623s)</li>
|
50
|
+
</ul>
|
51
|
+
</div><div class="modal-footer">
|
52
|
+
<span class="modal-action modal-close waves-effect waves-green btn-flat"><i class="material-icons">close</i></span>
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<script type="text/javascript">
|
56
|
+
$(document).ready(function () {$('#g0f0s0').modal();$('#g0f0s1').modal();$('#g0f1s0').modal();$('#g0f1s1').modal();});
|
57
|
+
</script>
|
58
|
+
<main class="blue lighten-5">
|
59
|
+
<div class="row"><div id="overview" class="col s12 blue lighten-5">
|
60
|
+
<div class="row">
|
61
|
+
<div class="col m4 s12">
|
62
|
+
<canvas id="featuresDoughnut" width="400" height="400"></canvas>
|
63
|
+
<table id="metaDataFeatures" class="bordered">
|
64
|
+
<tbody></tbody>
|
65
|
+
</table>
|
66
|
+
</div><div class="col m4 s12">
|
67
|
+
<canvas id="scenariosDoughnut" width="400" height="400"></canvas>
|
68
|
+
<table id="metaDataScenarios" class="bordered">
|
69
|
+
<tbody></tbody>
|
70
|
+
</table>
|
71
|
+
</div><div class="col m4 s12">
|
72
|
+
<table id="metaData" class="bordered">
|
73
|
+
<tbody>
|
74
|
+
<tr><th>Total Time</th><td>26.395s</td></tr><tr>
|
75
|
+
<th>Browser</th>
|
76
|
+
<td>chrome</td>
|
77
|
+
</tr><tr>
|
78
|
+
<th>Platform</th>
|
79
|
+
<td>linux</td>
|
80
|
+
</tr><tr>
|
81
|
+
<th>Browser Version</th>
|
82
|
+
<td>73.0.3683.86</td>
|
83
|
+
</tr><tr>
|
84
|
+
<th>Report Generated</th>
|
85
|
+
<td>2019-05-28 07:03:47 UTC</td>
|
86
|
+
</tr></tbody>
|
87
|
+
</table>
|
88
|
+
</div>
|
89
|
+
</div></div><div id="features" class="col s12 blue lighten-5 white-text">
|
90
|
+
<ul class="featureList collapsible popout" data-collapsible="expandable">
|
91
|
+
<li class="feature working">
|
92
|
+
<div class="collapsible-header blue lighten-1 waves-effect waves-light">
|
93
|
+
<i class="material-icons">featured_play_list</i>
|
94
|
+
<b>Feature</b> feature name (15.588s)
|
95
|
+
</div><div class="collapsible-body blue lighten-4">
|
96
|
+
<ul class="collection scenarioList"><li class="collection-item scenario passed">
|
97
|
+
<a class="waves-effect waves-light modal-trigger white-text" href="#g0f0s0">
|
98
|
+
<b>Scenario</b> scenario name (15.588s)
|
99
|
+
</a>
|
100
|
+
</li></ul>
|
101
|
+
</div>
|
102
|
+
</li><li class="feature working">
|
103
|
+
<div class="collapsible-header blue lighten-1 waves-effect waves-light">
|
104
|
+
<i class="material-icons">featured_play_list</i>
|
105
|
+
<b>Feature</b> feature name (10.807s)
|
106
|
+
</div><div class="collapsible-body blue lighten-4">
|
107
|
+
<ul class="collection scenarioList"><li class="collection-item scenario passed">
|
108
|
+
<a class="waves-effect waves-light modal-trigger white-text" href="#g0f1s0">
|
109
|
+
<b>Scenario</b> scenario name (10.807s)
|
110
|
+
</a>
|
111
|
+
</li></ul>
|
112
|
+
</div>
|
113
|
+
</li>
|
114
|
+
</ul></div><div id="summary" class="col s12 blue lighten-5">
|
115
|
+
<table id="summaryTable" class="bordered blue lighten-1 white-text" width="100%">
|
116
|
+
<thead>
|
117
|
+
<tr>
|
118
|
+
<th class="hide-on-small-only">Feature</th>
|
119
|
+
<th>Scenario</th>
|
120
|
+
<th class="hide">Tags</th>
|
121
|
+
<th>Status</th>
|
122
|
+
<th class="hide-on-small-only">Error</th>
|
123
|
+
</tr>
|
124
|
+
</thead>
|
125
|
+
<tbody><tr class="passed">
|
126
|
+
<td class="hide-on-small-only">
|
127
|
+
feature name
|
128
|
+
</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
|
134
|
+
</td><td class="hide-on-small-only"></td></tr>
|
135
|
+
<tr class="passed">
|
136
|
+
<td class="hide-on-small-only">
|
137
|
+
feature name
|
138
|
+
</td><td class="hoverable">
|
139
|
+
<a class="modal-trigger white-text" href="#g0f1s0">scenario name</a>
|
140
|
+
</td><td class="hide">
|
141
|
+
@tag_name.
|
142
|
+
</td><td class="uppercase">
|
143
|
+
passed
|
144
|
+
</td><td class="hide-on-small-only"></td></tr>
|
145
|
+
</tbody>
|
146
|
+
</table></div><div id="errors" class="col s12 blue lighten-5">
|
147
|
+
<ul class="errorList collapsible popout" data-collapsible="expandable"></ul></div>
|
148
|
+
</div>
|
149
|
+
</main><footer class="page-footer blue lighten-4">
|
150
|
+
<div class="footer-copyright blue lighten-1">
|
151
|
+
<div class="container">
|
152
|
+
Happy Reporting!
|
153
|
+
<a class="white-text text-lighten-4 right" href="https://reportbuilder.rajatthareja.com">Generated by Report Builder</a>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
</footer><script type="text/javascript" src="https://cdn.rawgit.com/rajatthareja/ReportBuilder/v1.8/js/report.builder.min.js"></script></body>
|
157
|
+
</html>
|
@@ -0,0 +1,208 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"uri": "features/TestSuite/WebGUI.feature",
|
4
|
+
"id": "feature-name",
|
5
|
+
"keyword": "Feature",
|
6
|
+
"name": "feature name",
|
7
|
+
"description": "",
|
8
|
+
"line": 1,
|
9
|
+
"elements": [
|
10
|
+
{
|
11
|
+
"id": "feature-name;scenario-name",
|
12
|
+
"keyword": "Scenario",
|
13
|
+
"name": "scenario name",
|
14
|
+
"description": "",
|
15
|
+
"line": 3,
|
16
|
+
"type": "scenario",
|
17
|
+
"tags": [
|
18
|
+
{
|
19
|
+
"name": "@tag_name",
|
20
|
+
"line": 2
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"before": [
|
24
|
+
{
|
25
|
+
"match": {
|
26
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:13"
|
27
|
+
},
|
28
|
+
"result": {
|
29
|
+
"status": "passed",
|
30
|
+
"duration": 21000
|
31
|
+
},
|
32
|
+
"status": "passed",
|
33
|
+
"duration": 21000
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"match": {
|
37
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:21"
|
38
|
+
},
|
39
|
+
"result": {
|
40
|
+
"status": "passed",
|
41
|
+
"duration": 18000
|
42
|
+
},
|
43
|
+
"status": "passed",
|
44
|
+
"duration": 18000
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"match": {
|
48
|
+
"location": "features/support/hooks.rb:1"
|
49
|
+
},
|
50
|
+
"result": {
|
51
|
+
"status": "passed",
|
52
|
+
"duration": 2989245000
|
53
|
+
},
|
54
|
+
"status": "passed",
|
55
|
+
"duration": 2989245000
|
56
|
+
}
|
57
|
+
],
|
58
|
+
"steps": [
|
59
|
+
{
|
60
|
+
"keyword": "Given ",
|
61
|
+
"name": "I open the page "http://rubygems.org"",
|
62
|
+
"line": 4,
|
63
|
+
"match": {
|
64
|
+
"location": "features/step_definitions/lib_steps/steps_definition.rb:1"
|
65
|
+
},
|
66
|
+
"result": {
|
67
|
+
"status": "passed",
|
68
|
+
"duration": 12431607000
|
69
|
+
},
|
70
|
+
"status": "passed",
|
71
|
+
"duration": 12431607000
|
72
|
+
}
|
73
|
+
],
|
74
|
+
"after": [
|
75
|
+
{
|
76
|
+
"match": {
|
77
|
+
"location": "features/support/hooks.rb:11"
|
78
|
+
},
|
79
|
+
"result": {
|
80
|
+
"status": "passed",
|
81
|
+
"duration": 32000
|
82
|
+
},
|
83
|
+
"status": "passed",
|
84
|
+
"duration": 32000
|
85
|
+
},
|
86
|
+
{
|
87
|
+
"match": {
|
88
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:9"
|
89
|
+
},
|
90
|
+
"result": {
|
91
|
+
"status": "passed",
|
92
|
+
"duration": 167338000
|
93
|
+
},
|
94
|
+
"status": "passed",
|
95
|
+
"duration": 167338000
|
96
|
+
}
|
97
|
+
],
|
98
|
+
"status": "passed",
|
99
|
+
"duration": 15588261000
|
100
|
+
}
|
101
|
+
],
|
102
|
+
"status": "working",
|
103
|
+
"duration": 15588261000
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"uri": "features/TestSuite/WebGUI_copy.feature",
|
107
|
+
"id": "feature-name",
|
108
|
+
"keyword": "Feature",
|
109
|
+
"name": "feature name",
|
110
|
+
"description": "",
|
111
|
+
"line": 1,
|
112
|
+
"elements": [
|
113
|
+
{
|
114
|
+
"id": "feature-name;scenario-name",
|
115
|
+
"keyword": "Scenario",
|
116
|
+
"name": "scenario name",
|
117
|
+
"description": "",
|
118
|
+
"line": 3,
|
119
|
+
"type": "scenario",
|
120
|
+
"tags": [
|
121
|
+
{
|
122
|
+
"name": "@tag_name",
|
123
|
+
"line": 2
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"before": [
|
127
|
+
{
|
128
|
+
"match": {
|
129
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:13"
|
130
|
+
},
|
131
|
+
"result": {
|
132
|
+
"status": "passed",
|
133
|
+
"duration": 18000
|
134
|
+
},
|
135
|
+
"status": "passed",
|
136
|
+
"duration": 18000
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"match": {
|
140
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:21"
|
141
|
+
},
|
142
|
+
"result": {
|
143
|
+
"status": "passed",
|
144
|
+
"duration": 15000
|
145
|
+
},
|
146
|
+
"status": "passed",
|
147
|
+
"duration": 15000
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"match": {
|
151
|
+
"location": "features/support/hooks.rb:1"
|
152
|
+
},
|
153
|
+
"result": {
|
154
|
+
"status": "passed",
|
155
|
+
"duration": 25900000
|
156
|
+
},
|
157
|
+
"status": "passed",
|
158
|
+
"duration": 25900000
|
159
|
+
}
|
160
|
+
],
|
161
|
+
"steps": [
|
162
|
+
{
|
163
|
+
"keyword": "Given ",
|
164
|
+
"name": "I open the page "http://rubygems.org"",
|
165
|
+
"line": 4,
|
166
|
+
"match": {
|
167
|
+
"location": "features/step_definitions/lib_steps/steps_definition.rb:1"
|
168
|
+
},
|
169
|
+
"result": {
|
170
|
+
"status": "passed",
|
171
|
+
"duration": 10623418000
|
172
|
+
},
|
173
|
+
"status": "passed",
|
174
|
+
"duration": 10623418000
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"after": [
|
178
|
+
{
|
179
|
+
"match": {
|
180
|
+
"location": "features/support/hooks.rb:11"
|
181
|
+
},
|
182
|
+
"result": {
|
183
|
+
"status": "passed",
|
184
|
+
"duration": 23000
|
185
|
+
},
|
186
|
+
"status": "passed",
|
187
|
+
"duration": 23000
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"match": {
|
191
|
+
"location": "capybara-2.18.0/lib/capybara/cucumber.rb:9"
|
192
|
+
},
|
193
|
+
"result": {
|
194
|
+
"status": "passed",
|
195
|
+
"duration": 157374000
|
196
|
+
},
|
197
|
+
"status": "passed",
|
198
|
+
"duration": 157374000
|
199
|
+
}
|
200
|
+
],
|
201
|
+
"status": "passed",
|
202
|
+
"duration": 10806748000
|
203
|
+
}
|
204
|
+
],
|
205
|
+
"status": "working",
|
206
|
+
"duration": 10806748000
|
207
|
+
}
|
208
|
+
]
|
@@ -0,0 +1,15 @@
|
|
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
|
data/project/cucumber.yml
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
junit_report: -f progress -f junit -o Report
|
6
|
-
html_report: -f progress -f html -o Report
|
1
|
+
chrome: BROWSER=chrome
|
2
|
+
firefox: BROWSER=firefox
|
3
|
+
ie: BROWSER=internet_explorer
|
4
|
+
parallel: parallel_cucumber
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Feature:
|
2
|
-
@
|
3
|
-
Scenario:
|
4
|
-
Given I open the
|
1
|
+
Feature: feature name
|
2
|
+
@tag_name
|
3
|
+
Scenario: scenario name
|
4
|
+
Given I open the page "http://rubygems.org"
|
@@ -5,6 +5,8 @@ $test_data_dir = $base_dir + '/features/TestData/'
|
|
5
5
|
$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
|
+
CONFIG_NAME = ENV['CONFIG_NAME']
|
9
|
+
CONFIG = YAML.load(File.read(File.join(File.dirname(__FILE__), "../../config/#{CONFIG_NAME}.config.yml")))
|
8
10
|
STDOUT.sync = true
|
9
11
|
require 'rubygems'
|
10
12
|
require 'capybara'
|
@@ -12,46 +14,42 @@ require 'capybara/cucumber'
|
|
12
14
|
require 'cucumber'
|
13
15
|
require 'yaml'
|
14
16
|
require 'selenium-webdriver'
|
15
|
-
require "#{$current_dir}/project_config.rb"
|
16
17
|
require 'Ifd_Automation'
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
config.default_driver = :selenium
|
26
|
-
config.default_selector = :css
|
27
|
-
config.ignore_hidden_elements = true
|
18
|
+
require 'report_builder'
|
19
|
+
require "#{$current_dir}/itms_action.rb"
|
20
|
+
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"
|
28
26
|
end
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
if ENV['EXECUTE']
|
28
|
+
if ENV['TESTSUITE'] && ENV['TESTCASE_REPORT_NAME']
|
29
|
+
@report_path = "Reports/#{ENV['TESTSUITE']}"
|
30
|
+
@testcase_report_name = ENV['TESTCASE_REPORT_NAME']
|
31
|
+
else
|
32
|
+
raise "ERROR: Missing TESTSUITE || TESTCASE_REPORT_NAME"
|
33
|
+
exit
|
34
34
|
end
|
35
|
-
rescue StandardError => e
|
36
|
-
raise "ERROR: #{e}"
|
37
35
|
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
36
|
+
$_CFWEB['Wait Time'] = ENV["WAIT_TIME"] || 30
|
37
|
+
$_CFWEB['Print Log'] = ENV["PRINT_LOG"] || false
|
38
|
+
$_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
|
41
|
+
if CONFIG_NAME == "local"
|
42
|
+
itms_action.getServerStatus(SELENIUM_SERVER_URL)
|
43
|
+
end
|
44
|
+
|
45
|
+
Capybara.register_driver :selenium do |app|
|
46
|
+
@caps = CONFIG['browser_caps'][TASK_ID].merge(build: "INFOdation Test Management System")
|
47
|
+
Capybara::Selenium::Driver.new(app,
|
48
|
+
:browser => :remote,
|
49
|
+
:url => SELENIUM_SERVER_URL,
|
50
|
+
:desired_capabilities => @caps
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
Capybara.default_driver = :selenium
|
55
|
+
Capybara.run_server = false
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
1
|
Before do
|
3
2
|
begin
|
3
|
+
$browser_data = page.driver.browser.capabilities
|
4
4
|
browser = Capybara.current_session.driver.browser
|
5
5
|
browser.manage.delete_all_cookies
|
6
6
|
rescue StandardError => myStandardError
|
@@ -9,14 +9,41 @@ Before do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
After do |scenario|
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
save_screenshot = ENV['SCREENSHOT'] || false
|
13
|
+
if save_screenshot == true
|
14
|
+
file_name = 'failed_%s.png' % rand(1000).to_s
|
15
|
+
page.save_screenshot($screenshot+file_name) if scenario.failed?
|
15
16
|
begin
|
16
17
|
Capybara.page.driver.quit
|
17
18
|
Capybara.send(:session_pool).delete_if { |key, value| key =~ /selenium/i }
|
18
19
|
rescue StandardError => myStandardError
|
19
20
|
raise "\n>>> Error: #{myStandardError}"
|
20
21
|
end
|
21
|
-
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
at_exit do
|
26
|
+
if ENV['EXECUTE']
|
27
|
+
time = Time.now.getutc
|
28
|
+
if $browser_data
|
29
|
+
browser_name = $browser_data[:browser_name]
|
30
|
+
browser_version = $browser_data[:version]
|
31
|
+
platform = $browser_data[:platform]
|
32
|
+
end
|
33
|
+
ReportBuilder.configure do |config|
|
34
|
+
config.report_path = "#{@report_path}/#{@testcase_report_name}"
|
35
|
+
config.input_path = "#{@report_path}/#{@testcase_report_name}.json"
|
36
|
+
config.report_types = [:json, :html]
|
37
|
+
config.color = 'blue'
|
38
|
+
config.additional_info = {
|
39
|
+
'Browser' => browser_name || nil,
|
40
|
+
'Platform' => platform || nil,
|
41
|
+
'Browser Version' => browser_version || nil,
|
42
|
+
'Report Generated' => time
|
43
|
+
}
|
44
|
+
end
|
45
|
+
options = { report_title: "INFOdation Test Management System" }
|
46
|
+
ReportBuilder.build_report options
|
47
|
+
end
|
22
48
|
end
|
49
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class ITMS
|
2
|
+
def getServerStatus(server_url)
|
3
|
+
require 'net/http'
|
4
|
+
uri = URI("#{server_url}/status")
|
5
|
+
begin
|
6
|
+
res = Net::HTTP.get_response(uri)
|
7
|
+
rescue SocketError
|
8
|
+
puts 'Network connectivity issue'
|
9
|
+
# Network is not 100% reliable
|
10
|
+
rescue Errno::ECONNREFUSED => e
|
11
|
+
puts 'The server is down.'
|
12
|
+
puts e.message
|
13
|
+
rescue Timeout::Error => e
|
14
|
+
puts 'Timeout error occurred.'
|
15
|
+
puts e.message
|
16
|
+
# Retry a few times and fail with timeout error message
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
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.
|
4
|
+
version: 2.9.9
|
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-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -160,6 +160,26 @@ dependencies:
|
|
160
160
|
- - ">="
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: 2.7.1
|
163
|
+
- !ruby/object:Gem::Dependency
|
164
|
+
name: report_builder
|
165
|
+
requirement: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- - "~>"
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '1.8'
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '1.8'
|
173
|
+
type: :runtime
|
174
|
+
prerelease: false
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - "~>"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '1.8'
|
180
|
+
- - ">="
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '1.8'
|
163
183
|
- !ruby/object:Gem::Dependency
|
164
184
|
name: cucumber_priority
|
165
185
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,15 +233,24 @@ files:
|
|
213
233
|
- lib/Ifd_Automation/web_steps.rb
|
214
234
|
- lib/Ifd_Automation/web_steps_helper.rb
|
215
235
|
- project/Gemfile
|
236
|
+
- project/Gemfile.lock
|
216
237
|
- project/README.md
|
238
|
+
- 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
|
217
245
|
- project/cucumber.yml
|
218
246
|
- project/features/TestData/globalData.yml
|
219
247
|
- project/features/TestSuite/WebGUI.feature
|
248
|
+
- project/features/TestSuite/WebGUI_copy.feature
|
220
249
|
- project/features/step_definitions/lib_steps/steps_definition.rb
|
221
250
|
- project/features/step_definitions/repositories/project_object.yml
|
222
251
|
- project/features/support/env.rb
|
223
252
|
- project/features/support/hooks.rb
|
224
|
-
- project/features/support/
|
253
|
+
- project/features/support/itms_action.rb
|
225
254
|
homepage: http://rubygems.org/gems/ifd_automation
|
226
255
|
licenses:
|
227
256
|
- MIT
|
@@ -1,13 +0,0 @@
|
|
1
|
-
$maximize_browser = true
|
2
|
-
$wait_time = 10
|
3
|
-
$print_log = true
|
4
|
-
$record_video = false
|
5
|
-
$default_browser = 'chrome'
|
6
|
-
$selenium_platform = 'LINUX'
|
7
|
-
$selnium_server = 'http://localhost:4444/wd/hub'
|
8
|
-
$capabilities = Selenium::WebDriver::Remote::Capabilities.new
|
9
|
-
$capabilities['platform'] = ENV['SELENIUM_PLATFORM'] || $selenium_platform || 'ANY'
|
10
|
-
$capabilities['recordVideo'] = ENV["recordVideo"] || $record_video || false
|
11
|
-
$capabilities['name'] = ENV["name"] || 'INFOdation Test Management System'
|
12
|
-
$capabilities['browserName'] = ENV['SELENIUM_BROWSER'] || $default_browser || 'chrome'
|
13
|
-
$capabilities['version'] = ENV['SELENIUM_VERSION'] if ENV['SELENIUM_VERSION']
|