itms_automation 2.5 → 2.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/bin/generate.rb +3 -37
  3. data/bin/helper.rb +23 -10
  4. data/bin/itms_automation +18 -23
  5. data/doc/installation.md +16 -0
  6. data/doc/itms-automation-API.md +103 -0
  7. data/doc/itms-automation-help.md +18 -0
  8. data/example/android/android_app/android_app_calculator.zip +0 -0
  9. data/example/android/android_app/android_app_calculator/AndroidCalculator.apk +0 -0
  10. data/example/android/android_app/android_app_calculator/features/calculator.feature +36 -0
  11. data/example/android/android_app/android_app_calculator/features/my_first.feature +13 -0
  12. data/example/android/android_app/android_app_calculator/features/screenshots/test.png +0 -0
  13. data/example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb +5 -0
  14. data/example/android/android_app/android_app_calculator/features/support/env.rb +52 -0
  15. data/example/android/android_app/android_app_calculator/features/support/hooks.rb +26 -0
  16. data/example/android/android_web/android_web_gmail_login.zip +0 -0
  17. data/example/android/android_web/android_web_gmail_login/features/gmail_login.feature +12 -0
  18. data/example/android/android_web/android_web_gmail_login/features/my_first.feature +1 -0
  19. data/example/android/android_web/android_web_gmail_login/features/screenshots/test.png +0 -0
  20. data/example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
  21. data/example/android/android_web/android_web_gmail_login/features/support/env.rb +51 -0
  22. data/example/android/android_web/android_web_gmail_login/features/support/hooks.rb +27 -0
  23. data/example/desktop web/desktop_web_gmail_login.zip +0 -0
  24. data/example/desktop web/desktop_web_gmail_login/features/gmail_login.feature +9 -0
  25. data/example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature +21 -0
  26. data/example/desktop web/desktop_web_gmail_login/features/my_first.feature +1 -0
  27. data/example/desktop web/desktop_web_gmail_login/features/screenshots/test.png +0 -0
  28. data/example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb +5 -0
  29. data/example/desktop web/desktop_web_gmail_login/features/support/env.rb +51 -0
  30. data/example/desktop web/desktop_web_gmail_login/features/support/hooks.rb +26 -0
  31. data/features-skeleton/my_first.feature +5 -0
  32. data/features-skeleton/screenshots/test.png +0 -0
  33. data/features-skeleton/step_definitions/custom_steps.rb +5 -0
  34. data/features-skeleton/support/env.rb +104 -0
  35. data/features-skeleton/support/hooks.rb +74 -0
  36. data/lib/itms_automation.rb +1 -3
  37. data/lib/itms_automation/assertion_steps.rb +68 -0
  38. data/lib/itms_automation/click_elements_steps.rb +24 -0
  39. data/lib/itms_automation/configuration_steps.rb +7 -0
  40. data/lib/itms_automation/input_steps.rb +59 -0
  41. data/lib/itms_automation/javascript_handling_steps.rb +10 -0
  42. data/lib/itms_automation/methods/assertion_methods.rb +344 -0
  43. data/lib/itms_automation/methods/click_elements_methods.rb +23 -0
  44. data/lib/itms_automation/methods/configuration_methods.rb +35 -0
  45. data/lib/itms_automation/methods/error_handling_methods.rb +87 -0
  46. data/lib/itms_automation/methods/input_methods.rb +69 -0
  47. data/lib/itms_automation/methods/javascript_handling_methods.rb +9 -0
  48. data/lib/itms_automation/methods/misc_methods.rb +47 -0
  49. data/lib/itms_automation/methods/navigate_methods.rb +123 -0
  50. data/lib/itms_automation/methods/progress_methods.rb +15 -0
  51. data/lib/itms_automation/methods/required_files.rb +9 -0
  52. data/lib/itms_automation/methods/screenshot_methods.rb +6 -0
  53. data/lib/itms_automation/navigation_steps.rb +79 -0
  54. data/lib/itms_automation/progress_steps.rb +17 -0
  55. data/lib/itms_automation/screenshot_steps.rb +6 -0
  56. data/lib/itms_automation/version.rb +5 -3
  57. metadata +84 -95
  58. data/bin/console +0 -14
  59. data/bin/documentation_generator.rb +0 -119
  60. data/bin/setup +0 -8
  61. data/lib/itms_automation/all_steps.rb +0 -8
  62. data/lib/itms_automation/assertion_helper.rb +0 -29
  63. data/lib/itms_automation/auto_util.rb +0 -707
  64. data/lib/itms_automation/database_steps_helper.rb +0 -125
  65. data/lib/itms_automation/web_steps_helper.rb +0 -867
  66. data/project/Gemfile +0 -3
  67. data/project/Gemfile.lock +0 -92
  68. data/project/README.md +0 -34
  69. data/project/Rakefile +0 -24
  70. data/project/cucumber.yml +0 -4
  71. data/project/features/TestSuite/WebGUI.feature +0 -5
  72. data/project/features/step_definitions/lib_steps/steps_definition.rb +0 -46
  73. data/project/features/step_definitions/repositories/project_object.yml +0 -26
  74. data/project/features/support/env.rb +0 -9
  75. data/project/features/support/hooks.rb +0 -122
@@ -0,0 +1,17 @@
1
+ # require 'cucumber'
2
+ # require_relative 'methods/progress_methods'
3
+
4
+ # # wait for specific period of time
5
+ # Then(/^I wait for (\d+) sec$/) do |time|
6
+ # wait(time)
7
+ # end
8
+
9
+ # # wait for specific element to display for specific period of time
10
+ # Then(/^I wait (\d+) seconds for element "(.*?)" to display$/) do |duration, element|
11
+ # wait_for_element_to_display(element, duration)
12
+ # end
13
+
14
+ # # wait for specific element to enable for specific period of time
15
+ # Then(/^I wait (\d+) seconds for element "(.*?)" to enable$/) do |duration, element|
16
+ # wait_for_element_to_enable(element, duration)
17
+ # end
@@ -0,0 +1,6 @@
1
+ # require 'cucumber'
2
+ # require_relative 'methods/screenshot_methods'
3
+
4
+ # Then(/^I take screenshot$/) do
5
+ # take_screenshot
6
+ # end
@@ -1,3 +1,5 @@
1
- module ItmsAutomation
2
- VERSION = "2.5"
3
- end
1
+ module ITMS
2
+ module Automation
3
+ VERSION = '2.5.6'
4
+ end
5
+ end
metadata CHANGED
@@ -1,170 +1,159 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itms_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.5'
4
+ version: 2.5.6
5
5
  platform: ruby
6
6
  authors:
7
- - Anh Pham
7
+ - INFOdation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-18 00:00:00.000000000 Z
11
+ date: 2020-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: selenium-webdriver
14
+ name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 3.6.0
20
17
  - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '3.6'
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
19
+ version: '1.3'
27
20
  - - ">="
28
21
  - !ruby/object:Gem::Version
29
- version: 3.6.0
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '3.6'
33
- - !ruby/object:Gem::Dependency
34
- name: cucumber
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3.1'
22
+ version: 1.3.18
40
23
  type: :runtime
41
24
  prerelease: false
42
25
  version_requirements: !ruby/object:Gem::Requirement
43
26
  requirements:
44
27
  - - "~>"
45
28
  - !ruby/object:Gem::Version
46
- version: '3.1'
29
+ version: '1.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.18
47
33
  - !ruby/object:Gem::Dependency
48
- name: capybara
34
+ name: selenium-webdriver
49
35
  requirement: !ruby/object:Gem::Requirement
50
36
  requirements:
51
37
  - - "~>"
52
38
  - !ruby/object:Gem::Version
53
- version: 3.29.0
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: 3.29.0
61
- - !ruby/object:Gem::Dependency
62
- name: rspec
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
39
+ version: '3.14'
65
40
  - - ">="
66
41
  - !ruby/object:Gem::Version
67
- version: 3.8.0
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '3.8'
42
+ version: 3.14.1
71
43
  type: :runtime
72
44
  prerelease: false
73
45
  version_requirements: !ruby/object:Gem::Requirement
74
46
  requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- version: 3.8.0
78
47
  - - "~>"
79
48
  - !ruby/object:Gem::Version
80
- version: '3.8'
49
+ version: '3.14'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 3.14.1
81
53
  - !ruby/object:Gem::Dependency
82
- name: parallel_tests
54
+ name: appium_lib_core
83
55
  requirement: !ruby/object:Gem::Requirement
84
56
  requirements:
85
57
  - - "~>"
86
58
  - !ruby/object:Gem::Version
87
- version: '2.7'
59
+ version: 3.10.1
88
60
  - - ">="
89
61
  - !ruby/object:Gem::Version
90
- version: 2.7.1
62
+ version: 3.10.1
91
63
  type: :runtime
92
64
  prerelease: false
93
65
  version_requirements: !ruby/object:Gem::Requirement
94
66
  requirements:
95
67
  - - "~>"
96
68
  - !ruby/object:Gem::Version
97
- version: '2.7'
69
+ version: 3.10.1
98
70
  - - ">="
99
71
  - !ruby/object:Gem::Version
100
- version: 2.7.1
72
+ version: 3.10.1
101
73
  - !ruby/object:Gem::Dependency
102
- name: report_builder
74
+ name: httparty
103
75
  requirement: !ruby/object:Gem::Requirement
104
76
  requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: '1.8'
108
77
  - - "~>"
109
78
  - !ruby/object:Gem::Version
110
- version: '1.8'
111
- type: :runtime
112
- prerelease: false
113
- version_requirements: !ruby/object:Gem::Requirement
114
- requirements:
79
+ version: 0.13.7
115
80
  - - ">="
116
81
  - !ruby/object:Gem::Version
117
- version: '1.8'
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: '1.8'
121
- - !ruby/object:Gem::Dependency
122
- name: cucumber_priority
123
- requirement: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: 0.3.2
82
+ version: 0.13.7
128
83
  type: :runtime
129
84
  prerelease: false
130
85
  version_requirements: !ruby/object:Gem::Requirement
131
86
  requirements:
132
87
  - - "~>"
133
88
  - !ruby/object:Gem::Version
134
- version: 0.3.2
89
+ version: 0.13.7
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.13.7
135
93
  description: Behavior driven development (BDD) approach to write automation test script
136
- to test GUI, RESTful, SOAP, Database, eMail.
137
- email:
138
- - anhpq.info@gmail.com
94
+ to test Web and Android applications.
95
+ email: anh.pham@infodation.vn
139
96
  executables:
140
97
  - itms_automation
141
98
  extensions: []
142
99
  extra_rdoc_files: []
143
100
  files:
144
- - bin/console
145
- - bin/documentation_generator.rb
146
101
  - bin/generate.rb
147
102
  - bin/helper.rb
148
103
  - bin/itms_automation
149
- - bin/setup
104
+ - doc/installation.md
105
+ - doc/itms-automation-API.md
106
+ - doc/itms-automation-help.md
107
+ - example/android/android_app/android_app_calculator.zip
108
+ - example/android/android_app/android_app_calculator/AndroidCalculator.apk
109
+ - example/android/android_app/android_app_calculator/features/calculator.feature
110
+ - example/android/android_app/android_app_calculator/features/my_first.feature
111
+ - example/android/android_app/android_app_calculator/features/screenshots/test.png
112
+ - example/android/android_app/android_app_calculator/features/step_definitions/custom_steps.rb
113
+ - example/android/android_app/android_app_calculator/features/support/env.rb
114
+ - example/android/android_app/android_app_calculator/features/support/hooks.rb
115
+ - example/android/android_web/android_web_gmail_login.zip
116
+ - example/android/android_web/android_web_gmail_login/features/gmail_login.feature
117
+ - example/android/android_web/android_web_gmail_login/features/my_first.feature
118
+ - example/android/android_web/android_web_gmail_login/features/screenshots/test.png
119
+ - example/android/android_web/android_web_gmail_login/features/step_definitions/custom_steps.rb
120
+ - example/android/android_web/android_web_gmail_login/features/support/env.rb
121
+ - example/android/android_web/android_web_gmail_login/features/support/hooks.rb
122
+ - example/desktop web/desktop_web_gmail_login.zip
123
+ - example/desktop web/desktop_web_gmail_login/features/gmail_login.feature
124
+ - example/desktop web/desktop_web_gmail_login/features/gmail_multi_login.feature
125
+ - example/desktop web/desktop_web_gmail_login/features/my_first.feature
126
+ - example/desktop web/desktop_web_gmail_login/features/screenshots/test.png
127
+ - example/desktop web/desktop_web_gmail_login/features/step_definitions/custom_steps.rb
128
+ - example/desktop web/desktop_web_gmail_login/features/support/env.rb
129
+ - example/desktop web/desktop_web_gmail_login/features/support/hooks.rb
130
+ - features-skeleton/my_first.feature
131
+ - features-skeleton/screenshots/test.png
132
+ - features-skeleton/step_definitions/custom_steps.rb
133
+ - features-skeleton/support/env.rb
134
+ - features-skeleton/support/hooks.rb
150
135
  - lib/itms_automation.rb
151
- - lib/itms_automation/all_steps.rb
152
- - lib/itms_automation/assertion_helper.rb
153
- - lib/itms_automation/auto_util.rb
154
- - lib/itms_automation/database_steps_helper.rb
136
+ - lib/itms_automation/assertion_steps.rb
137
+ - lib/itms_automation/click_elements_steps.rb
138
+ - lib/itms_automation/configuration_steps.rb
139
+ - lib/itms_automation/input_steps.rb
140
+ - lib/itms_automation/javascript_handling_steps.rb
141
+ - lib/itms_automation/methods/assertion_methods.rb
142
+ - lib/itms_automation/methods/click_elements_methods.rb
143
+ - lib/itms_automation/methods/configuration_methods.rb
144
+ - lib/itms_automation/methods/error_handling_methods.rb
145
+ - lib/itms_automation/methods/input_methods.rb
146
+ - lib/itms_automation/methods/javascript_handling_methods.rb
147
+ - lib/itms_automation/methods/misc_methods.rb
148
+ - lib/itms_automation/methods/navigate_methods.rb
149
+ - lib/itms_automation/methods/progress_methods.rb
150
+ - lib/itms_automation/methods/required_files.rb
151
+ - lib/itms_automation/methods/screenshot_methods.rb
152
+ - lib/itms_automation/navigation_steps.rb
153
+ - lib/itms_automation/progress_steps.rb
154
+ - lib/itms_automation/screenshot_steps.rb
155
155
  - lib/itms_automation/version.rb
156
- - lib/itms_automation/web_steps_helper.rb
157
- - project/Gemfile
158
- - project/Gemfile.lock
159
- - project/README.md
160
- - project/Rakefile
161
- - project/cucumber.yml
162
- - project/features/TestSuite/WebGUI.feature
163
- - project/features/step_definitions/lib_steps/steps_definition.rb
164
- - project/features/step_definitions/repositories/project_object.yml
165
- - project/features/support/env.rb
166
- - project/features/support/hooks.rb
167
- homepage: http://rubygems.org/gems/itms_automation
156
+ homepage: http://infodation.nl/
168
157
  licenses:
169
158
  - MIT
170
159
  metadata: {}
@@ -176,14 +165,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
165
  requirements:
177
166
  - - ">="
178
167
  - !ruby/object:Gem::Version
179
- version: '0'
168
+ version: 1.9.3
180
169
  required_rubygems_version: !ruby/object:Gem::Requirement
181
170
  requirements:
182
171
  - - ">="
183
172
  - !ruby/object:Gem::Version
184
173
  version: '0'
185
174
  requirements: []
186
- rubygems_version: 3.0.6
175
+ rubygems_version: 3.1.2
187
176
  signing_key:
188
177
  specification_version: 4
189
178
  summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "itms_automation"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
@@ -1,119 +0,0 @@
1
- module DocumentationGenerator
2
-
3
- module CommentExtractor
4
- def parse_and_format_comment(comment)
5
- comment.gsub!(/.*coding:.*UTF-8.*/, '')
6
- comment.strip!
7
- comment_lines = comment.split("\n").take_while { |line| line =~ /^\s*#/ }
8
- comment_lines && comment_lines.join("\n").gsub(/^\s*# ?/, '')
9
- end
10
- end
11
-
12
- class StepDefinition
13
-
14
- extend CommentExtractor
15
-
16
- def initialize(definition, comment = nil)
17
- @definition = definition
18
- @comment = comment
19
- end
20
-
21
- def self.try_and_parse(code)
22
- definition = code[/^\s*((When|Then|Given|AfterStep).*)do/, 1]
23
- return unless definition
24
- comment = parse_and_format_comment(code)
25
- return if comment =~ /\bnodoc\b/
26
- new(definition.strip, comment)
27
- end
28
-
29
- def format
30
- <<-TEXT
31
- * **#{format_definition}**
32
-
33
- #{@comment.gsub(/^/, ' ')}
34
- TEXT
35
- end
36
-
37
- def format_definition
38
- if @definition =~ /AfterStep/
39
- @definition[/@\w*/]
40
- else
41
- capture_groups = %w[([^\"]*) ([^"]*) (.*) (.*?) [^"]+ ([^\"]+) ([^']*) ([^/]*) (.+) (.*[^:])]
42
- capture_groups.map! &Regexp.method(:escape)
43
-
44
- @definition.
45
- gsub('/^', '').
46
- gsub('$/', '').
47
- gsub(' ?', ' ').
48
- gsub('(?:|I )', 'I ').
49
- gsub('?:', '').
50
- gsub(Regexp.new(capture_groups.join '|'), '...').
51
- gsub(/\\\//, '/')
52
- end
53
- end
54
- end
55
-
56
- class StepDefinitionFile
57
-
58
- FILE_COMMENT_END = 'FILE_COMMENT_END'
59
-
60
- include CommentExtractor
61
-
62
- def initialize(filename)
63
- @filename = filename
64
- @code = File.read(filename)
65
- @steps = []
66
- extract_comment
67
- add_steps
68
- end
69
-
70
- def extract_comment
71
- if @code.include?(FILE_COMMENT_END)
72
- file_comment = @code.split(FILE_COMMENT_END).first
73
- @comment = parse_and_format_comment(file_comment)
74
- end
75
- end
76
-
77
- def add_steps
78
- @code.split("\n\n").each do |block|
79
- step = StepDefinition.try_and_parse(block)
80
- if step
81
- @steps << step
82
- end
83
- end
84
- end
85
-
86
- def format
87
- <<-TEXT
88
- ### #{format_filename}
89
-
90
- #{@comment}
91
-
92
- #{format_steps}
93
- TEXT
94
- end
95
-
96
- def format_filename
97
- @filename.split('/').last
98
- end
99
-
100
- def format_steps
101
- @steps.collect { |step| step.format }.join("\n\n")
102
- end
103
- end
104
-
105
- class StepDefinitionsDirectory
106
- def initialize(directory)
107
- @step_definition_files = []
108
- Dir["#{directory}/*.rb"].to_a.sort.each do |filename|
109
- next if filename =~ /all_steps/
110
- @step_definition_files << StepDefinitionFile.new(filename)
111
- end
112
- end
113
-
114
- def format
115
- @step_definition_files.collect { |step_definition_file| step_definition_file.format }.join("\n\n")
116
- end
117
- end
118
-
119
- end
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here